Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "SKU" (attribute) mean in C#?

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 ?

like image 540
Cemre Mengü Avatar asked Jun 17 '13 13:06

Cemre Mengü


People also ask

What is SKU in app config?

A string value that specifies the stock-keeping unit (SKU), which in turn specifies which . NET Framework release this application supports. Starting with . NET Framework 4.0, the use of the sku attribute is recommended.

What is Startup SKU?

SKU is an accelerator program for stellar consumer product startups. Startup companies with market-validated consumer products apply to its accelerator program to receive the resources and relationships that they require to become breakout successes and household names.


3 Answers

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

like image 114
ilmatte Avatar answered Oct 24 '22 02:10

ilmatte


See the msdn documentation about the supportedRuntime element. It has a table with the valid values for SKU and also what each means.

like image 34
Jester Avatar answered Oct 24 '22 04:10

Jester


SKU stands for Stock-Keeping Unit (SKU), which in turn specifies which .NET Framework release this application supports.

like image 22
TOP KEK Avatar answered Oct 24 '22 03:10

TOP KEK