Creating a Package: Would Lib\WP7.0 work?

Oct 10, 2010 at 5:02 AM

We have a few outputs that target .NET4.0 / SL 4.0 and now also WP7.0.

For our package Lib folder, would I be able to create a \Lib\WP7.0 folder and would that work?

Oct 10, 2010 at 5:09 AM

Not right now, but we'll support more target framework names in the future. If you can find out the full name of the windows phone framework name  then you can use that as the folder name. We didn't spend alot of time discovering all of the names of the different project and framework types in this first preview.

Oct 10, 2010 at 8:53 AM

Thanks - How do I get the framework name for it again?

Oct 10, 2010 at 9:52 AM
There' probably a better way but this is what I'd do:
  • Open a WP7 project
  • Open the package manager console and write the following

$p = Get-Project WindowsPhoneProject

Oct 10, 2010 at 1:45 PM

Ah.. ok thanks!

Here folllows the response for Windows Phone 7 RTM:

PM> $p = Get-Project WindowsPhoneApplication1
PM> $p.Properties.Item("TargetFrameworkMoniker").Value

Based on the above, what would you recommend for use in the Lib path?

Oct 10, 2010 at 6:27 PM

Use Silverlight. We don't support profile as yet

Oct 13, 2010 at 7:11 PM

This does not work.  I get the following error prompt, using VS2010:

Unable to find assemlby references that are compatible with the target framework 'Silverlight, Version=4.0,Profile=WindowsPhone'.

NuPack.exe was able to create a package and it shows up when trying to add a package reference.

Oct 13, 2010 at 7:29 PM

What's your package structure?

Oct 13, 2010 at 11:33 PM

Here's what I have:





Which generates a MyPackage.1.0.0.nupkg

Oct 14, 2010 at 2:18 AM

I'm confused, the end result of the package should look like this (i.e. what is inside of the nupkg):


To build this your directory structure should be like:


Oct 14, 2010 at 4:28 AM

So I need to put my spec in the same folder as the assemblies?  I'll give that a try.

Oct 14, 2010 at 4:29 AM

No you don't. That's not what I described... The spec goes at the root of the package.

Oct 14, 2010 at 4:42 AM

I'm getting a different error now, I'm not sure if it's because I'm on a different machine.


"MyPackageName" I am able to get NuPack to generate the .nupkg but adding the reference now causes a new error: "Unable to add reference to 'MyPackage 1.0.0' because it has no project content."


I'll have to check tomorrow to see if that is the case.

Oct 14, 2010 at 4:44 AM
Edited Oct 14, 2010 at 4:44 AM

Look in your nupkg and see if there is a lib folder in there with your dll (rename it to zip).

All of the files are relative to the spec.

Oct 22, 2010 at 8:30 PM

Sorry for the long delay.


Here's the contents of my nupkg:


I get the same error on two different PC's: "Unable to add reference to 'MyPackage because it has no project content".  I am trying to add a package reference to a class library for windows phone 7.

Oct 22, 2010 at 11:09 PM

That 'MyPackage' folder is not supposed to be there.  Instead, 'lib' should be directly at the root, as a sibling to 'package'.

Oct 25, 2010 at 3:18 PM

I've tried placing the .nuspec file at different folder levels yet the only thing that changes is the folder name "MyPackage".

Oct 25, 2010 at 5:15 PM

Please try looking at the current packages in the repository.  If you start from one a working package, it should make it easier to get into a working state.

Oct 28, 2010 at 8:46 PM

I've pulled the latest set of packages from source.  After picking one, in this case AutoMapper, as a template I've reorganized my package.  However, I am still not able to get VS to add the package.  NuPack.exe creates it just fine and it shows up in the feed.  Unfortunately the version of NuPack.exe that I've downloaded, as of today, seems to be using the older CTP1 nuspec.xsd so I can't completely follow the .nuspec file from those in the CodePlex repository.  This is all discovery for me so I'll keep track of any updates and continue trying to figure out what makes my package different.  On a side not I've removed the framework version from my package and my assemblies are simply in the /lib folder, still no luck.

Oct 28, 2010 at 8:48 PM

You can download the newer nupack.exe from here: