none
.NET 4.0 deploy to sql server 200 8R2 RRS feed

  • Question

  • Hi,

    I have a Windows 7 platform with SQL Server 2008 R2, VS2010, .NET4.0.

    When I deploy my stored procedure to SQL, i get the error:

    Deploy error SQL01268: .Net SqlClient Data Provider: Msg 6257, Level 16, State 1, Line 1 CREATE ASSEMBLY for assembly 'vciPointDataWriteCS' failed because the assembly is built for an unsupported version of the Common Language Runtime.

     

    Simple solution is to regress the build to .NET 3.5, but what do I need to do to have SQL 2008 recognize a 4.0 assembly?

     

    Boyd


    BDM
    Friday, March 4, 2011 2:13 PM

Answers

  • SQL Server 2008 R2 doesn't support .NET 4.0 regardless of the configuration flags attempted. The next version of SQL Server ("Denali") may support .NET 4.0 in future, but Denali CTP1 does not.

    Cheers, Bob Beauchemin, SQLskills

    • Marked as answer by Boyd1 Tuesday, March 8, 2011 8:39 PM
    Tuesday, March 8, 2011 7:45 PM
    Moderator

All replies

  • I don't think you can load .NET 4.0 in SQL Server 2008. Here's some explanation: http://blogs.msdn.com/b/dohollan/archive/2010/07/08/sql-server-2008-r2-sqlclr-net-framework-version.aspx

    -Karel

    Saturday, March 5, 2011 9:19 PM
  • SQL Server 2008 R2 doesn't support .NET 4.0 regardless of the configuration flags attempted. The next version of SQL Server ("Denali") may support .NET 4.0 in future, but Denali CTP1 does not.

    Cheers, Bob Beauchemin, SQLskills

    • Marked as answer by Boyd1 Tuesday, March 8, 2011 8:39 PM
    Tuesday, March 8, 2011 7:45 PM
    Moderator
  • I have the same problem here...

    It also appears when you try to add a .NET assembly to SQL Server database.

    The latest version of .NET that it does support is 3.5.

    I rebuilt by assembly and it managed to add it. I had to redisign my code a little bit since I used extension methods etc. but I guess that is the price you have to pay to use this feature when you have to use this feature

     

    Regards,

     

    Bojan Skrchevski


    Thursday, October 20, 2011 9:19 AM