0

Possible Duplicate:
Can I use .NET 4.0 beta in Visual Studio 2008?

I have VS 2008 professional, and yesterday installed .net 4.0 Beta 1 (without vs2010). I want to try parallel Fx lib, but I don't know how to add .net 4.0 references. It is possible to use 4.0 version without visual studio 2010?

Community
  • 1
  • 1
ksopyla
  • 483
  • 6
  • 14
  • 2
    Dupe of: http://stackoverflow.com/questions/998090/can-i-use-net-4-0-beta-in-visual-studio-2008 – Matthew Jones Jul 30 '09 at 20:10
  • Not a dupe. You can use .NET 4.0 without installing VS2010, but you can't use C# 4 from VS2008. They're different problems. – Jon Skeet Jul 30 '09 at 20:16
  • The question I linked to explicitly says .NET 4.0, not C# 4.0. There is a question about C# 4.0 and VS2008, it is just not the one I linked to. – Matthew Jones Jul 30 '09 at 20:19
  • Sorry, my bad expression of it: you can use .NET 4.0 without installing VS2010, but you can't use .NET 4 from VS2008. So the answer to the exact question expressed here in the last sentence if "yes" - but it sounds like ksirg didn't really mean to ask that question... – Jon Skeet Jul 30 '09 at 20:43

3 Answers3

0

You should be able to use it from the command line, yes.

I seem to remember that a lot of Parallel Extensions is now in mscorlib or System.Core, so you probably don't need to add any references...

For example, this just compiled without anything else:

using System;
using System.Threading.Tasks;

public class Test
{
    static void Main()
    {
        Task<int> task = Task.Factory.StartNew(() => 10);
        Console.WriteLine(task.Result);
    }
}
Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
0

Look at:

Can I use .NET 4.0 beta in Visual Studio 2008?

Community
  • 1
  • 1
xdevel2000
  • 20,780
  • 41
  • 129
  • 196
  • Where did he say he wanted to use VS2008? – Jon Skeet Jul 30 '09 at 20:12
  • 1
    His first five words. "I have VS 2008 professional." – Matthew Jones Jul 30 '09 at 20:13
  • That says he *has* it. It doesn't say he wants to use it to try .NET 4.0 :) (To be fair, I had completely failed to spot that first time. Was it edited in, or am I just being silly?) Anyway, he can certainly use the command line tools. – Jon Skeet Jul 30 '09 at 20:16
  • Yes I want use .net 4.0 with vs 2008 and this post http://stackoverflow.com/questions/998090/can-i-use-net-4-0-beta-in-visual-studio-2008 say everything I wanted to know ;) – ksopyla Jul 30 '09 at 20:21
  • Fair enough then. I'll just sit here looking stupid then :) It isn't the first time and it won't be the last... – Jon Skeet Jul 30 '09 at 20:41
0

You can use the compilers (like csc.exe or vbc.exe) directly. They should be installed at: C:\Windows\Microsoft.NET\Framework\v4.0 or something close to that.

But if you want to do 4.0 development in Visual Studio, you'll probably need to install VS 2010.

C. Dragon 76
  • 9,882
  • 9
  • 34
  • 41