What CLR is needed for C# 6? - c#-6.0

The title says it all: what CLR version is / will be needed to run C# 6 programs? The CLR version is interesting to find out the system requirements and supported operating systems.
I googled [1] [2] and had a look at Wikipedia and MSDN but could not find the information.

C # 6 language enhancements is compatible to .net framework starting from 2.0 to 4.6. It does not require any higher version of .net framework but need higher version of Visual studio such as VS 2015. C# 6 is also available to VS 2013 with addon https://github.com/dotnet/roslyn

It is version 4 of CLR that is used. If you test Environment.Version in Visual Studio "14" CTPs you will get:
4.0.30319.35317
With code:
Console.WriteLine(Environment.Version);
Also if you look at Common Language Runtime (CLR) on MSDN you will find:
.Net Framework Version CLR Version
4.5 (including 4.5.1 and 4.5.2) 4

In order to have C# 6 you need:
VS 2013
Download C# 6 from Codeplex -Roslyn
VS 2013 runs on .NET 4.5.1 so I guess the answer to your Question is 4.5.1

Related

Is .Net Framework 4.8 compatible with Visual Studio 2017

I am looking to see if there are any official mentions about .NET Framework 4.8 being compatible with Visual Studio 2017.
I can see that there is backwards compatibility between applications built with .Net Framework 4.8 to 4.5 as noted here but on the other side, looking at Visual Studio 2017 Support for .NET Development I don't see 4.8 being mentioned.
Installing it locally and checking, it looks like .Net Framework 4.8 is compatible to Visual Studio 2017, but I am still looking for a more official resource confirming that it is safe to use them together for development.
Yes, it's compatible.
Visual Studio 2017 was released before .NET Framework 4.8, so it makes sense that the original documentation of Visual Studio 2017 does not mention .NET Framework 4.8. In particular, the document you linked to mentions "05/31/2018" as its modification date, which is also before .NET Framework 4.8 was released (18 April 2019).
According to Microsoft's official "What's new in .NET Framework" page, .NET Framework 4.8 can be used in Visual Studio 2012 and higher:
You can target .NET Framework 4.8 in Visual Studio 2012 or later by installing the .NET Framework 4.8 Developer Pack.

VS2010 project in VS2012 - different version of .net 4?

I have read that opening a vs2010 project in vs2012 is fine (as long as you are using VS2010 SP1) it will not update the project files and those on VS2010 SP1 will not have problems using it: http://visualstudiomagazine.com/articles/2012/03/01/more-power.aspx
However I have heard that the version of .net 4 is higher when using vs 2012 than with vs2010 (I don't mean .net 4.5 by the way). Is this correct and could it cause problems with a release on a development machine being tested against a different version of the .net 4 framework? It sounds a bit unlikely to me.
thanks
Adam
The answer is not simple. All the details can be found here
There are many different types of projects in VS, and some don't require upgrades, some are compatible but require upgrades, and some are simply not compatible. It depends on the project type.
Also, to answer your question about the .net versions, 4.5 is considered an "in place" upgrade. This means once you've installed 4.5, it replaces 4 completely. So, once you've installed 4.5 you use that any time you target 4.
Several bugs has been fixed with .NET 4.5, so suddenly you cannot reproduce bugs that people experience in live-environment (WinXP/Win2k3 - .NET 4.0), as your own machine that have VS2012 installed (.NET 4.5).
More Info If I target .net 4.0 but run on a machine that has .net 4.5 will .net 4.0 WPF bugs still be there?
More Info Make VS2012 not hide .NET 4.0 bugs when targeting .NET 4.0
More Info Support a .NET 4.0 Service Pack on Windows XP Supporting those .NET 4.0 Bugs Fixed in .NET 4.5

Microsoft Windows SDK for Windows 7 and .NET Framework 4 (ISO) is backward compatible?

On windows 7 if i install Microsoft Windows SDK for Windows 7 and .NET Framework 4 (ISO) is that enough to work with vs 2008 or should i install also 3.5 sdk ?
Quote from the Windows SDK for Windows 7 and .NET Framework 4 release notes:
.NET Framework: Create applications that target the .NET
Framework versions 2.0 (SP2) , 3.0
(SP2) , 3.5 (SP1), 4.
Visual Studio: Use the resources in this SDK with Visual Studio
versions 2005, 2008, and 2010,
including Express editions (not all
features work with all versions of
Visual Studio).
Thus yes, includes backwards compatibility into the lines described in the release notes.
When you install VS it will install the .NET framework it needs

Visual Studio 2008 support for new .NET 4

Will Visual Studio 2008 be supported by new .NET 4 from the get go?
I'm particularly interested in the System.Collections.Concurrent namespace and the parallel task library, which I would use immediately.
Is it worth upgrading to Visual Studio 2010 when it comes out?
No. VS2008 will not be able to target .NET 4.0:
[...] Visual Studio 2010 supports .NET 4 and earlier projects. Visual Studio 2008 supports .NET 3.5SP1 projects.
Source, comment posted by Polita Paulus
While you can't use .NET 4.0 itself from VS2008, if you're interested in the Parallel Extensions stuff, you could download the Reactive Framework (formerly LINQ to Rx) which I believe contains at least a lot of Parallel Extensions backported to .NET 3.5 SP1.
From the Release Notes, it includes:
System.Threading, backport of Parallel Extensions for .NET 4 to .NET 3.5 SP1
Task for executing asynchronous operations.
Concurrent Collections such as ConcurrentStack, ConcurentQueue ad ConcurrentDictionary.
PLINQ for writing parallel queries.
addition Threading operations such as Barrier,SpinLock and SpinWait.
If you want to know whether upgrading to VS 2010 will be worth it, then download beta 2 now, and try it out. Run it in a virtual machine if you don't trust it on a normal development machine. Run through some of the PDC videos showing the new features. Go through the Training Courses.
And above all, tell Microsoft what you think.
Historically - No.
Starting with 2008 the IDE has been able to target lower version frameworks, but I doubt they will ever target a newer version framework.

Visual Studio 2010 + .Net Framework 1.1 + Click Once Deployment

First of all, The Winform application is based on .Net Framework 1.1. I have 1.1 SDK installed but 1.1 is not listed in the Target Framework(VS 2010 Beta 2) so I cannot choose the same, the minimal available is 2.0. Am I supposed to install an add-on or something for building 1.1 apps in VS 2010 beta2. Further more, I am using a Clickonce deployment publish method. I am not sure if 1.1 supports ClickOnce deployment. Please advise on both these fronts. Thanks a Lot
.NET 1.x is not supported by VS2010 (or any future versions). You'll have to use VS2002 or VS2003 for that.
ClickOnce is only supported for .NET 2.0 or later.
.Net 1.1 isn't supported on VS 2010. I don't even thing it was supported on VS 2005 or 2008. I've always had a VS 2003 install in a VM for 1.1 maintenance stuff.
Here you can find a way to create your project in .net 1.1 with VS 2008. And I think this is last version of the VS you can use to create your projects in .net 1.1
If you have an application that uses e.g. an app pool using .Net 1.1, compiling for .Net 2.0 simply isn't an option.
You should just build your code with .NET 2.0, assuming there's some reason why you can't build it with .NET 3.5.

Resources