I have a large EXE that my project needs, but I don't want to commit large EXEs into Git. So, seems to me a viable option is to pull it in through NuGet. Easy enough, I created a .nuspec file with my one EXE in it:
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Traefik</id>
<version>1.5.1</version>
<authors>Containous</authors>
<owners>MikeC</owners>
<projectUrl>https://github.com/containous/traefik</projectUrl>
<license type="expression">MIT</license>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Traefik binaries</description>
<copyright>Copyright ©2020 Containous</copyright>
</metadata>
<files>
<file src="traefik.exe" target="lib" />
</files>
</package>
I then run nuget pack
and create a .nupkg
file. Everything is correct:
However, when I try to reference my NuGet package in my project, I get the following error right when clicking the "Install" button:
Severity Code Description Project File Line Suppression State
Error Could not install package 'Traefik 1.5.1'. You are trying to install this package into a project that targets 'Unsupported,Version=v0.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
This is a NuGet package that has no assemblies and nothing to reference. It's simply content I want to pull in and copy somewhere using a post build action. Is it possible to create a NuGet package that has no assemblies to reference and is purely content (in this case, a single EXE file)? If so, what's the correct way to lay this out in the file structure? I've tried putting the EXE in a few places, such as "bin", "tools", "content", etc. Same error no matter what. Thanks!