Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. How to compile single project for Silverlight and then standard .NET

How to compile single project for Silverlight and then standard .NET

Scheduled Pinned Locked Moved WPF
csharpvisual-studioquestiontutorial
2 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 1033907
    wrote on last edited by
    #1

    Hi I have a class library with code that is compatible with both Silverlight and standard .net libraries. (the minor incompatibilities can be solved with #if) How I can compile the code for both of these platforms? I mean - how do I set up Visual Studio to have two output configurations - one for .net, one for silverlight, so that my bin folder will contain two compiled .dlls? The project was initially created as Widnows Class Library and now I don't even know how to tell the VS to use Silverlight libraries to begin with:-(

    M 1 Reply Last reply
    0
    • M Member 1033907

      Hi I have a class library with code that is compatible with both Silverlight and standard .net libraries. (the minor incompatibilities can be solved with #if) How I can compile the code for both of these platforms? I mean - how do I set up Visual Studio to have two output configurations - one for .net, one for silverlight, so that my bin folder will contain two compiled .dlls? The project was initially created as Widnows Class Library and now I don't even know how to tell the VS to use Silverlight libraries to begin with:-(

      M Offline
      M Offline
      Member 1033907
      wrote on last edited by
      #2

      To answer my own question, the following links have some useful info (different approaches): http://www.wintellect.com/CS/blogs/krome/archive/2011/05/24/sharing-code-between-silverlight-and-wpf-using-build-targets.aspx[^] http://msdn.microsoft.com/en-us/magazine/ee321573.aspx[^] The latter brought to my attention the possibility of file linking between projects, which I completelly forgot is possible.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups