SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 2 down vote accepted

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)

share|improve this answer

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

share|improve this answer

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:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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