Problem with SQLCLR in VS 2012 / Net 4.5

  • Hello guys,

    I have problem that I can't resolve ..

    I want to make simple store procedure using .net 4.5 and I cant deploy my project ..

    I have 3 projects in my solution,and one of them is Sql_Clr (Sql Server Database Project) which can't deploy.. I can build solution,but when I click deploy nothing happens..

    In net 3.5 everything was fine...

    Otherwise,when I try to create assembly in SQL 2008R2 like this:

    create assembly Sql_Clr

    from

    'F:\IS-AutoSkola\Sql_Clr\bin\Debug\Sql_Clr.dll'

    with permission_set = unsafe

    Go

    it shows me an error:

    CREATE ASSEMBLY for assembly 'Sql_Clr' failed because assembly 'Sql_Clr' failed verification.

    Check if the referenced assemblies are up-to-date and trusted (for external_access or unsafe) to execute in the database.

    CLR Verifier error messages if any will follow this message

    Any help is appreciated .. 🙂

  • jordanovskibojan 74807 (5/5/2013)


    Hello guys,

    I have problem that I can't resolve ..

    I want to make simple store procedure using .net 4.5 and I cant deploy my project ..

    I have 3 projects in my solution,and one of them is Sql_Clr (Sql Server Database Project) which can't deploy.. I can build solution,but when I click deploy nothing happens..

    In net 3.5 everything was fine...

    Otherwise,when I try to create assembly in SQL 2008R2 like this:

    create assembly Sql_Clr

    from

    'F:\IS-AutoSkola\Sql_Clr\bin\Debug\Sql_Clr.dll'

    with permission_set = unsafe

    Go

    it shows me an error:

    CREATE ASSEMBLY for assembly 'Sql_Clr' failed because assembly 'Sql_Clr' failed verification.

    Check if the referenced assemblies are up-to-date and trusted (for external_access or unsafe) to execute in the database.

    CLR Verifier error messages if any will follow this message

    Any help is appreciated .. 🙂

    SQL 2005 only supports CLR objects targeting the .NET 2.0 Runtime, i.e. built for .NET 2.0, 3.0 or 3.5 Framework.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Yes,but I am using Sql 2008R2 ?

  • jordanovskibojan 74807 (5/6/2013)


    Yes,but I am using Sql 2008R2 ?

    One, posted in a SQL Server 2005 forum and may not have seen you mention 2008 R2.

    Two, still applies to SQL Server 2008 and 2008 R2. .Net 4.0 isn't available in SQLCLR until SQL Server 2012.

  • Ok , but what about NET 4.5 ?? Is sql clr can be running in net 4.5, using Sql 2008 R2 or I need install 2012?

    Please,tell me to not waste my time anymore ... :doze: ?????

    And thank you ....

  • I think 2008 R2 is .NET 3.5, so you would need to go into your project properties and change the target framework to 3.5

  • 2008 R2 uses the 2.0 runtime. Framework version 3.5 is built atop the 2.0 runtime.

    2012 uses the 4.0 runtime.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply