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

Nupkg is built in Debug but not in Release configuration #3

Open
pseabury opened this issue Jun 9, 2017 · 5 comments
Open

Nupkg is built in Debug but not in Release configuration #3

pseabury opened this issue Jun 9, 2017 · 5 comments

Comments

@pseabury
Copy link

pseabury commented Jun 9, 2017

I have a post-build to push the build nupkg up to my private feed, but when I build in Release no nupkg is created and so the push fails.

In debug configuration the nupkg is built to \bin\Debug
In release configuration the nupkg is missing from \bin\release

@Puresharper
Copy link
Owner

Puresharper commented Jun 9, 2017

Hi, very strange, it seems to work here.

I suspect your postbuild trigger before NuPack, that's why you can't find the nupkg and NuPack does not trigger if build failed, so no nupkg will be find in this case.

Tell me if I'm wrong, I will be glad to debug it if I can reproduce it.

note : you can use NuPack Extension to create your push process.

@pseabury
Copy link
Author

You are correct, thanks for the tip.

Now how to use IPlugin PackageBuilder Update(Setting setting, PackageBuilder package) to push the package? Based on the method signature, it looks like this plugin gets called when the package is still getting built, not after?

Right now I'm trying to just use Nuget.CommandLine package to call "nuget.exe push [options]" from the post-build event, but as you noticed, the package isn't built yet at that stage.

Thanks,

Paul

@Puresharper
Copy link
Owner

Puresharper commented Jun 10, 2017

Dispose of plugin is called at the end of process, you can do at this time.

Note : you might have choice to use Nuget.Core instead of calling nuget.exe if you don't want to have an additional process to run.

@pseabury
Copy link
Author

OK, I will try that. Note that Nuget.Client is the v3 replacement of Nuget.Core that is a dependency of NuPack.Extension

@pseabury
Copy link
Author

OK, thanks for the help. I used your plugin extension and am able to publish the package to my server. One improvement would be to add capability to pass custom settings to the plugin via the Settings object.
In my case, credentials & url for nuget server would be useful to supply via settings. A Dictionary<string, string> of custom settings might suffice and could be added via a Settings attribute.

You can close this issue, thanks again!

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