Breealzibub
Breealzibub

Reputation: 8095

Modifying a Portable Class Library project on a machine where some platforms are not installed

I have a PCL project which supports the following platforms:

The problem I encounter is; while I can work with the project on a computer where Windows 8 is installed (along with the Windows Phone 8 SDK), I am unable to build the project at all on any Windows 7 computer without the WinPhone8 SDK. I am also unable to install the WP8 SDK because it requires Windows 8. I can manually edit source files, but I cannot build the PCL project to verify there are no compiler errors.

What would be the "best" practice" for making changes to my PCL project on a computer where some platforms (like WP8) are not installed? Should I manually remove those platforms for that local copy of the project, only?

Upvotes: 3

Views: 261

Answers (4)

David Kean
David Kean

Reputation: 5772

We've now made this possible in Visual Studio 2012 Update 2. This installs the required Phone 8 support for portable down-level on Windows Vista and Windows 7.

Grab the latest CTP here: http://www.microsoft.com/en-us/download/details.aspx?id=36833.

Upvotes: 2

David Kean
David Kean

Reputation: 5772

We don't have a good answer for this right now. If you drop Phone 8 support (back to Phone 7.5 or completely) then you can, as you've noticed, build on Windows 7. The reason for this, is because Phone tools itself carries the Phone 8 support - and therefore as it cannot be installed on Windows 7, neither can the portable Phone 8 support.

However, we are looking into addressing this in a future Visual Studio update sometime next year and I've filed a user suggestion over visualstudio.uservoice.com: http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3374340-allow-portable-libraries-targeting-windows-phone-8.

Please vote if you feel its important - customer feedback is valued extremely high while trying to figure out what to do next.

Upvotes: 4

Stuart
Stuart

Reputation: 66882

One option is for you to support only the profiles 1-4 - these are available in the first generation of PCL tools - http://visualstudiogallery.msdn.microsoft.com/b0e0b5e9-e138-410b-ad10-00cb3caf4981

If you want to develop for more advanced features (e.g Linq2Xml) then you need to get the missing 'profiles' installed on to the win7 machine.

This may be as simple as upgrading to the PCL2 download - http://visualstudiogallery.msdn.microsoft.com/b0e0b5e9-e138-410b-ad10-00cb3caf4981/ - this should (I think) install the new profiles beyond 1-4

I hope the above works for you...

If not, then you'll need to browse to the reference assembly directory on your Windows 7 box and you'll need to manually copy the missing profiles across from Win8. For some reference on how the PCL reference assemblies work, take a look at some of the hacking we've done to get MonoTouch and MonoDroid building - http://jpobst.blogspot.co.uk/2012/04/mono-for-android-portable-libraries-in.html and http://slodge.blogspot.co.uk/2012/04/using-portable-library-tools-for.html


One further thing you may find useful - the nuget package bringing await/async back to wp7.1 development - http://blogs.msdn.com/b/bclteam/archive/2012/10/22/using-async-await-without-net-framework-4-5.aspx

Upvotes: 1

Security Hound
Security Hound

Reputation: 2551

What would be the "best" practice" for making changes to my PCL project on a computer where some platforms (like WP8) are not installed? Should I manually remove those platforms for that local copy of the project, only?

Your problem is the solution to your problem, you will be unable to work on the PCL project on Windows 7, because of the Windows Phone 8 SDK requirement itself. Until the Windows Phone 8 SDK supports Windows 7 you have limited options unless you remove the platforms Windows 7 does not support.

Upvotes: 0

Related Questions