Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Problem with SQLCLR in VS 2012 / Net 4.5 Expand / Collapse
Author
Message
Posted Sunday, May 5, 2013 3:13 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, May 7, 2013 12:45 PM
Points: 3, Visits: 8
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 .. :)

Post #1449544
Posted Monday, May 6, 2013 11:42 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, June 27, 2014 5:59 AM
Points: 7,079, Visits: 12,567
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
Post #1449820
Posted Monday, May 6, 2013 4:26 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, May 7, 2013 12:45 PM
Points: 3, Visits: 8
Yes,but I am using Sql 2008R2 ?
Post #1449926
Posted Monday, May 6, 2013 4:29 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 6:31 PM
Points: 22,880, Visits: 31,282
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.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1449928
Posted Monday, May 6, 2013 5:14 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, May 7, 2013 12:45 PM
Points: 3, Visits: 8
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 ... ?????

And thank you ....
Post #1449936
Posted Wednesday, June 12, 2013 9:23 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, June 20, 2014 8:46 AM
Points: 33, Visits: 147
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
Post #1462693
Posted Wednesday, June 12, 2013 9:33 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, June 27, 2014 5:59 AM
Points: 7,079, Visits: 12,567
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
Post #1462698
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse