简体   繁体   中英

Migrating project from VS2008 to 2012 changes binary content

Migrating project from Visual Studio 2008 to 2012 without changing the Target Framework, is changing the content of the output binary.

I'm using an MD5 signature to compare the file contents.

E9A487940134689A3D8E3B42FB1A9DCD - VS2008 compilation 11CC505F3B74A6B4AC5E9DB830F62B86 - VS2012 compilation

The changes made in the project during conversion is only in some source control bindings and no source code is changed.

Any ideas why the binary content changes?

Different versions of the C# compiler support different language features. Sometimes there are significant differences between how something works in one version versus another (eg, C#5's capture of the foreach iteration variable ). Thus the output generated will be different. Jon Skeet's article on C# language versions is a nice overview.

VS2008 uses C#3 by default. VS2012 uses C#5.

You can specify a particular language version in a project's properties. Go to the Build tab, select the Advanced button, and pick from the Language Version dropdown. I'm assuming this is available in VS2012. I skipped from 2010 to 2013, and am going by the 2013 UI.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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