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

  • SEARCH
  • Home
  • 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 8411353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:24:16+00:00 2026-06-10T00:24:16+00:00

I have a class library that targets .net 4 and is used across different

  • 0

I have a class library that targets .net 4 and is used across different platforms via Mono.
I now want to port it to be used by Windows 8. I know the name keeps changing but this is currently called a “Class Library (Windows Store Apps)” in VS2012.
I initially started with trying to port everything to a “Portable Class Library” but this was proving too difficult as some things simply didn’t have a generic approach that would work on all platforms targeted, and other things that were supported simply weren’t available to the compiler.
So I’ve created a Windows Store Class Library and created links to the existing files of my standard Class Library so updating once will update both. I am planning on using pre-processing directives to make changes between the two class libraries
E.G

#if NETFX_CORE
    Task.Delay(someTime);
#else
    new System.Threading.ManualResetEvent(false).WaitOne(sometime);
#endif

My question is if this method seems a sensible approach? I have the same default namespace and assembly name. Could this ever cause issues to my compiler? The assemblies target different platforms so would never be used together in the same application but do both sit in the same solution in Visual Studio.

  • 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-10T00:24:17+00:00Added an answer on June 10, 2026 at 12:24 am

    Overall, yes that should work. That specific case is a poor example, because the two implementations function very differently, illustrating that you may need to rethink some aspects of your design. For cases where there is a similar API swap (with similar semantics), I personally tend to move the difference behind a helper method, so my “main” code doesn’t need to worry about this – just the helper code. Reflection would be a good example of this (the changes to reflection are annoyingly deep).

    The two projects with different target platforms should be fine. I occasionally hit an IDE glitch where it complains about temp files. I think this is due to sharing files between projects. I’ve logged it on connect

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

Sidebar

Related Questions

I have a class library that targets .NET 3.5. Now, I would like to
I have a signed class library that I want to create assemblies for via
I have a class library that I have written in C#.net. I want to
I have an ASP.NET VB.NET web project that references a VB.NET class library. I
I have a .Net 3.5 class library project that I've migrated to use Visual
I have a class library that has settings within an app.config. I know that
My Scenario I have a class library that is going to be called from
I have a DAL class library that is included in my program as a
I have a class library project that references the version 4.1 Microsoft.Practices.Common dll. I
I have a class, which is part of a code library project that was

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.