Question

One of my VS 2008 projects shows several warning lines in the Output window like this:

Consider app.config remapping of assembly "System.Windows.Forms, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes" from Version "1.0.5000.0" [] to Version "3.5.0.0" [C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.Windows.Forms.dll] to solve conflict and get rid of warning.

...and yet there is no app.config file for this project. What does it really want?

Was it helpful?

Solution

Your project is referencing something that references v1.0.5000.0 of System.Windows.Forms, but you do not have that version. The warning is suggesting that you add a remapping to v3.5.0.0 of that assembly so that it will work properly. You do this in the app.config file. It is suggesting that you add this file to your project and add the mapping to it.

Something like this should work:

<?xml version="1.0"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Windows.Forms" publicKeyToken="969db8053d3322ac" culture="neutral" />
        <bindingRedirect oldVersion="1.0.5000.0" newVersion="3.5.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top