Reputation: 30324
I have a .NET Core library -- .NET Core 1.1 app -- and wanted to install the SQL Server client. I get the following screen in NuGet.
What are these runtime natives? I really want to keep the app nice and clean by sticking to only .NET Core and not mix and match .NET Core with .NET Framework.
Any idea what these runtime natives are? Will they affect the app's portability to say Linux or MacOS?
Upvotes: 1
Views: 297
Reputation: 382
You are adding the NuGet PackageReference from Visual Studio, that's why you're seeing those runtime native libraries being installed.
What's really happening in the background is:
<PackageReference Include="System.Data.SqlClient" Version="4.3.0" />
is being added to the .csproj file;dotnet restore
command is being run, which determines your current runtime and restores the dependencies according to that.So when you're referencing System.Data.SqlClient
the restore command restores the it's dependencies according to your current runtime, which is Windows.
Answering your question: it won't affect portability because if the restore is made with a different target runtime (eg. osx.10.12-x64
) it will bring down the runtime natives specific to that.
Upvotes: 1