Celtic Coding Solutions Blog

Celtic Coding Solutions Blog - for everything computer related

Installing .Net Assemblies in GAC for Windows Server 2008 r2

I blogged about installing .Net Assemblies in GAC for Windows Server 2008 (Celtic Coding Linky), but for 2008 R2 it no longer works unless you change the Security Policy and re-boot the server (blogs.msdn.com).

This isn't really an option on a live server so I decided to use gacutil.exe.  Yes I abortion pill safety know this is not supported in a live environment but it works and late term abortions when under tight deadlines it is a proper option.

However this server had an old verion under:-

C:\Windows\Microsoft.NET\Framework\v1.1.4322

No problem give it a go in Command Prompt running as an administrator and get the following error:-

Failure initializing gacutil.

 

Looks like a .Net version difference so open gacutil.exe.config and change the following:-

<?xml version ="1.0"?>

<configuration>

    <startup>

        <requiredRuntime version="v1.1.4322"  />

    </startup>

</configuration>

 

To

<?xml version ="1.0"?>

<configuration>

    <startup>

        <requiredRuntime  safemode="true"  imageVersion="v1.1.4322" version="v1.1.4322"  />

    </startup>

    <runtime>

        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

            <publisherPolicy apply="no"/>

        </assemblyBinding>

    </runtime>

</configuration>

 

Now try installing the dll

gacutil /i CCAssembly.dll

 

Assembly successfully added to the cache

Excellent!

Comments are closed