GoldMeridian.NativeAssets
1.0.0
dotnet add package GoldMeridian.NativeAssets --version 1.0.0
NuGet\Install-Package GoldMeridian.NativeAssets -Version 1.0.0
<PackageReference Include="GoldMeridian.NativeAssets" Version="1.0.0" />
<PackageVersion Include="GoldMeridian.NativeAssets" Version="1.0.0" />
<PackageReference Include="GoldMeridian.NativeAssets" />
paket add GoldMeridian.NativeAssets --version 1.0.0
#r "nuget: GoldMeridian.NativeAssets, 1.0.0"
#:package GoldMeridian.NativeAssets@1.0.0
#addin nuget:?package=GoldMeridian.NativeAssets&version=1.0.0
#tool nuget:?package=GoldMeridian.NativeAssets&version=1.0.0
native-assets
Enables NuGet-like, automatic, RID-based native library loading for project references in MSBuild.
Adds native assets from project references to .NET's dependency manifest for automatic, RID-based library loading.
Usage
Install the package in the project containing native files and include them in the NativeAsset item:
<ItemGroup>
<PackageReference Include="GoldMeridian.NativeAssets" Version="1.0.0"/>
<NativeAsset Include="runtimes\*\native\*"/>
</ItemGroup>
It's easiest to keep files under runtimes/<rid>/native/ so that you don't need to manually remap them at build time.
To create an additional output name (e.g., for a versioned library), you can add an alias during build:
<NativeAsset Update="runtimes\*\native\*.so.0" Alias="%(Filename)"/>
<NativeAsset Update="runtimes\*\native\*.0.dylib"
Alias="$([System.String]::Copy('%(Filename)').Replace('.0', '')).dylib"/>
Aliasing the native asset, as demonstrated here, means it will be copied to the output with both the original file name and the new, aliased name.
The file name and RID can also be manually overridden:
<NativeAsset Include="vendor\windows\helper.dll"
Rid="win-x64"/>
<NativeAsset Include="runtimes\linux-x64\native\libFAudio.so.0"
NativeFileName="libFAudio.so"/>
<NativeAsset Include="vendor\audio\linux-release.bin"
Rid="linux-x64" NativeFileName="libFAudio.so"/>
Doing so will not produce duplicate files.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 56 | 11/17/2026 |