在C#中创建CLR(公共语言运行时)

时间:2017-04-10 19:01:55

标签: c# sql frameworks clr

我需要在Visual Studio 2015中使用C#创建CLR。该算法使用System.Web.Extensions .dll将字符串转换为JSON,使用JavaScriptSerializer()。Serialize(con)方法。当我想在数据库中添加一个新程序集时,它会抛出下一个错误:

CREATE ASSEMBLY for assembly 'System.Web' failed because assembly 
'System.Xaml' 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
    [ : System.Windows.Markup.ValueSerializer::CanConvertToString][mdToken=0x6000002][offset 0x00000000] Code size is zero.
    [ : System.Windows.Markup.ValueSerializer::CanConvertFromString][mdToken=0x6000003][offset 0x00000000] Code size is zero.
    [ : System.Windows.Markup.ValueSerializer::ConvertToString][mdToken=0x6000004][offset 0x00000000] Code size is zero.
    [ : System.Windows.Markup.ValueSerializer::ConvertFromString][mdToken=0x6000005][offset 0x00000000] Code size is zero.
    [ : System.Windows.Markup.ValueSerializer::TypeReferences][mdToken=0x6000006][offset 0x00000000] Code size is zero.
    [ : System.Windows.Markup.ValueSerializer::.cctor][mdToken=0x600000d][offset 0x00000000] Code size is zero.
    [ : System.Windows.Markup.ValueSerializer::.ctor][mdToken=0x6000001][offset 0x00000000] Code size is zero.
    [ : System.Windows.Markup.ValueSerializer::GetSerializerFor][mdToken=0x6000007][offset 0x00000000] Code size is zero.
    [ : System.Windows.Markup.ValueSerializer::GetSerializerFor][mdToken=0x6000008][offset 0x00000000] Code size is zero.
    [ : System.Windows.Markup.ValueSerializer::GetSerializerFor][mdToken=0x6000009][offset 0x00000000] Code size is zero.
    [ : System.Windows.Markup.ValueSerializer::GetSerializerFor][mdToken=0x600000a][offset 0x00000000] Code size is zero.
    [ : System.Windows.Markup.ValueSerializer::GetConvertToException][mdToken=0x600000b][offset 0x00000000] Code size is zero.
    [ : System.Windows.Markup.ValueSerializer::GetConvertFromException][mdToken=0x600000c][offset 0x00000000] Code size is zero.
    [ : System.Windows.Markup.MemberDefinition::.ctor][mdToken=0x6000010][offset 0x00000000] Code size is zero.
    [ : System.Windows.Markup.PropertyDefinition::get_Name][mdToken=0x6000011][offset 0x00000000] Code size is ze...

我不明白是什么问题,我没有使用Sysmtem.Xaml .dll

我正在使用Visual Studio和SQL Server 2012中的Framework 4.0,它也有框架4.0。

谢谢!

0 个答案:

没有答案