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

change output directory of nuget package

$
0
0

I created a NuGet package from my project. The output directory of the package is the solution directory. I would like to output it to a specific directory. I tried a target in the csproj file and in the nuspec file. None worked. How do I get the package generated in the specified folder?

In my .csproj:

<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"><PropertyGroup><ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText></PropertyGroup><Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" /></Target>

In my .nuspec:

<?xml version="1.0"?><package ><metadata><id>MyPackage.dll</id><version>1.0.0</version><authors>me</authors><owners>me</owners><requireLicenseAcceptance>false</requireLicenseAcceptance><description>Package description</description><releaseNotes>Summary of changes made in this release of the package.</releaseNotes><copyright>Copyright 2016</copyright><files><file src="bin\MyPackage.dll" target="C:\LocalPackageRepository" /></files></metadata></package>

Viewing all articles
Browse latest Browse all 3067

Trending Articles



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