Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storing to a static field results in error #55

Open
GoogleCodeExporter opened this issue Apr 5, 2015 · 0 comments
Open

Storing to a static field results in error #55

GoogleCodeExporter opened this issue Apr 5, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

When trying to create an assembly in SQL Server CLR, safe mode can not be used 
because an error is reported:

Msg 6212, Level 16, State 1, Line 1
CREATE ASSEMBLY failed because method 'get_StockExporters' on type 
'Jayrock.Json.Conversion.ExportContext'  in safe assembly 'Jayrock.Json' is 
storing to a static field. Storing to a static field is not allowed in safe 
assemblies.


What steps will reproduce the problem?
1. Try to create an assembly in SQL Server for Jayrock with the above command
2.
3.

What is the expected output? What do you see instead?
The assembly should be able to use safe mode

What version of the product are you using? On what operating system?
runtime version: v2.0.50727 - Windows Pro 7 - 64bit

Please provide any additional information below.
The assembly works if created with an unsafe permission. This will not be 
acceptable in production, however. 

Original issue reported on code.google.com by [email protected] on 6 Jan 2014 at 5:08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant