-
-
Notifications
You must be signed in to change notification settings - Fork 732
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
Support for nuget packing of project files #637
Comments
IMHO, I think that the The |
@ErikSchierboom Sounds like a good strategy. I've just hit the issue and would love to do |
I will be working on also allowing you to use file globbing patterns with the NuGet functions :) |
@ErikSchierboom 👍 - so are you going to take a look at this? No problem if so, just want to make sure I'm not duplicating effort. |
@daveaglick Not necessarily, you can do it, you were first :) However, maybe it is wise to wait for my updated globbing code, as it adds quite some methods. I expect to submit that in a couple of days, perhaps even later today. |
Sounds good! I'm sure I won't be as efficient (you've been on fire recently!), but I've been looking for an excuse to get my hands dirty :) |
@daveaglick I've submitted a PR to extend the aliases: #662 |
Awesome - I'll start working on top of the PR branch to make the merge easier once it's pulled in. |
@daveaglick Great. I might have to change a thing or two I think, but that would probably make it a lot easier. |
@daveaglick I had some feedback on my PR, so the PR has been updated. You might want to rebase off the updated PR. |
Did you test this on mono? As I can see it uses the nuget.exe pack function, and this function is not yet supported in mono. |
@ristaloff I don't think there's any way around that right now. The |
@daveaglick A possibility is to remove the dependency on nuget.exe and implement the functions. But that sounds like a lot of work. The guys working on Paket have done this. But the problem with Paket is that they package the nuget file with a newer zip format than nuget can handle, so that doesn't work for me either. (the wrong zip format only happens when creating the nuget package with paket on mono) |
@ristaloff The tools are just a thin wrapper around an executable. It's up to the user to know the limitations of the tool being used. |
@ristaloff just double check running latest version of nuget? It's first with v3 they're starting the XPlat stuff. |
@devlead Didn't work. Nuget pack command uses classes from Microsoft.Build.Evaluation namespace. Btw, the nuget pack works on .nuspec files, but not on .csproj files. So seems like I'm stuck again. Just wanted my linux buildserver to build nuget packages, without having to maintain the .nuspec files. |
@ristaloff but you don't need a nuspec with Cake if you use the overload with only settings and specify all required properties on that. |
You could use the built in project file parser to extract some meta data to populate the nuget pack settings |
@devlead Ok, I'll look into that. Thanks. |
Merged via #667. |
@patriksvensson, just wanted to check when this change is expected to be released, I see milestone 0.9.0 is due 22nd Feb, will you be sticking to these dates? I ask as this feature, along with the ability to specify properties for the nuget alias are absolutely key for me as I try to migrate to Cake from our existing build system. |
@Philo while we are going to "try" to hit that date, understand that it is a somewhat arbitrary date. The important thing is that all items that are marked as being part of that milestone are completed. In the meantime, you have the option of using the build of Cake from our MyGet feed, which will include this new functionality. That will allow you to get a head start on using it, and making sure that it does what you need, and then you can switch to the official release, when it ships. |
@gep13, do you have a link to your myget feed? |
@Philo sorry, should have included that before. The feed is here: https://www.myget.org/F/cake |
Duplicate of #551 |
NuGet supports a mode where you can tell it to pack a project file and it will automatically resolve references, binaries, etc. and pull values from a corresponding .nuspec sitting alongside the project file. The NuGet packing support in Cake doesn't appear to support this use case.
NuGetPack(...)
attempts to read and parse the passed-in argument as a .nuspec file so that it can transform it before callingnuget pack ...
. This step should be avoided when packing a project file and we should probably go straight to theNuGetPacker
.I don't mind taking a look - what would be the best way to indicate this alternate behavior? Create a new alias like
NuGetPackProject(...)
, check the extension of the file passed toNuGetPack(..)
, or rely on some value in theNuGetPackSettings
?The text was updated successfully, but these errors were encountered: