SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Problem with SQLCLR in VS 2012 / Net 4.5


Problem with SQLCLR in VS 2012 / Net 4.5

Author
Message
jordanovskibojan 74807
jordanovskibojan 74807
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 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 .. Smile
Orlando Colamatteo
Orlando Colamatteo
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14871 Visits: 14396
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 .. Smile


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
jordanovskibojan 74807
jordanovskibojan 74807
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 Visits: 8
Yes,but I am using Sql 2008R2 ?
Lynn Pettis
Lynn Pettis
SSC-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39083 Visits: 38518
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.

Cool
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)
jordanovskibojan 74807
jordanovskibojan 74807
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 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 ... Doze ?????

And thank you ....
g_demetriou
g_demetriou
SSC Journeyman
SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)

Group: General Forum Members
Points: 86 Visits: 183
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
Orlando Colamatteo
Orlando Colamatteo
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14871 Visits: 14396
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search