views:

769

answers:

4

I'm on a team that's currently building a MOSS 2007 based application (which relies on .NET 2), and we'd like to leverage the Entity Framework v4 (which relies on .NET 4).

Is this possible?

+3  A: 

Although I haven't tried, my guess is that it's not possible. In order to use .net 4.0 assemblies, the apppool running your moss site would have to be upgraded to the 4.0 version of asp.net. After that, version of system.web and other assemblies will change and I think that moss will simply stop working. But hey, it's just my guess. You can always try it out.

klausbyskov
+1  A: 

No. Even SharePoint 2010 is based on ASP.NET 3.5

IrishChieftain
+5  A: 

The 4.0 version of .Net has a new CLR etc.

Even SP2010 does not support .net 4.0 (yet).

Colin
+1 on the 'yet' ;)
F.Aquino
It's bound to happen seeing as VS2010 is going to be the main dev yool for sharepoint. It might take a service pack though :-D.
Colin
As it's a new CLR, I'm willing to say that SP2010 will never support it.
Michael Stum
What's your reason for saying it will never be supported? SP2010 is in beta 1 right now.
John Saunders
They only way see this actually working, IMO, is to have a 4.0 pool run mss2010 (and that is ALOT of backwards compat-sauce) as said by klaus
F.Aquino
Exactly, it's in Beta, so I doubt that they'll change it over to .net 4.0 CLR. Keep in mind that if they make a change like that, they have to test each and every part for compatibility. It's not just "recompile and ship", but it's to make sure there are no breaking changes. With a codebase that size, I believe that this is not going to happen. Adding .net 4 Support with a Service Pack could break their customers custom solution, and enterprise products don't do that usually. So I don't think we'll see .net 4 support in SP2010 ever.
Michael Stum
A: 

I don't know why people are saying here that it is impossible. If you install .net framework 4.0 on your SharePoint server you will be able to acces the runtime of .net 4.0 to use it in your own code. Of course, the SharePoint code itself will still be running under 2.0, but 4.0 is just an extension of 2.0.

At this moment it's possible to use 3.5 code on your SharePoint 2007 server to use AJAX, so I don't see why 4.0 should be a problem.

KoenVosters
.NET 2/3/3.5 all ran on the same CLR. .NET 4 has a new CLR, which makes it different.
mattblodgett
I wasn't aware that there will be a new CLR, thanks for clarifying that.
KoenVosters