C# 在Linux-CORECRL-rc1下使用System.Data.SqlClient

C# 在Linux-CORECRL-rc1下使用System.Data.SqlClient,c#,.net,linux,coreclr,C#,.net,Linux,Coreclr,我有一个小样本项目()。 它在Windows上运行良好(dnx-CORECRL-win-x64.1.0.0-rc1-15838运行时)。但如果我在Ubuntu(dnx-CORECRL-linux-x64.1.0.0-rc1-15838)上运行它,它会出现以下异常。可能有问题吗 System.IO.FileNotFoundException:无法加载文件或程序集'System.Data.SqlClient,版本=4.0.0,区域性=neutral,PublicKeyToken=b03f5f7f11

我有一个小样本项目()。 它在Windows上运行良好(dnx-CORECRL-win-x64.1.0.0-rc1-15838运行时)。但如果我在Ubuntu(dnx-CORECRL-linux-x64.1.0.0-rc1-15838)上运行它,它会出现以下异常。可能有问题吗

System.IO.FileNotFoundException:无法加载文件或程序集'System.Data.SqlClient,版本=4.0.0,区域性=neutral,PublicKeyToken=b03f5f7f11d50a3a'或其依赖项之一。系统找不到指定的文件


您应该将此引用添加到project.json “System.Data.SqlClient”:“4.0.0-beta-23516”

File name: 'System.Data.SqlClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ---> System.IO.FileNotFoundException: Could not load the specified file.
File name: 'System.Data.SqlClient'
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
at ConsoleApp3.Program.Main(String[] args)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider)
at Microsoft.Dnx.ApplicationHost.Program.ExecuteMain(DefaultHost host, String applicationName, String[] args)
at Microsoft.Dnx.ApplicationHost.Program.Main(String[] args)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider)
at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env, String appBase, FrameworkName targetFramework)
at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, BootstrapperContext bootstrapperContext)
at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, BootstrapperContext bootstrapperContext)
System.IO.FileNotFoundException: Could not load the specified file.
File name: 'System.Data.SqlClient'
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)