P
Piotrekk
Hi
I have designed simple assembly ( *.dll - version 1.0.0.0 ) and
registered it in GAC. I have also compiled new version of this
assembly - 1.0.0.1 and also added to GAC.
Then I've created simple console application and added reference to
assembly 1.0.0.0 by pointing the file in "Browse" tab ( visual
studio ). So good so far. I have applied binding policy ( configured
assembles from .NET Framework 2.0 configuration tool ) in the
following way. requested version = 1.0.0.0 new version = 1.0.0.1
Then when I ran console application I have observed that new version
of assembly was used. The question is why can't I achieve the same
goal by just adding configuration file to console application.
When I run the app with the following config file, still the old
version is used ( tkAssembly is assembly name from GAC and token is
taken from version 1.0.0.0 of this assembly ):
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name="tkAssembly"
processorArchitecture="x86" publicKeyToken="565726153a63d68f"/>
<bindingRedirect oldVersion="1.0.0.0" newVersion="1.0.0.1"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Thanks
PK
I have designed simple assembly ( *.dll - version 1.0.0.0 ) and
registered it in GAC. I have also compiled new version of this
assembly - 1.0.0.1 and also added to GAC.
Then I've created simple console application and added reference to
assembly 1.0.0.0 by pointing the file in "Browse" tab ( visual
studio ). So good so far. I have applied binding policy ( configured
assembles from .NET Framework 2.0 configuration tool ) in the
following way. requested version = 1.0.0.0 new version = 1.0.0.1
Then when I ran console application I have observed that new version
of assembly was used. The question is why can't I achieve the same
goal by just adding configuration file to console application.
When I run the app with the following config file, still the old
version is used ( tkAssembly is assembly name from GAC and token is
taken from version 1.0.0.0 of this assembly ):
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name="tkAssembly"
processorArchitecture="x86" publicKeyToken="565726153a63d68f"/>
<bindingRedirect oldVersion="1.0.0.0" newVersion="1.0.0.1"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Thanks
PK