James Newton-King
James Newton-King

Reputation: 49042

What are the official FrameworkNames?

.NET 4 has a new FrameworkName class. An example of this being used is NuPack and its package directory naming convention.

What are the FrameworkNames for Microsoft's .NET Frameworks?

Upvotes: 3

Views: 652

Answers (2)

Valentin
Valentin

Reputation: 782

You can get the target framework for any project with the following command:

$p = Get-Project "MyProjectName"
$p.Properties.Item("TargetFrameworkMoniker").Value

You can execute it also from Visual Studio -> Package Manager Console.

Good explanation

Upvotes: 0

Hans Passant
Hans Passant

Reputation: 941397

You can see for yourself when you change the MSBuild output to Diagnostic. Tools + Options, Projects and Solutions, Build and Run. The string you'd pass to the FrameworkName constructor appears as the TargetFrameworkMoniker build property.

The ones I can easily see myself are the regular desktop version:

.NETFramework,Version=v4.0,Profile=Client

And the Silverlight version:

Silverlight,Version=v4.0

Contributed by the OP, the Windows Phone 7 version:

Silverlight,Version=v4.0,Profile=WindowsPhone

I can't get any Micro Framework projects built, instant crash to the desktop. Compact Framework support was removed from VS2010. That's about it for versions that I know of.

Upvotes: 2

Related Questions