locked
Unable to link files in the .Shared project (Universal apps)

    Question

  • I understand that the Shared project does some magic to link the files to both the desktop & phone app.  Unfortunately it appears that you cannot add files via linking to the Shared project itself.  For example, we have a separate class for our data models.  I would like to link the files to the Shared project, but that is not an option.  Is my only option to link the files to the desktop & phone projects individually?  Is this by design?

    Thanks,
    Bob

    Saturday, May 03, 2014 1:22 AM

Answers

  • Hi,

    Universal app cannot contain windows desktop app.A universal app is a collection of three projects – a Windows Store project, a Windows Phone project and a Shared project – enclosed in a solution folder that is optional. And what's meaning about link the files? In universal app, when you build it, the windows store app and windows phone app can direct use the codes and files in share project. You can refer to the links to get more information:

    http://msdn.microsoft.com/en-us/library/windows/apps/dn609832.aspx

    http://blogs.msdn.com/b/visualstudio/archive/2014/04/14/using-visual-studio-to-build-universal-xaml-apps.aspx

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, May 05, 2014 8:24 AM

All replies

  • Hi,

    Universal app cannot contain windows desktop app.A universal app is a collection of three projects – a Windows Store project, a Windows Phone project and a Shared project – enclosed in a solution folder that is optional. And what's meaning about link the files? In universal app, when you build it, the windows store app and windows phone app can direct use the codes and files in share project. You can refer to the links to get more information:

    http://msdn.microsoft.com/en-us/library/windows/apps/dn609832.aspx

    http://blogs.msdn.com/b/visualstudio/archive/2014/04/14/using-visual-studio-to-build-universal-xaml-apps.aspx

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, May 05, 2014 8:24 AM
  • Thanks Anne - I appreciate that is how they work, but my specific example is a PCL project\class that contains my data model, and that model is shared across several projects - Win8 store app, WP8 app, a Web API app, and a ASP.NET MVC version.  We link the files from that project instead of linking the PCL assembly because in many cases we want to extend the classes via partial classes. 

    Hope this makes sense,
    Bob

    Monday, May 12, 2014 11:51 AM
  • Hi,

    Try to the NuGet package to the store and phone apps separately in those cases. You can refer to the link below:

    http://blog.galasoft.ch/posts/2014/04/building-a-universal-application-for-windows-phone-8-1-and-windows-8-1-with-mvvm-light/


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, May 12, 2014 1:19 PM