Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9087077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:38:03+00:00 2026-06-16T21:38:03+00:00

I’m working on a class library project which provides client applications with a lot

  • 0

I’m working on a class library project which provides client applications with a lot of useful extension methods.
This project is expected to be used on a large variety of platforms (versions of the .NET framework).

In order to do that I’m going to use several separate Visual Studio projects, each one for its own platform.
These projects could have their own outer dependencies though the source code will be shared between them with the use of the “add as a reference” feature.
That approach will allow me to change the implementation for all projects by writing code in just one file without any need to copy it to other projects.
Keeping in mind differences in target frameworks, I will need to use #if compiler directive(s).
The result of each project will be published as a NuGet package for a specific version of the .NET framework.

Here are two questions I have:

  1. Every new file has to be added to every project otherwise it won’t
    be compiled and every class defined in it won’t be accessible on
    certain platform. As you can realize it’s very easy to forget that.
    Is there any way to avoid this kind of file tracking? Is it possible
    to automate it?
  2. How can I improve the whole infrastructure? What approaches and/or solutions do you use in your projects?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T21:38:04+00:00Added an answer on June 16, 2026 at 9:38 pm

    In order to do that I’m going to use several separate Visual Studio projects, each one for its own platform.

    You don’t need to do that. You can have multiple configurations for the same project. You’ll need to handle it by editing the project file, but you only need to do that once (or at least, once for each time you need to add a new platform). Use conditional compilation symbols defined in each project configuration to allow you to exclude certain bits of source code in each build configuration.

    I’ve done this before a couple of times, and it’s the approach I’m using to allow a PCL build in Noda Time. I’ve ended up with 6 configurations:

    • Debug
    • Debug PCL
    • Release
    • Release PCL
    • Signed Release
    • Signed Release PCL

    Obviously your needs may well be different (particularly regarding signing) but it’s working fine for us right now – and I think it’s much better than manually keeping several project files in sync.

    Another option would be to have a “skeleton” project file for each platform, and a single “master” project file, and generate the real project files for all but the master. So you’d add a new source file reference into the master project file and then regenerate all the others. This does mean writing the code to do that, mind you… or use the project we use for protobuf-csharp-port: csprojectprojector

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I am doing a simple coin flipping experiment for class that involves flipping a
I would like to run a str_replace or preg_replace which looks for certain words

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.