开发者

trying to use c# to install .NET 4 GAC DLL

Uptil now, we've been using C# to install GAC DLL's to the GAC without any issues

System.EnterpriseServices.Internal.Publish p = 
  new System.EnterpriseServices.Internal.Publish();

p.GacInstall(filePath);

However, we tried using the same code to install a .NET 4.0 GAC DLL. It does not give any error and says that the GAC is installed.

However, when I look in C:\WINDOWS\Microsoft.NET\assembly folder I do not see the GAC being installed. Also, when I look up the event viewer on the Server it shows me a warning

"Source: COM+ SOAP Services Installation in the global assemb开发者_如何转开发ly failed: <GACDLL_PATH>

Is there any way I can install a .NET 4.0 GAC DLL into the GAC programtically using C#?


I was able to resolve this issue I rebuilt my C# project with the target framework 4.0. Previously I was trying to install .NET 4 GAC DLL with a c# project that was built with the target framework 3.5...

After the project was rebuilt with .NET 4.0 framework I was able to install .NET 4 gac dll. Also, this is backward compatible i.e. you can install GAC DLL's created with previous versions of the .NET framework.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜