Running .net 3.5 in Sharepoint? Yes indeed!

18 09 2008

One of these days I faced a question from a client that wanted to use the latest Enterprise Library 4 on Sharepoint development. Well, its .net 3.5 and Sharepoint is 2.0, but.. You now are surelly thinking: but the core of these two releases is the same, so it should be possible. Right you are!

So, what do you need to do to allow this? Well, config your applicatio ūüôā

First you need to add the .net 3.5 assemblies:

<assemblies>
<add assembly=”Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” />
<add assembly=”System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089″ />
<add assembly=”System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089″ />
</assemblies>
 

 and then, you need to configure the compiler, adding the codedom to the end of your <configuration></configuration> section:

<system.codedom>
<compilers>
<compiler language=”c#;cs;csharp” extension=”.cs” warningLevel=”4″
¬†¬†¬†¬†¬†¬†¬†¬†¬† type=”Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0,
¬†¬†¬†¬†¬†¬†¬†¬†¬† Culture=neutral, PublicKeyToken=b77a5c561934e089″
>
<providerOption name=”CompilerVersion” value=”v3.5″ />
<providerOption name=”WarnAsError” value=”false” />
</compiler>
</compilers>
</system.codedom>
 

And there you go. You are now able to run yoour .net 3.5 assemblies in your MOSS/WSS3 site .

Advertisements

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: