S
Scott
Publisher policies sound just like what I need but I just can't get these
things to work. There are several good kb articles that seem to show exactly
what needs to be done....
Here is my publisher file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="JusticeLink"
publicKeyToken="6db63116f81a4445"
culture="neutral" />
<!-- Redirecting to version 3.3.0.0 of the assembly. -->
<bindingRedirect oldVersion="3.3.0.0"
newVersion="3.4.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Here is the assembly linker statement:
REM --- Link Policy
al /linkublisher.config /outolicy.3.3.JusticeLink.dll
/Keyfile:\Code3\NorSoftKey.snk /version:3.4.0.0
I previously created a small test app using version 3.3.0.0 and it works.
I installed the policy in the GAC ==>gacutil /i policy.3.3.JusticeLink.dll
then I removed the 3.3.0.0 version and installed the 3.4.0.0 version.
Now the test app no longer works and I get a long error:
LOG: User = NORSOFT\SNORBERG
LOG: DisplayName = JusticeLink, Version=3.3.0.0, Culture=neutral,
PublicKeyToken=6bd63116f81a4445
(Fully-specified)
LOG: Appbase = file:///C:/Code3/bin/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : TestPolicy32, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Publisher policy file is found at
C:\Windows\assembly\GAC_MSIL\Policy.3.3.JusticeLink\3.4.0.0__6bd63116f81a4445\Publisher.config.
LOG: Post-policy reference: JusticeLink, Version=3.3.0.0, Culture=neutral,
PublicKeyToken=6bd63116f81a4445
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Code3/bin/JusticeLink.DLL.
LOG: Assembly download was successful. Attempting setup of file:
C:\Code3\bin\JusticeLink.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: JusticeLink, Version=3.4.0.0, Culture=neutral,
PublicKeyToken=6bd63116f81a4445
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: The assembly reference did not match the assembly definition found.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing
terminated.
==========================
A couple of things I noticed is when I install the new policy in the GAC the
version is 0.0.0.0, so I put the version option in the assembly linker for
3.4.0.0. None of the kb articles I saw used that /version option so I am
guessing this has something to do with it.
This is on a vista64/ultimate system using VS2008. All programs are C# as
ANY CPU. Culture and options all seem to match up.
So I am at a loss. Any ideas?
things to work. There are several good kb articles that seem to show exactly
what needs to be done....
Here is my publisher file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="JusticeLink"
publicKeyToken="6db63116f81a4445"
culture="neutral" />
<!-- Redirecting to version 3.3.0.0 of the assembly. -->
<bindingRedirect oldVersion="3.3.0.0"
newVersion="3.4.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Here is the assembly linker statement:
REM --- Link Policy
al /linkublisher.config /outolicy.3.3.JusticeLink.dll
/Keyfile:\Code3\NorSoftKey.snk /version:3.4.0.0
I previously created a small test app using version 3.3.0.0 and it works.
I installed the policy in the GAC ==>gacutil /i policy.3.3.JusticeLink.dll
then I removed the 3.3.0.0 version and installed the 3.4.0.0 version.
Now the test app no longer works and I get a long error:
LOG: User = NORSOFT\SNORBERG
LOG: DisplayName = JusticeLink, Version=3.3.0.0, Culture=neutral,
PublicKeyToken=6bd63116f81a4445
(Fully-specified)
LOG: Appbase = file:///C:/Code3/bin/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : TestPolicy32, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Publisher policy file is found at
C:\Windows\assembly\GAC_MSIL\Policy.3.3.JusticeLink\3.4.0.0__6bd63116f81a4445\Publisher.config.
LOG: Post-policy reference: JusticeLink, Version=3.3.0.0, Culture=neutral,
PublicKeyToken=6bd63116f81a4445
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Code3/bin/JusticeLink.DLL.
LOG: Assembly download was successful. Attempting setup of file:
C:\Code3\bin\JusticeLink.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: JusticeLink, Version=3.4.0.0, Culture=neutral,
PublicKeyToken=6bd63116f81a4445
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: The assembly reference did not match the assembly definition found.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing
terminated.
==========================
A couple of things I noticed is when I install the new policy in the GAC the
version is 0.0.0.0, so I put the version option in the assembly linker for
3.4.0.0. None of the kb articles I saw used that /version option so I am
guessing this has something to do with it.
This is on a vista64/ultimate system using VS2008. All programs are C# as
ANY CPU. Culture and options all seem to match up.
So I am at a loss. Any ideas?