Paulo Morgado

.NET Development & Architecture

Recent Articles

view all

Events

Projects

Recent Readers

Visitor Locations

Visitor Locations

Disclaimer

The opinions and viewpoints expressed in this site are mine and do not necessarily reflect those of Microsoft, my employer or any community that I belong to. Any code or opinions are offered as is. Products or services mentioned are purchased by me, made available to me by my employer or the manufacturer/vendor which doesn't influence my opinion in any way.

Playing With SQL Server CLR Integration – Part III

You might have noticed that I used LINQ in my last Playing With SQL Server CLR Integration posts (Part I, Part II).

I couldn’t make it work with the standard Visual Studio 2008 SQL CLR project template. Changing the Target Framework to .NET Framework 3.5 wasn’t enough. I had to edit the .csproj file by hand:

<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <!— ... -->

<ItemGroup> <!— ... --> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Xml.Linq"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <!— ... --> </Project>

Comments

Iftekhar Ahmed Amit said:

Paulo, Is this the Part IV or III??

Check your post's url & tittle!

# June 13, 2009 3:47 AM

DotNetShoutout said:

Thank you for submitting this cool story - Trackback from DotNetShoutout

# June 13, 2009 3:48 AM

Paulo Morgado said:

Thanks for the notice, Iftejhar.

# June 13, 2009 4:30 AM

Jason Short said:

I see a problem coming for you though (deployment).  The fact that you had to go edit the csproj file by hand should have been a hint that maybe you were doing something unintended?

# June 15, 2009 12:11 AM

Paulo Morgado said:

Hi Jason,

It wasn't a problem with SQL Server 2008.

SQL Server 2005 needs some extra work though:

weblogs.asp.net/.../playing-with-sql-server-clr-integration-part-iv-deploying-to-sql-server-2005.aspx

# June 15, 2009 3:59 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)