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

nuget pack of xproj is defaulting to invalid target path #3060

Closed
CheloXL opened this Issue Jun 29, 2016 · 11 comments

Comments

Projects
None yet
5 participants
@CheloXL

CheloXL commented Jun 29, 2016

Using nuget.exe 3.5 beta 2.
On a simple .NETCore I run nuget spec, build the project, nuget pack, and I get
Attempting to build package from 'Disposable.xproj'. MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'. Unable to find '.\bin\Disposable\bin\Debug\'. Make sure the project has been built.

The path where the binaries are is 'bin\Release\netstandard1.6'. Not sure why is picking "Debug", as the project is on release build.

@rrelyea rrelyea added this to the 3.5 RTM milestone Jun 29, 2016

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Jun 29, 2016

Contributor

Unsure if this is inconsistent with a csproj?

Contributor

rrelyea commented Jun 29, 2016

Unsure if this is inconsistent with a csproj?

@rrelyea rrelyea changed the title from nuget pack unable to find directory to nuget pack of xproj is defaulting to debug - right behavior? Jun 29, 2016

@CheloXL

This comment has been minimized.

Show comment
Hide comment
@CheloXL

CheloXL Jun 29, 2016

@rrelyea Just a comment (as you changed the title): It's not only that it's defaulting to debug, but the folder where nuget tries to find the binaries is completely wrong.
Even building in debug mode, the correct path (to the debug .dlls) is bin\Debug\netstandard1.6

CheloXL commented Jun 29, 2016

@rrelyea Just a comment (as you changed the title): It's not only that it's defaulting to debug, but the folder where nuget tries to find the binaries is completely wrong.
Even building in debug mode, the correct path (to the debug .dlls) is bin\Debug\netstandard1.6

@jainaashish jainaashish self-assigned this Jun 30, 2016

@jainaashish

This comment has been minimized.

Show comment
Hide comment
@jainaashish

jainaashish Jul 5, 2016

Contributor

@CheloXL To workaround you can always use .nuspec file instead of .xproj and that will just work fine. Mean time we'll analyze it.

Contributor

jainaashish commented Jul 5, 2016

@CheloXL To workaround you can always use .nuspec file instead of .xproj and that will just work fine. Mean time we'll analyze it.

@CheloXL

This comment has been minimized.

Show comment
Hide comment
@CheloXL

CheloXL Jul 5, 2016

@jainaashish nuget pack disposable.nuspec gives me "Value cannot be null or an empty string. Parameter name: value"

CheloXL commented Jul 5, 2016

@jainaashish nuget pack disposable.nuspec gives me "Value cannot be null or an empty string. Parameter name: value"

@jainaashish

This comment has been minimized.

Show comment
Hide comment
@jainaashish

jainaashish Jul 5, 2016

Contributor

You need to update the .nuspec file and give values to metadata like id, version, title, etc...

Contributor

jainaashish commented Jul 5, 2016

You need to update the .nuspec file and give values to metadata like id, version, title, etc...

@CheloXL

This comment has been minimized.

Show comment
Hide comment
@CheloXL

CheloXL Jul 5, 2016

Ah, ok. A nicer/clearer error message would be also great...

CheloXL commented Jul 5, 2016

Ah, ok. A nicer/clearer error message would be also great...

@jainaashish

This comment has been minimized.

Show comment
Hide comment
@jainaashish

jainaashish Jul 5, 2016

Contributor

yeah, it's in pipeline to update error/ warning messages. And about picking 'Debug' then default configuration with MsBuild is Debug so it picks that. You can also change it to Release by passing -Properties Configuration=Release with Pack command and all these properties attributes are then passed into Msbuild.

You can also use project.json to create nupkg just like .nuspec... you would just need to add Authors n Description details in project.json

So there is no further action required here as of now. Let us know if you face any issue with .nuspec or project.json file.

Contributor

jainaashish commented Jul 5, 2016

yeah, it's in pipeline to update error/ warning messages. And about picking 'Debug' then default configuration with MsBuild is Debug so it picks that. You can also change it to Release by passing -Properties Configuration=Release with Pack command and all these properties attributes are then passed into Msbuild.

You can also use project.json to create nupkg just like .nuspec... you would just need to add Authors n Description details in project.json

So there is no further action required here as of now. Let us know if you face any issue with .nuspec or project.json file.

@CheloXL

This comment has been minimized.

Show comment
Hide comment
@CheloXL

CheloXL Jul 5, 2016

Excellent. Using project.json everything seems to work fine. Thanks!

CheloXL commented Jul 5, 2016

Excellent. Using project.json everything seems to work fine. Thanks!

@jainaashish jainaashish changed the title from nuget pack of xproj is defaulting to debug - right behavior? to nuget pack of xproj is defaulting to invalid target path Jul 5, 2016

@jainaashish jainaashish closed this Jul 5, 2016

@echarrod

This comment has been minimized.

Show comment
Hide comment
@echarrod

echarrod Sep 18, 2017

I have the same issue now - "Unable to find 'bin\Release{Project}\bin\Release'." or "Unable to find 'bin\Debug{Project}\bin\Debug'." for either configuration.

My output is 'bin\Release\netstandard1.6'., the same as the original poster, but I am unable to create a project.json file as you suggested, as I'm using VS2017, do you know of another workaround?

echarrod commented Sep 18, 2017

I have the same issue now - "Unable to find 'bin\Release{Project}\bin\Release'." or "Unable to find 'bin\Debug{Project}\bin\Debug'." for either configuration.

My output is 'bin\Release\netstandard1.6'., the same as the original poster, but I am unable to create a project.json file as you suggested, as I'm using VS2017, do you know of another workaround?

@xRoulanDx

This comment has been minimized.

Show comment
Hide comment
@xRoulanDx

xRoulanDx Jan 31, 2018

I have the same problem. I want to pack my project from my CI pipeline and don't want to add some overhead step for preparing .nuspec file.

xRoulanDx commented Jan 31, 2018

I have the same problem. I want to pack my project from my CI pipeline and don't want to add some overhead step for preparing .nuspec file.

@echarrod

This comment has been minimized.

Show comment
Hide comment
@echarrod

echarrod Jan 31, 2018

I managed to get it working by:

  1. Right clicking my project
  2. Click Properties
  3. Select Package from the left hand menu
  4. Select "Generate NuGet package on build"
  5. Using this NuGet package file instead of using nuget pack

echarrod commented Jan 31, 2018

I managed to get it working by:

  1. Right clicking my project
  2. Click Properties
  3. Select Package from the left hand menu
  4. Select "Generate NuGet package on build"
  5. Using this NuGet package file instead of using nuget pack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment