“SKU"是什么意思(属性)在 C# 中是什么意思? [英] What does "SKU" (attribute) mean in C#?

查看:65
本文介绍了“SKU"是什么意思(属性)在 C# 中是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我遇到的线路

在我的 App.config 文件中导致 错误 包含 sku 属性时的框架.虽然,我搜索了很多我无法真正找出SKU 的意思(除了我认为与本案无关的库存单位"或货架单位"的定义).

简而言之,SKU 是什么意思/代表什么?

解决方案

这个问题的好答案在这里:

如果我删除自动添加的 supportedRuntime 会发生什么元素?

最后一点:如果您希望能够在 .NET 4.0 上运行,但不需要任何新的 4.5 API"

基本上,您在 App.config 中找到的配置已自动添加,因为您的项目已设置为自动使用 .net Framework 4.5 构建.如果您希望您的应用程序使用 .net Framework 4.0(没有 4.5 就地更新)运行,您只需右键单击该项目 --<属性并将目标框架设置为 4.App.config 将被修改在:

有趣的阅读还有 Rick Strahl 的帖子:

http://weblog.west-wind.com/posts/2012/Mar/13/NET-45-is-an-inplace-replacement-for-NET-40

Today I encountered with the line

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>

in my App.config file which caused errors with framework when the sku attribute was included. Although, I searched a lot I couldnt really find out what SKU means (other than the definitions "stock keeping unit" or "Shelf Keeping Unit" which I dont think are related to this case).

In short, what does SKU mean/stand for ?

解决方案

A good answer to this question is here:

What happens if I remove the auto added supportedRuntime element?

in the last point: "If you want to be able to run on .NET 4.0, but don't need any new 4.5 APIs"

Essentially the configuration you found in your App.config has been added automatically because your project has been set to automatically to be built with .net Framework 4.5. If you want your application to run with .net Framework 4.0 (with no 4.5 in-place update) you just right.click the project --< Properties and set the target framework to 4. App.config will be modified in:

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>

Interesting read also Rick Strahl's post:

http://weblog.west-wind.com/posts/2012/Mar/13/NET-45-is-an-inplace-replacement-for-NET-40

这篇关于“SKU"是什么意思(属性)在 C# 中是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆