location of exe file in nuget package and matching file tag in nuspec

  Uncategorised

Currently I am manually creating a nuget directory structure, nuspec and pack it with the commandline (nuget.exe).

My problem is an exe file that is intended to be added to the output directory of projects referencing it. The exe is a plug-in loader and the referencing project is the plug-in. When the plug-in is defined as start project the exe should be started.

I just can’t get it working that the exe from the nuget is placed into the output directory.

The exe is placed under contentFiles/any/net5.0/the.exe

The nuspec contains the following tag

<contentFiles>
  <files include="any/net5.0/the.exe" buildAction="None" copyToOutput="true" />
</contentFiles>

If I define BuildAction as Content the compiler complains it’s a binary instead of a text file (CS2015)

Any idea what would work?

Source: Visual Studio Questions

LEAVE A COMMENT