4

I'm upgrading from .NET 4.0 to 4.7.1

two things that concern me.

  1. App.Config- <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1"/></startup></configuration> does that mean that it really hasn't upgrade to newer framework and is running at 4.0.0 instead of 4.7.1?

  2. In a class that is autogenerated by svcutil?

    auto-generated // This code was generated by a tool. // Runtime Version:4.0.30319.18444

    it generates:

    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]

Would I have to delete all the autogenerated class and somehow regenerate that with the newer framework or can I just manually change them to 4.7.1?

TDeoodfig
  • 99
  • 2
  • 9
  • 4.7.1 is an *in place* upgrade of the .NET Framework 4.x (for any lower x value). This does mean that in a number of places, it will still purport to be version 4.0. – Damien_The_Unbeliever Nov 03 '17 at 15:02
  • Don't panic, there is nothing wrong. There is a lot more to version numbering than meets the eye, there are 3 distinct ones here. Any program that targets .NET framework 4.x.y uses runtime version v4.0 (CLR and jitter). x.y represent assemblies and revisions. The [Serialization] attribute type has not changed since version 4.0.0.0, none of the basic BCL types have. Forcing your user to update to 4.7.1 might not be the best decision right now, it is not yet being deployed by Windows Update. 4.6.2 is good. – Hans Passant Nov 03 '17 at 15:20
  • @HansPassant so my second problem where the autogenerated proxy(?) code by WCF is ok that it's System.Runtime.Serialization is 4.0.0.0 b/c it used the same CLR? – TDeoodfig Nov 03 '17 at 15:26
  • 1
    There is no other version than 4.0.0.0, Microsoft had no reason whatsoever to change it. The only "problem" is that you don't have a problem. – Hans Passant Nov 03 '17 at 15:33

2 Answers2

4

does that mean that it really hasn't upgrade to newer framework and is running at 4.0.0 instead of 4.7.1?

No, when you set the sku=".NETFramework,Version=v4.7.1", that means that .NET 4.7.1 is required to run the application. The runtime version is common for all 4.X Frameworks. Similar to as .NET 2.0, 3.0 and 3.5 have all the runtime version 2.0.50727.

adjan
  • 13,371
  • 2
  • 31
  • 48
0

For all .net 4.x subreleases the runtime version entry is 4.0 in the app.config

The SKU entries specifies which .net 4.x version you target and sku=".NETFramework,Version=v4.7.1" means you target .net framework 4.7.1

magicandre1981
  • 27,895
  • 5
  • 86
  • 127