简体   繁体   English

从VS2008 C转移到VS2010之前需要考虑的事项#

[英]Things to consider before move to VS2010 from VS2008 C#

We have got a C# Windows application which uses devexpress controls, enterprise library and CC.net for building. 我们有一个C#Windows应用程序,它使用devexpress控件,企业库和CC.net进行构建。 We are planning to migrate VS2010 soon. 我们计划很快迁移VS2010。

Have you come across similar situations? 你遇到过类似的情况吗? Are there any unforeseen issues? 有没有不可预见的问题?

If your code makes use of any of these features listed in column 1, you might need to take a look at this: 如果您的代码使用了第1列中列出的任何这些功能,您可能需要查看以下内容:

http://msdn.microsoft.com/en-us/library/ee855831.aspx http://msdn.microsoft.com/en-us/library/ee855831.aspx

We did a similar migration almost a year ago (just after Visual Studio 2010 was released). 我们差不多一年前(在Visual Studio 2010发布之后)进行了类似的迁移。 That was a little bit too early as DevExpress were not quite ready with their .NET 4 version yet. 这有点太早,因为DevExpress尚未准备好他们的.NET 4版本。 We had to run the web application in "compatibility mode" for a week or so. 我们必须以“兼容模式”运行Web应用程序一周左右。

There were very few issues. 问题很少。 From what I remember (our product is half .NET and half C++): 从我记忆中(我们的产品是一半.NET和一半C ++):

  • Some third party controls needed updating 某些第三方控件需要更新
  • Some internal names crashed with new .NET 4 BCL classes. 一些内部名称与新的.NET 4 BCL类崩溃。
  • C++ project started to use MSBuild so that was some work up upgrade the project files. C ++项目开始使用MSBuild,因此有些工作升级了项目文件。

If you are still targeting .NET 3.5 then the move should be very smooth. 如果你仍然以.NET 3.5为目标,那么移动应该非常顺利。 We recently moved a very large WinForms app across and encountered a couple of minor issues: 我们最近移动了一个非常大的WinForms应用程序并遇到了一些小问题:

  • Some of our resx files contained serialized generic lists of our own custom types, which caused compile errors. 我们的一些resx文件包含我们自己的自定义类型的序列化通用列表,这导致编译错误。 Never got to the bottom of why this was, but we just deleted them from the resx files and set the [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] attribute on the offending properties 从来没有深究这是为什么,但我们只是从resx文件中删除它们并在有问题的属性上设置[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]属性
  • The syntax checking of XML comments is slightly stricter, meaning you could get extra warnings (and with all warnings as errors turned on this broke our build) XML注释的语法检查稍微严格一些,这意味着您可以获得额外的警告(并且在启用错误时会显示所有警告,这会破坏我们的构建)

I faced this : on XP machine, trying to build a project referencing a COM with multiple objects inside. 我遇到了这个问题 :在XP机器上,尝试构建一个引用内部有多个对象的COM的项目。 Specifically, i've encountered this with INetFwMgr - (The type or namespace name 'INetFwMgr' could not be found (are you missing a using directive or an assembly reference?) . Its seems that i am not the only one . 具体来说,我在INetFwMgr遇到过这种INetFwMgr - (The type or namespace name 'INetFwMgr' could not be found (are you missing a using directive or an assembly reference?) INetFwMgr (The type or namespace name 'INetFwMgr' could not be found (are you missing a using directive or an assembly reference?) 。似乎我不是唯一一个

EDIT: solution here . 编辑: 这里的解决方案

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

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