.NET FrameWork version used.
Hi
I have an assembly that is built against the mscorlib 1.0.3300.0 .NET 1.0 that is
using the System.Environment.Version to determine which version of the
Framework it’s using to generate source code correctly.
(Were to include the Strong Name key file in the assemblyInfo.cs file or on the build command line.)
When I build the assembly I don’t know what version of the .NET Framework the customers
will be using.
When I run it on a machine that only has .NET Framework 1.1 and 2.0 on it the
version always reports it’s2.0.I have run the sdkvars.bat to set up the 1.1
environment and if I rebuild my assembly using the 1.1 .NET Framework it knows
which version to run with.It looks like if the version of mscorlib that the assembly
is built with is not on the machine it will default to the highest version.I have tried to use a
configuration file to get it to look at the 1.1 version at runtime but it still reports
the .NET Framework version of 2.0.Any suggestions on how to get it to use the
1.0.5000.0 (Framework 1.1) and not 2.0?
Here is the configuration file I have tried,gencs.exe.config
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="mscorlib" culture="neutral" publicKeyToken="b77a5c561934e089" />
<bindingRedirect oldVersion="1.0.3300.0"
newVersion="1.0.5000.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Mark

