GoldMeridian.NativeAssets 1.0.0

dotnet add package GoldMeridian.NativeAssets --version 1.0.0
                    
NuGet\Install-Package GoldMeridian.NativeAssets -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GoldMeridian.NativeAssets" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GoldMeridian.NativeAssets" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="GoldMeridian.NativeAssets" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GoldMeridian.NativeAssets --version 1.0.0
                    
#r "nuget: GoldMeridian.NativeAssets, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package GoldMeridian.NativeAssets@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GoldMeridian.NativeAssets&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=GoldMeridian.NativeAssets&version=1.0.0
                    
Install as a Cake Tool

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.

There are no supported framework assets in this package.

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