views:

112

answers:

2

Currently I am developing Web Parts for MOSS 2007 using .NET 2.0 and deploying them to the GAC with WSPBuilder. I would like to move to .NET 3.5 to open up things like LINQ and WCF.

Is this possible and will there be any significant changes required to MOSS to support doing so?

+2  A: 

I haven't done it myself but Tobias Zimmergren posted a guide on his blog: http://www.zimmergren.net/archive/2008/09/22/how-to-get-up-and-running-with-net-3-5-in-your-sharepoint-environment.aspx

Mike
+2  A: 

Yes. I do it all the time.

Just make sure the target machine has .NET 3.5 and you're "good-to-go". (The same run-time can host .NET2-3.5 as they use the same underlying "engine".)

pst
Sounds good! Is there any more I will need to do? Mike's link plus other research I have done seems to indicate that changes to the web.config file are needed.
I run "vanilla" MOSS 2007 -- works like a champ; but following said instructions may handle cases I've never had to deal with :-) Happy coding.
pst
Thanks for your help. I will give it a try and if it works I will come back to accept your answer.
I think the difference is in having .NET 3.5 installed on the machine, versus running an app under it. pst - have you tried to execute a LINQ query in an event receiver or webpart? As a .NET 3.5 feature, it may not work. As an experiment, try creating a .NET 3.0 ASP.NET app then create a .NET 3.5 app and compare the web.configs with WinMerge or similar and check for any differences.
Mike
@Mike I use LINQ inside a few WebParts, SP WorkFlows and an Activation Event Receiver. It works well in those particular cases -- but I'm not sure exactly what .NET SP/ASP.NET is "binding" to ^^ I suspect this would be a different story trying to get up .NET 4 code...
pst
@pst Interesting. The workflows I can understand (as long as they're not SP Designer ones) as they run out of the w3wp process. I'd have thought that webpart and event receiver code would have been problematic. I'll have to experiment some more.
Mike