You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NuGet product used:
MSBuild v15.1.1012.6693 with Pack target.
NuGet version:
Whatever version is included in VS2017 with the MSBuild version designated above. If this is important, let me know how I can get this version number.
dotnet.exe --version:
N/A
VS version:
15.1 (26403.3)
OS version (i.e. win10 v1607 (14393.321)):
win10 v1703 15165.1002
Worked before? If so, with which NuGet version:
Yes, 4.0.0.2283, when using nuget pack on a nuspec file with the same inclusions (<file src="bin\$configuration$\**\*" target="tools" />).
Detailed repro steps so we can see the same problem
In Visual Studio 2017, create a csproj which produces an executable.
Include a NuGet package and reference it in some way in the code.
Ensure that <TargetFrameworks>net452</TargetFrameworks> is set in the csproj.
Ensure that <IsTool>True</IsTool> is set in the csproj.
Since library references (DLLs from NuGets) required for the project are not included, add:
Run from VS2017 Developer Command Prompt: msbuild /t:Pack MyProject.csproj
The console will output a bunch of warnings such as:
warning : Description: The assembly 'tools/Newtonsoft.Json.dll' is not inside the 'lib' folder and hence it won't be added as reference when the package is installed into a project.
While, yes, the warning is accurate (unlike in #5019), this is not an issue when packing nuspec files. As mentioned above, using the nuspec block <file src="bin\$configuration$\**\*" target="tools" /> performs the desired behavior without throwing warnings during nuget pack.
Related issue: #5019
Details about Problem
NuGet product used:
MSBuild v15.1.1012.6693 with
Pack
target.NuGet version:
Whatever version is included in VS2017 with the MSBuild version designated above. If this is important, let me know how I can get this version number.
dotnet.exe --version
:N/A
VS version:
15.1 (26403.3)
OS version (i.e. win10 v1607 (14393.321)):
win10 v1703 15165.1002
Worked before? If so, with which NuGet version:
Yes, 4.0.0.2283, when using
nuget pack
on anuspec
file with the same inclusions (<file src="bin\$configuration$\**\*" target="tools" />
).Detailed repro steps so we can see the same problem
csproj
which produces an executable.<TargetFrameworks>net452</TargetFrameworks>
is set in thecsproj
.<IsTool>True</IsTool>
is set in thecsproj
.msbuild /t:Pack MyProject.csproj
The console will output a bunch of warnings such as:
While, yes, the warning is accurate (unlike in #5019), this is not an issue when packing
nuspec
files. As mentioned above, using thenuspec
block<file src="bin\$configuration$\**\*" target="tools" />
performs the desired behavior without throwing warnings duringnuget pack
.Other suggested things
Verbose Logs
https://pastebin.com/cMGs8J1Q
Sample Project
https://drive.google.com/open?id=0B8JHaidj6UhEaTdPSDFfLWM1OVk
The text was updated successfully, but these errors were encountered: