Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Copy nuget package content file (of type .exe) to output directory of project using that nuget package

$
0
0

I have some project which has some exe as "dependency" and I build that project as nuget package from .csproj file

File looks like this:

<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><Nullable>enable</Nullable><LangVersion>latest</LangVersion><Version>1.1.2</Version><PackageId>MyLib</PackageId><Authors>me</Authors><Company>me</Company></PropertyGroup><ItemGroup><None Remove="CliInterface\32BitInterface.exe" /></ItemGroup><ItemGroup><Content Include="CliInterface\32BitInterface.exe"><CopyToOutputDirectory>Always</CopyToOutputDirectory></Content></ItemGroup><ItemGroup><PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0"><PrivateAssets>analyzers;build</PrivateAssets><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets></PackageReference></ItemGroup></Project>

When I use that nuget package inside some other solution I can see file is thereenter image description here

However it is not copyed to output folder.In fact, to be correct it is when I run Build project from Visual Studio, but I use dotnet build command in my CI/CD environment and it is not copied to output when I run that command.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>