简体   繁体   English

VS2010将资源文件引用更改为版本4.0,但目标是3.5 Framework

[英]VS2010 changes resource file references to Version 4.0 although targeting 3.5 Framework

We changed from VS2008 to VS2010 for development. 我们从VS2008改为VS2010进行开发。 But requirement for the installation of the app is still Framework 3.5. 但是安装应用程序的要求仍然是Framework 3.5。 Therefore we target the build to this framework. 因此,我们将构建目标定位到此框架。 Everything works fine except an odd behaviour I would like to verify not to be a problem: 一切正常,除了奇怪的行为,我想验证不是一个问题:

If someone edits resources existing entries in the resources.resx and resources.designer.cs change the system.windows.forms entry from 2.0.0.0 to 4.0.0.0. 如果有人编辑resources.resx和resources.designer.cs中的资源现有条目,请将system.windows.forms条目从2.0.0.0更改为4.0.0.0。 Example: 例:

Before editing: 编辑前:

<assembly alias="System.windows.forms" 
          name="system.windows.forms, Version=2.0.0.0, ...[signature] />

After: 后:

<assembly alias="System.windows.forms" 
          name="system.windows.forms, Version=4.0.0.0, ...[signature] />

This seems to be a reference for ResXFileRef types for Pictures. 这似乎是图片的ResXFileRef类型的参考。 A line later it says: 一行后来它说:

<data name="mypic" type="System.Resources.ResXFileRef, System.Windows.Forms">
  <value>[pictureinfomation - referencing System.Drawing version 2.0]</value>
</data>

Running the app does not seem to look for version 4. But I would like to know for sure, that this is not a problem. 运行应用程序似乎没有寻找版本4.但我想知道,这不是一个问题。

Anyone have any thoughts? 有人有什么想法? I have googled quite some time for an answer and did not understand correclty that the ResXFileRef is used for in the Resources mechanism. 我已经搜索了相当长的时间来获得答案,并且不理解ResXFileRef在资源机制中的用途。

Thanks for any hints if my app is still only using 3.5 Versions. 如果我的应用程序仍然只使用3.5版本,感谢任何提示。

Regards 问候

I dont think this is a bug. 我不认为这是一个错误。

Try to compile the application and deploy it and test. 尝试编译应用程序并部署并测试。

Also get the properties of dll using 'ildasm'and check 还使用'ildasm'获取dll的属性并检查

It has no impact on your application, as the built binaries are still against .NET 3.5. 它对您的应用程序没有影响,因为构建的二进制文件仍然违反.NET 3.5。

If this is a bug, you should not be the first one to notice it. 如果这是一个错误,你不应该是第一个注意到它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM