Nupack for Nuget

Nov 10, 2010 at 3:27 AM

So I have a dilemma.  Each version of Caliburn.Micro (WPF, SL, WP7) reference a different assembly version of System.Windows.Interactivity.  Unfortunately nupack schema defines dependencies as the package version level.  I can create 3 packages, Caliburn.Micro-WPF, Caliburn.Micro-SL, and Caliburn.Micro-WP7 each with a package dependency on the appropriate System.Windows.Interactivity, but that's kind of nasty.

It's already required that WP7 be seperate so it's really the WPF and SL packages that would othewise be one package with different framework targets.  I guess the question is, can the WPF build of CalMicro target Interactivity 4.0.5.0 as the SL version does?

If not, I'll talk to @haacked some more about how the blend team wants to package Interactivity.  I'm putting those packages together as well.  It may be that they want Interactivity packages as 4.0 and 4.0.5.0 in the SL40 while 4.0.0.0 is in the NET40 folder.

 

Thoughts?

Coordinator
Nov 10, 2010 at 1:10 PM

Technically, I think the interactivity assemblies should be installed by the Blend SDK. I'm not sure that we need to declare a dependency on them in the package. For example, if you run the template creator script, you'll see that the output projects just reference the "installed" assembly rather than include any dlls. Also, I was going to create a Nuget package, but I was waiting to address a few more issues that have cropped up. Additionally, I hadn't decided what the best way to package it was. I was thinking of doing it the same way as the project templates, where it would just include the source. Perhaps there could be two options for installation, one where you get the source and one where you get a pre-compiled .dll. I know that the source inclusion is really important for certain scenarios. Thoughts?

Nov 10, 2010 at 1:23 PM

I'm all for including the source in a seperate package, but let me put that up on the nuget forum and see what people think.  Seems a bit of a slippery slope: Caliburn.Micro src is small, but if everyone has two packages 1 for binaries and one for sources it we double the package repo list.  Also, do you really want two ways to pull the source Hg AND the package?

Having the Blend SDK installed to use Caliburn raises the burden of entry.  I do see your point , but for those not creating custom behaviors they now have to install via MSI/backchannels.  You want people for 0-60 quickly, especially with Micro.  Maybe not with full Caliburn.  I'll leave it up to you.  Just know the Blend team is cool with creating the nuget package.  It's possible they did not fully review the versioning issues.  What we likely should do is specify the MINIMUM version for Interactivity dependency.  This allows Interactivity to continue incrementing without Caliburn taking a hard dependency.

 

Does that muddy the waters any more?

Coordinator
Nov 10, 2010 at 1:48 PM

Well, it's good to know the Blend team is willing to create a package for that. In that case, we should probably set up the appropriate dependencies. Let me know what other people think about the source include. I had it as a significant request from government workers and those who want to significantly diverge from the original source on a per-project basis. The current script actually replaces the Caliburn.Micro namespace with a project specific one, so it's not "backwards-compatible" with HG and shouldn't be treated as such. I'm not sure how advanced we can make the package installer. If we can provide a command line option for source inclusion, with an appropriate warning, then maybe that would suffice.

Nov 10, 2010 at 2:30 PM

You pretty much have free reign with the install.ps1, but that particular scenario of adding the Cal.Micro project to a solution is not directly supported.  That would definitely be a seperate package, but is probably doable.

I've not used the templates, but are you saying the script (generatetemplates.ps1?) updates the Caliburn.Micro source namespaces?  The package probably shouldn't create a new project for Caliburn.Micro since you are expected to have a project already to be targeted by a nuget install.

Maybe I'm misunderstanding your comments.

Coordinator
Nov 10, 2010 at 5:53 PM

The script is for creating a project, setup for using Caliburn.Micro. The project it creates would be a Silverlight application with a Framework folder. In that folder is the complete source for CM, with it's namespaces change to be YourProject.Framework. I was wondering if it would be possible to create a package that would simply inject that folder of code into an existing project.

Nov 10, 2010 at 6:07 PM

Oh definitely!  That's pretty cool actually.  It's possible just making the source part of Content would do it, but i'll play with things. 

So there are essentially the referenced and embedded versions of Micro. 

I'll request a pull for Caliburn.Micro the binaries version first.  Once things are sorted out for the embedded version we can push that seperately.  Sound good?

Coordinator
Nov 10, 2010 at 7:33 PM

If you can hold off for a week, I might be able to address a few more tickets...maybe even a few days would be enough to get some outstanding issues resolved.

Nov 10, 2010 at 7:46 PM

No problem.  Just update this thread when you're ready.  I get notifications.

Jan 11, 2011 at 1:04 PM

What is the status of a nuget package?

Coordinator
Jan 11, 2011 at 1:18 PM

Um... I kind of forgot about that ;( I've got a couple more issues to address, then we will probably pretty much be ready for some sort of release. At that time (hopefully in the next week or two) we can address nuget.

Jan 11, 2011 at 1:22 PM

Sounds awesome! :)

Jan 11, 2011 at 1:36 PM

I don’t mind putting the pkg together. We have some options with Micro’s templates. We can install them or we can just ship binaries. Discuss as time is available.

From: loraderon [email removed]
Sent: Tuesday, January 11, 2011 9:23 AM
To: cromwellryan@hotmail.com
Subject: Re: Nupack for Nuget [caliburnmicro:234110]

From: loraderon

Sounds awesome! :)

Coordinator
Jan 13, 2011 at 2:12 AM

Some updated info on nuget http://blog.davidebbo.com/2011/01/introducing-nuget-gallery.html

Jan 26, 2011 at 7:48 PM

Any news on getting Caliburn.Micro on NuGet? Waiting for RC1?

Coordinator
Jan 26, 2011 at 8:13 PM

@All

I hope to have a nuget pjackage. I want to get RC1 out and let it sit for a short bit then go to a release. Just a little longer. 

@Ryan

If you want to start working on building the packages or researching the above info and reporting back, that would be great.

Jan 28, 2011 at 1:56 PM

I’ll look into this over the next week. Do you want this to go with the Release? When are you thinking?

From: EisenbergEffect [email removed]
Sent: Wednesday, January 26, 2011 4:14 PM
To: cromwellryan@hotmail.com
Subject: Re: Nupack for Nuget [caliburnmicro:234110]

From: EisenbergEffect

@All

I hope to have a nuget pjackage. I want to get RC1 out and let it sit for a short bit then go to a release. Just a little longer.

@Ryan

If you want to start working on building the packages or researching the above info and reporting back, that would be great.

Coordinator
Jan 28, 2011 at 2:03 PM

I'd like to have it for the official release. I'm going to do a release candidate first though. I'm hoping that not much will change between the two, but I want to do it to give some things time to work themselves out if necessary. For the release, I'll put the assemblies and starter projects up on the site, but I'd also love to have the nuget packages as well. As part of the research, can you investigate if there is a way to have an option to embed the source as the current proj templates would or simply link the assemblies? Thanks.

Jan 28, 2011 at 2:08 PM

I think we can have two packages for embedded and assembly only. It should be too outrageous. There are some other packages which do similar things with the [un]install.ps1. I’ll let you know.

From: EisenbergEffect [email removed]
Sent: Friday, January 28, 2011 10:03 AM
To: cromwellryan@hotmail.com
Subject: Re: Nupack for Nuget [caliburnmicro:234110]

From: EisenbergEffect

I'd like to have it for the official release. I'm going to do a release candidate first though. I'm hoping that not much will change between the two, but I want to do it to give some things time to work themselves out if necessary. For the release, I'll put the assemblies and starter projects up on the site, but I'd also love to have the nuget packages as well. As part of the research, can you investigate if there is a way to have an option to embed the source as the current proj templates would or simply link the assemblies? Thanks.

Feb 11, 2011 at 4:48 AM

I put together the embedded package this evening for WPF as a test run.  Wasn't too bad.  I'm going to have to follow through and build hte Interactivity package as well.  Had hoped the Blend team would do that first, but no luck.  

It makes sense to do something similar to the generate-templates.ps1 or piggy-back that output.  Those packages are very close to what we need for the embedded nuget package content.  The major difference is the $safeprojectname$ is $RootNamespace$ in nuget content.  We wouldn't need the csproj, vstemplate, or Properties either.

I'll look at a similar script that generates the packages over the weekend.

If you want to take a look at things so far: http://caliburnmicro.codeplex.com/SourceControl/network/Forks/cromwellryan/caliburnmicronuget 

Coordinator
Feb 21, 2011 at 8:24 PM

I did an RC release today. The main thing I want to get for the RTW is the NuGet packages so I thought I would check on your progress. If you think you will have time to get it done in the next couple of weeks, that's great. If not, let me know and I can start working on it. Thanks!

Feb 21, 2011 at 8:32 PM

I could use help updating the scripts to create the equivalent template directories for Nuget packages. Right now I’ve got the content structure committed to my fork. The content for the package shouldn’t be committed, but instead gen’d when you create the packages. There’s a lot going on in the generate-templates.ps1 that it is going to take a long time to update.

The two big issues:

1. moving the content to the appropriate Net40, SL40, etc folders

2. Renaming the $safeprojectname$ placeholder to $RootNamespace$ which NuGet understands.

If you can help with that I’ll work on the nuspec and the assembly only package.

Let me know what you think

From: EisenbergEffect [email removed]
Sent: Monday, February 21, 2011 4:24 PM
To: cromwellryan@hotmail.com
Subject: Re: Nupack for Nuget [caliburnmicro:234110]

From: EisenbergEffect

I did an RC release today. The main thing I want to get for the RTW is the NuGet packages so I thought I would check on your progress. If you think you will have time to get it done in the next couple of weeks, that's great. If not, let me know and I can start working on it. Thanks!

Coordinator
Feb 21, 2011 at 8:43 PM

Hmm. Christopher wrote all the scripts...and I know very little about powershell ;( Maybe I can get him to help? If you like, I can add you to the project so that you can start putting your work in the "official" place. If you want to start work on the assembly only package and put it there, that would be great. Worst case, we go with that package for RTW and just add the other one whenever we can.

Feb 21, 2011 at 8:50 PM

I’ll work on the assembly only package first then. That’s easy enough.

I DMed Chris about helping on the ps1 script.

Mar 3, 2011 at 6:27 AM

I have the makings of the WPF and SL assembly only nuget packages and scripts.  Wondering how the localization assemblies should be handled though.  Any thoughts?  We can distribute them without adding them as references and people can make a hard reference I guess.

Mar 4, 2011 at 2:49 PM

You can take a look at the assembly only package here: http://caliburnmicro.codeplex.com/SourceControl/network/Forks/cromwellryan/cromwellryan

I'm not building explicitly before creating the package (create-package.ps1) so you should do a release build first.  I can do that if we choose.

Nuget team suggested putting the resource assemblies under the framework directory so I did.  

I'm going to put a Shell and boostrapper in there too.  If there is anything special you want in those or anything else let me know.

Coordinator
Mar 4, 2011 at 8:40 PM

I've gone ahead and added you as a developer to the project. You should be able to push the package work you have been doing.

Mar 15, 2011 at 11:57 AM

Is there going to be a NuGet package for the current RC release or are you holding out for a final release?

Mar 15, 2011 at 12:44 PM

There is actually a nuget package that can be built (assembly only) in the repo. We are working on getting it to add a sample Bootstraper and possibly Shell, but that proved harder since the bootstrapper is a little different for WPF, SL, and WP7. We are also working on an embedded version, but we’ll see if htat makes the cutline.

Would the Assembly only nuget satisfy your needs?

Ryan

Coordinator
Mar 15, 2011 at 1:39 PM

Ryan, I think I'm not going to worry about the embedded version. Let's just go with the assembly + Boostrapper and Shell. That will be fine. I'll offer the embedded project templates as is on the project downloads and in the VS gallery. I think that will be fine. Also, I've added you as a dev on the project, so you can commit the work you are doing to the main repository.

Mar 16, 2011 at 7:19 AM

The Assembly only package is what I am looking for, so yes :)

Mar 16, 2011 at 12:22 PM
Edited Mar 16, 2011 at 12:26 PM

The assembly only portion is in there.  Doesn't have the bootstrapper or shell yet, because I have to figure out a good way to do a per profile bootstrapper.  A nuget feature is being tracked to support this: http://nuget.codeplex.com/workitem/221.  Install.ps1 is my current option.

Mar 17, 2011 at 8:57 AM

Is the package registrered yet? I cannot seem to find it on NuGet.

Coordinator
Mar 17, 2011 at 1:59 PM

Not yet. It will be there when we do the official release.

Mar 17, 2011 at 2:08 PM

If you pull down the source for Caliburn.Micro, you can build the package and test it out. You would do this by building a release version of CM and then running the ./nuget/create-packages.ps1.

If you could test that out it would be REALLY helpful. Remember you can use a folder or file share as nuget repository.

Coordinator
Mar 17, 2011 at 2:55 PM

I will have a look at it this weekend. Thanks for working on this!!! Any chance you will be at Mix?

Mar 17, 2011 at 6:53 PM

Definitely! Unfortunately I won’t be at Mix. Another conference I’m helping coordinate is coming up. Mind can only handle so much goodness.

Mar 19, 2011 at 2:43 PM

Ryan, I ran the PowerShell script and generated the NuGet package. To make it work I had to move down to the nuget directory and then run ./create-packages.ps1. I also had to copy nuget.exe to the nuget directory. After that it worked like a charm and the resulting nuget package installed fine from my local nuget feed. The only missing now for me is to get the bootstrapper code in place :)

Mar 19, 2011 at 3:33 PM

Good find on the directory. I’ll fix it. Nuget.exe should have been in there, but I’ll double check.

Working on the bootstrapper as we speak. Thanks!

From: magnus_haggren [email removed]
Sent: Saturday, March 19, 2011 10:44 AM
To: cromwellryan@hotmail.com
Subject: Re: Nupack for Nuget [caliburnmicro:234110]

From: magnus_haggren

Ryan, I ran the PowerShell script and generated the NuGet package. To make it work I had to move down to the nuget directory and then run ./create-packages.ps1. I also had to copy nuget.exe to the nuget directory. After that it worked like a charm and the resulting nuget package installed fine from my local nuget feed. The only missing now for me is to get the bootstrapper code in place :)

Mar 19, 2011 at 3:51 PM

OK, the exe is in the repo now and you can execute create-packages.ps1 from a directory other than nuget, but it must be the same drive.

Mar 25, 2011 at 6:51 PM

I've updated the nuget package to use an install.ps1 to deliver framework (NET40,SL40) and profile (WindowsPhone) specific content to the root of the target project.  Right now there are three folders under ./nuget/tools: NET40, SL40, and SL40-WindowsPhone.  These coincide with the standard conventions used for nuget binaries.  There is a sample bootstrapper.cs file in each, but they don't have any content.  I'm not going to have a chance to pull over the template versions of the bootstrapper, shellview, and shellvm until next week some time.  If anyone can try that out let me know.

To build the package run create-package.ps1 (from anywhere now - thanks magnus_haggren).  Then you can consume it by adding the nuget folder path to your Package sources in VS.

Please try to update this thread with anything that happens.

Thanks!

Coordinator
Apr 1, 2011 at 1:26 PM
Edited Apr 1, 2011 at 1:27 PM

Ryan, I had a look at the nuget package. I changed it to a zip and had a peak inside. It looks like everything in that folder is getting put into the package, including things that shouldn't be there. For example: nuget.exe and publish-packages.ps1 Can you have a look at that and see if you need to re-organize that? Also, when running the package against my local machine, I didn't see the bootstrapper file added to the solution. Can you check on that? I can add the contents of the bootstrappers when it's ready to go. I'm shooting for a release in the next two weeks. I'd like to have it in time for the Mix Open Source Festival on Apirl 11th. Can we make that?

Apr 1, 2011 at 1:52 PM

Yeah – I’ll take a look. Thanks!

I’ll check on the bootstrapper also. That should be there.

From: EisenbergEffect [email removed]
Sent: Friday, April 01, 2011 9:27 AM
To: cromwellryan@hotmail.com
Subject: Re: Nupack for Nuget [caliburnmicro:234110]

From: EisenbergEffect

Ryan, I had a look at the nuget package. I changed it to a zip and had a peak inside. It looks like everything in that folder is getting put into the package, including things that should't be there. For example nuget.exe and publish-packages.ps1 Can you have a look at that and see if you need to re-organize that. Also, when running the package against my local machine, I didn't see the bootstrapper file added to the solution. Can you check on that. I can add the contents of the bootstrappers when it's ready to go. I'm shooting for a release in the next two weeks. I'd like to have it in time for the Mix Open Source Festival on Apirl 11th. Can we make that?

Apr 4, 2011 at 7:06 PM

Can you give this another shot. Updated the packaging to use a working directory called package under the nuget directory. This has the tools/ content committed, but lib/ stuff is pulled from a bin/release.