0

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?

4

1 回答 1

1

您的项目正在引用引用 System.Windows.Forms v1.0.5000.0 的内容,但您没有该版本。该警告建议您将重新映射添加到该程序集的 v3.5.0.0 以使其正常工作。您在app.config文件中执行此操作。建议您将此文件添加到项目中并将映射添加到其中。

像这样的东西应该工作:

<?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>
于 2013-10-22T15:52:19.777 回答