Asp.net core 什么';Windows和Linux上的dnxcore50有什么区别?

Asp.net core 什么';Windows和Linux上的dnxcore50有什么区别?,asp.net-core,Asp.net Core,在Windows上运行时,它看起来像是在dnxcore50中定义的System.Data.SqlClient,但在Linux上没有定义 他们不都是吗 例如,一个以dnxcore50 beta7或beta8为目标,并引用System.Data.SqlClient的应用程序将在Windows中正常构建和运行,但在Linux上仅编译为在执行时抛出此运行时错误 An unhandled exception has occurred: Could not load file or assembly 'S

在Windows上运行时,它看起来像是在dnxcore50中定义的
System.Data.SqlClient
,但在Linux上没有定义

他们不都是吗

例如,一个以dnxcore50 beta7或beta8为目标,并引用
System.Data.SqlClient
的应用程序将在Windows中正常构建和运行,但在Linux上仅编译为在执行时抛出此运行时错误

An unhandled exception has occurred: Could not load file or assembly 
'System.Data.SqlClient, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. 
The system cannot find the file specified.

使用ASP.NET 5 RC1,
SqlClient
现在是跨平台的,因此您也可以从Linux和Mac查询Microsoft SQL Server

更多信息请参见下面的发行说明(查找跨平台SQL客户端)


虽然这可以推断SQL客户端以前在Linux/Mac上不可用的原因,但它不能回答dnxcore50在每个平台上的差异。在beta7和beta8的Windows上是如何工作的?是同一个SQL客户端库,但仅支持windows,还是dnxcore50指向windows上的现有库?是的,是同一个SQL客户端库,仅支持windows。当框架为dnxcore50时,您不能在Windows上使用已安装的程序集,例如,我想您指的是GAC。