0

I'm creating a web part in Visual Studio 2008 that involves using the Open XML SDK 2.0. I'm getting an error saying I need to add a reference to the WindowsBase assembly.

However, I can only add this reference if I set the Target Framework for my web part project to be .NET Framework 3.5. If it is .NET Framework 2.0, the reference for WindowsBase is greyed out in the Add Reference window.

Will it cause me problems when I come to deploy the web part if it is targeted to .NET 3.5?

3 Answers 3

2

There really isn't a 3.5 .NET runtime. .NET 3.5 is the .NET 2.0 runtime + .NET 3.0 extensions (mostly WPF, WF, WCF) and .NET 3.5 extensions (mostly LINQ). If you properly setup your web.config to find the proper DLLs used for 3.5 you should be fine. Having said that I am not sure what the Open XML SDK is and if there are issues with SP 2007. We have used Web Parts under 2007 that utilize Linq to Sql (a 3.5 feature)

1

In VS, you can target 3.5 and it works fine as long as the updates are on the server.

1

You still need to convert the web.config of the SP2007 website, otherwise you still can't use any .NET 3.5 assembly. The easiest way to do this is described on Jan Tielen's weblog: http://weblogs.asp.net/jan/archive/2008/10/10/enabling-net-3-5-in-sharepoint-2007-sites-the-lazy-way.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.