Eric Lemes
Eric Lemes

Reputation: 581

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?

Upvotes: 0

Views: 123

Answers (1)

jltrem
jltrem

Reputation: 12544

Different versions of the C# compiler support different language features. Sometimes there are significant differences between how something works in one version versus another (e.g., 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.

Upvotes: 1

Related Questions