C
cpnet
I'm having problems with a publisher policy file I'm trying to put in the
GAC. I did it with a previous verison, but now I can't seem to get it to
work. The error I get is, "Failure adding assembly to the cache: One of
more modules specified in the manifest not found.". I am using gacutil to
try to install the policy file into the GAC.
The following works fine when I put it in the app config file:
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MyCompany.MyAssembly.NET"
publicKeyToken="db4fd244c1bc0b6e"
culture="neutral" />
<!-- Redirecting to version 0.1.0.1 of the assembly. -->
<bindingRedirect oldVersion="0.1.0.0"
newVersion="0.1.0.1"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
However, when I put the above XML into policy.config and try to put it into,
"policy.0.1.MyCompany.MyAssembly.NET.dll" I can't install it into the gac.
Here's the command I'm using to create
"policy.0.1.MyCompany.MyAssembly.NET.dll":
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\al.exe"
/link:"$(SolutionDir)MyProj\policy.config"
/out:"$(SolutionDir)MyProj\output\policy.0.1.MyCompany.MyAssembly.NET.dll"
/keyfile:"$(SolutionDir)StrongName\MyCompany.snk"
The strong name key file is the same one used to sign all of my assemblies.
I've tried with both the old an new versions of
"MyCompany.MyAssembly.NET.dll" in the GAC already (they install fine). I've
double checked the culture, versions, and the public key token.
Help!
GAC. I did it with a previous verison, but now I can't seem to get it to
work. The error I get is, "Failure adding assembly to the cache: One of
more modules specified in the manifest not found.". I am using gacutil to
try to install the policy file into the GAC.
The following works fine when I put it in the app config file:
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MyCompany.MyAssembly.NET"
publicKeyToken="db4fd244c1bc0b6e"
culture="neutral" />
<!-- Redirecting to version 0.1.0.1 of the assembly. -->
<bindingRedirect oldVersion="0.1.0.0"
newVersion="0.1.0.1"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
However, when I put the above XML into policy.config and try to put it into,
"policy.0.1.MyCompany.MyAssembly.NET.dll" I can't install it into the gac.
Here's the command I'm using to create
"policy.0.1.MyCompany.MyAssembly.NET.dll":
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\al.exe"
/link:"$(SolutionDir)MyProj\policy.config"
/out:"$(SolutionDir)MyProj\output\policy.0.1.MyCompany.MyAssembly.NET.dll"
/keyfile:"$(SolutionDir)StrongName\MyCompany.snk"
The strong name key file is the same one used to sign all of my assemblies.
I've tried with both the old an new versions of
"MyCompany.MyAssembly.NET.dll" in the GAC already (they install fine). I've
double checked the culture, versions, and the public key token.
Help!