Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong TargetPath whit nuget pack cli command #5923

Closed
waldo2188 opened this issue Sep 22, 2017 · 2 comments
Closed

Wrong TargetPath whit nuget pack cli command #5923

waldo2188 opened this issue Sep 22, 2017 · 2 comments

Comments

@waldo2188
Copy link

Details about Problem

NuGet product used : NuGet.exe
NuGet version (4.3.0.4406):
dotnet.exe version: 2.1.0-preview1-007197
VS: 2017 Professional
OS version: win10 v1703 15063.608

I have an issue when I try to pack a project with nuget cli command nuget pack. The project I try to pack is an Asp .Net Core 1.1 project.
At the end of the process Nuget write in the console that he can’t find a file. But, by the way, he generates the right nupkg. I don’t know if it’s a bug or a misunderstood of the use of nuget cli.

Detailed repro steps so we can see the same problem

You can reproduce this bug :

git clone [email protected]:GestionSystemesTelecom/fake-authentication-jwtbearer.git
cd fake-authentication-jwtbearer
dotnet restore ./src/GST.Fake.Authentication.JwtBearer/GST.Fake.Authentication.JwtBearer.csproj
nuget pack ./src/GST.Fake.Authentication.JwtBearer/GST.Fake.Authentication.JwtBearer.csproj -Build -Symbols -Properties "Configuration=Release;Platform=AnyCPU;OutputPath=../../Package" -ForceEnglishOutput -Verbosity detailed

Other suggested things

Verbose Logs

La génération a réussi.
    0 Avertissement(s)
    0 Erreur(s)

Temps écoulé 00:00:03.12
Packing files from 'C:\projets\GST.Fake.Authentication.JwtBearer\Package\GST.Fake.Authentication.JwtBearer\bin\Release'.
Could not find a part of the path 'C:\projets\GST.Fake.Authentication.JwtBearer\Package\GST.Fake.Authentication.JwtBearer\bin\Release'.
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\projets\GST.Fake.Authentication.JwtBearer\Package\GST.Fake.Authentication.JwtBearer\bin\Release'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.Directory.EnumerateFiles(String path, String searchPattern, SearchOption searchOption)
   at NuGet.CommandLine.ProjectFactory.GetFiles(String path, ISet`1 fileNames, SearchOption searchOption)
   at NuGet.CommandLine.ProjectFactory.AddOutputFiles(PackageBuilder builder)
   at NuGet.CommandLine.ProjectFactory.CreateBuilder(String basePath, NuGetVersion version, String suffix, Boolean buildIfNeeded, PackageBuilder builder)
   at NuGet.Commands.PackCommandRunner.BuildFromProjectFile(String path)
   at NuGet.CommandLine.PackCommand.ExecuteCommand()
   at NuGet.CommandLine.Command.ExecuteCommandAsync()
   at NuGet.CommandLine.Command.Execute()
   at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)
@rohit21agrawal
Copy link
Contributor

@waldo2188 nuget.exe does not have support to pack NETCore projects. (Tracking issue : #5918 ).

Please use msbuild /t:pack or dotnet.exe to pack a NETCore project.

@waldo2188
Copy link
Author

Ok, I close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants