Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Create Cross-platform Apps using Portable Class Libraries

1 hour, 1 minute, 3 seconds


Right click “Save as…”

+My schedule - My schedule
Learn how to create an app with versions for the Windows Store, Windows Phone, and other platforms, using the new Portable Class Libraries support in Visual Studio 2012 to share code between the different versions of the app. We will see how the Model-View-ViewModel pattern (MVVM) is ideally suited to sharing code between platforms since it encourages a clean separation between the app logic, which can be shared, and the UI, which is platform-specific. We’ll see how to access non-portable functionality from portable code by creating a portable abstraction with platform-specific implementations. We will see several real-world demo apps, and touch on more advanced concepts such as navigation, inversion of control, and synchronizing data across multiple clients with Windows Azure Service Bus. To maximize your benefit from this session, having some prior experience with XAML-based apps and the MVVM pattern is recommended.
For more information, check out these courses on Microsoft Virtual Academy:

Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation
  • JaredJared

    It seems that targetting a PCL for a Windows Store app and WP8 app is not too kind to those that still like to use Visual Basic. Numerous core VB language features that are supported in both projects individually, don't work within the PCL project for some reason. Not being able to create extension methods or use the equals sign with strings for example is pretty lame.

  • Looking forward for this session.

    Is there also a code sharing strategy for Windows 8 Desktop App and Windows 8 Store App(Metro App).


  • JaredJared

    Update - I've been told that <VBRuntime>Embed</VBRuntime> needs to be added just under the <ProjectTypeGuids> element in the project file to overcome a bug in the VB template.

  • Win8DevWin8Dev

    It was an informative session. Can you please post demo code?

  • @Win8Dev: The code, as well as links to more information, is available here: http://tinyurl.com/build2012pcl



  • PrzemekPrzemek


    DisentanglementPhone set as startup.

    I am not sure why but the file GordionCube.txt has LF ('\n') character as the last one in each line.

    However, splitting is done on Environment.NewLine, which on my PC results to CRLF ('\r\n'). From there on, the logic breaks down and exceptions follow.

    Is there a quick fix for this?

  • @Przemek:Did you download the source code for Disentanglement as a zip file?  Git usually does line ending conversion for "text" files, so the newlines in the repository will just be "\n" but when you check the code out on a Windows machine it will convert them to "\r\n".  If you downloaded the source code as a zip it probably wouldn't have done that conversion.

    You could either use something like GitHub for Windows or Git Extensions to download the code,  you could change the code to just split based on "\n", or you could change the line endings in the text file (EditPad Pro can do this and Notepad2 and Notepad++ probably can too).


  • I'm not able to download the ContosoHelpdesk source. I get to the SkyDrive folder, but then when I right-click and select "Download," nothing happens.

  • @JeffCren: I tried it out and it took a few seconds, but the download did start for me.  I'd suggest trying it from a few different browsers.  If that doesn't work send me an email and I'll send you the zip file.


  • PrzemekPrzemek

    @dsplaisted Thanks, for now I just change the split string to "\n" and it works. The only problem is that on the Windows Phone 8 emulator I do not get colors. All pieces are black. Any ideas why?

  • I can't download anything from SkyDrive too Sad

  • I got the downloads to work in Firefox 16.0.2. It's not immediate as I had to click and wait. I thought nothing was happening but eventually it worked.

Remove this comment

Remove this thread


Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.