Programatically Updating TeeChart.dll in User's GAC
Posted: Fri Sep 09, 2005 7:53 pm
I made a mistake installing the Eval TeeChart.dll and now I am trying to programatically upgrade it.
The application that I maintain that uses TeeChart is ran from the network. The user has a shortcut on their desktop that points to the app on the network (actually, not the app, put a wrapper for the app so that I can do automatic upgrades even when someone else is using it - this avoids file locks).
Anyway, this works only if the code on the network has my companies signautre. This doesn't work for the TeeChart.dll as it has already been signed by Steema.
I sign my code, so it can then be ran from the network, and have this snippet of code run during the apps start up:
System.EnterpriseServices.Internal.Publish foo = new System.EnterpriseServices.Internal.Publish();
foo.GacInstall(networkPathToTeeChartDll);
This EnterpriseServices library is smart enough to not reinstall the DLL into the GAC if it is already there, so the second time someone runs the program the above snippet does nothing.
While I was in the prototype phase of my app I had several users run my app and the eval DLL got installed. I now have the purchased dll and the eval period has expired - so users get a pop up message when a graph is generated.
From what I read in the chapter 17 tutorial all I had to do was recompile my application with a referance to the liscensed TeeChart.dll and redeploy, and then the users with the eval TeeChart.dll would no longer see the "Trail Period Over" message - as the app would have the .licx file associated with it.
This doesn't seem to be the case. I'm pretty green to dealing .NET liscensing issues, so I might be missing something simple.
Is there anyway I can fix this with out running:
System.EnterpriseServices.Internal.Publish foo = new System.EnterpriseServices.Internal.Publish();
foo.GacRemove(networkPathToTeeChartDll);
foo.GacInstall(networkPathToTeeChartDll);
thanks
The application that I maintain that uses TeeChart is ran from the network. The user has a shortcut on their desktop that points to the app on the network (actually, not the app, put a wrapper for the app so that I can do automatic upgrades even when someone else is using it - this avoids file locks).
Anyway, this works only if the code on the network has my companies signautre. This doesn't work for the TeeChart.dll as it has already been signed by Steema.
I sign my code, so it can then be ran from the network, and have this snippet of code run during the apps start up:
System.EnterpriseServices.Internal.Publish foo = new System.EnterpriseServices.Internal.Publish();
foo.GacInstall(networkPathToTeeChartDll);
This EnterpriseServices library is smart enough to not reinstall the DLL into the GAC if it is already there, so the second time someone runs the program the above snippet does nothing.
While I was in the prototype phase of my app I had several users run my app and the eval DLL got installed. I now have the purchased dll and the eval period has expired - so users get a pop up message when a graph is generated.
From what I read in the chapter 17 tutorial all I had to do was recompile my application with a referance to the liscensed TeeChart.dll and redeploy, and then the users with the eval TeeChart.dll would no longer see the "Trail Period Over" message - as the app would have the .licx file associated with it.
This doesn't seem to be the case. I'm pretty green to dealing .NET liscensing issues, so I might be missing something simple.
Is there anyway I can fix this with out running:
System.EnterpriseServices.Internal.Publish foo = new System.EnterpriseServices.Internal.Publish();
foo.GacRemove(networkPathToTeeChartDll);
foo.GacInstall(networkPathToTeeChartDll);
thanks