✅ How to copy an EXE from a NuGet package in SDK-style project with PackageReference?
In the old msbuild format, I was including a nuget package that distributed an EXE file among other things. In the Content include, we referenced back to the exe using relative pathing ..\packages\my.exe and used Link to place it in the build output. How do I do that in PackageReference world?
This is my old msbuild-style project content include where it worked
It copied the EXE file to the bin directory, where I want it
packages.config
However, now, it's in SDK-style format and I can't figure out how to include it.
How should I solve this?
1 Reply
@jcotton42 found the answer!! https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#generatepathproperty
NuGet PackageReference in project files
Details on NuGet PackageReference in project files as supported by NuGet 4.0+ and VS2017 and .NET Core 2.0