简体   繁体   English

升级到新的.NET Framework-app.config中支持的运行时版本VS sku?

[英]upgrading to new .NET framework- supportedRuntime version VS sku in app.config?

I'm upgrading from .NET 4.0 to 4.7.1 我正在从.NET 4.0升级到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? App.Config- <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1"/></startup></configuration>表示它确实没有升级到较新的版本框架并以4.0.0而不是4.7.1运行?

  2. In a class that is autogenerated by svcutil? 在由svcutil自动生成的类中?

    auto-generated // This code was generated by a tool. 自动生成//此代码是由工具生成的。 // Runtime Version:4.0.30319.18444 //运行时版本:4.0.30319.18444

    it generates: 它产生:

    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] [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? 我是否必须删除所有自动生成的类并以某种方式使用较新的框架重新生成它,还是可以将它们手动更改为4.7.1?

does that mean that it really hasn't upgrade to newer framework and is running at 4.0.0 instead of 4.7.1? 这是否意味着它确实还没有升级到较新的框架,并且以4.0.0(而不是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. 不,当您设置sku=".NETFramework,Version=v4.7.1" ,这意味着运行该应用程序需要.NET 4.7.1。 The runtime version is common for all 4.X Frameworks. 对于所有4.X Framework,运行时版本都是通用的。 Similar to as .NET 2.0, 3.0 and 3.5 have all the runtime version 2.0.50727. 与.NET 2.0类似,3.0和3.5都具有所有运行时版本2.0.50727。

For all .net 4.x subreleases the runtime version entry is 4.0 in the app.config 对于所有.net 4.x子发行runtime version ,app.config中runtime version 条目为4.0

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 SKU条目指定了您定位的.net 4.x版本,而sku=".NETFramework,Version=v4.7.1"表示您定位了.net Framework 4.7.1。

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

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