I had a project which first target was .NET4.0 but now I change the project to 4.5.1, and I would like to know how to check the version of .NET, because I run the application in a fresh win7 and the application runs.
I try to use this code to check the version of .NET that is used:
string version = System.Reflection.Assembly
.GetExecutingAssembly()
.GetReferencedAssemblies()
.Where(x => x.Name == "System.Core").First().Version.ToString();
MessageBox.Show(version);
And the result is 4.0.0.0, so how I am thinking that the application is still 4.0. How can I change the target of the application?
Thanks.