System.EnterpriseServices.Internal.Publish.GacInstall does not work, but there are no errors

Here is my code:

var s = new System.EnterpriseServices.Internal.Publish();
foreach (string file in Directory.EnumerateFiles(@"C:\Program Files\MyFolder\MSPractices"))
{
    Console.WriteLine("GACing " + file);
    s.GacInstall(file);
}

These are the files I'm trying to use for the GAC (version 6.0.1304.0)

Microsoft.Practices.EnterpriseLibrary.Caching.dll Microsoft.Practices.EnterpriseLibrary.Common.dll Microsoft.Practices.EnterpriseLibrary.Data.dll Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging .EnterpriseLibrary.Logging.Database.dll Microsoft.Practices.EnterpriseLibrary.Logging.dll Microsoft.Practices.EnterpriseLibrary.PolicyInjection.dll Microsoft.Practices.EnterpriseLibrary.Security.dll Microsoft.Practices.EnterpriseLibrary.Validation.Service dll Microsoft.Practices.Unity.Configuration.dll Microsoft.Practices.Unity.dll Microsoft.Practices.Unity.Interception.Configuration.dll Microsoft.Practices.Unity.Interception.dll

- , , , , , .

, gacutil /l , ( ).

enter image description here

?

: , InstallShield InstallScript ( EnterpriseServices.Internal.Publish).

:

!... ! Publish pub = new Publish(); pub.GacInstall("foo");

, . , , GAC. .NET Framework. .NET Framework 4.0 GacInstall 3.5 ..

(2011/12/13) - ILSpy , , :

,

: foo

+4
3

Installshield. 6 EnterpriseLibrary .NET 4.0 , Installshield 32- .exe, .NET 2.0 System.EnterpriseServices.dll, .NET 4.0 EnterpriseLibrary. # , installscript. , , WIX.

+1

, .

, #, API- GAC/Fusion, . # ( Hans Passant), .

gacutil.exe, , . Visual Studio.

+3

; . Powershell ISE , , 100 , , , . .

0

Source: https://habr.com/ru/post/1618294/


All Articles