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 9001739
In Process

The Archive Base Latest Questions

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

I set my mind on creating a lib that i could use for different

  • 0

I set my mind on creating a lib that i could use for different projects, including .net 4.5 console apps, windows store apps, windows phone 8. My lib are doing some socket programming, and if it was normal 4.5 i would use the TcpClient.

The first(Assumed) step would be to create a Portable Lib, but this ends quickly as TcpClient are not supported there.

What are the normal approach for creating such libraries? What would be my firsts step for creating a lib i can use for multiply targets?

  • 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-16T00:28:36+00:00Added an answer on June 16, 2026 at 12:28 am

    Very well known issue.

    There are couple of ways that you can get around that problem.

    1. Shared code files should be added a links in the relevant project. that way you can change is once and it will affect all the dependent projects. keep in mind that of course rebuilding all dependent project is a must in that case.
      Right-click the dependent project, select Add->Existing Item – in the dialog form, drop down the Add button and select Add As Link.
      You will have to use some C# Preprocessor Directives for distingushing between different platforms – for example, some namespaces and APIs could be different in Windows 8.

    2. Use partial classes and inheritance for extending types.
      for example, let say that you have a type that one of it’s methods should download a file from the internet and save it locally.
      Let’s assume that in Windows 8 and Windows Phone the API are different (they are actually), you can create the type with the private method deceleration in a common file, and create partial class that implement that method in every relevant project – one partial class for Windows Phone, and one partial class in Windows 8 and each will be built in it relevant context.
      For more information about partial classes and methods, read here.

    I hope that helps.

    Anyway, specifically TcpClient that you’ve mentioned you want to use – If I remember correctly it is not supported in Windows Phone as all and not just in Portable Library 🙂

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

Sidebar

Related Questions

I'm new to c++ but have set my mind on a specific task that
I've got my mind set on dynamically creating URLs in Django, based on names
While creating a table I have to use the datatype SET , but it
I'm new to web development so bear that in mind. I'm creating my first
I'm really trying to break out of my RDBMS mind set when setting up
This is boggling my mind today. I have a bash script to set a
set(TestProject_additional_libs optimized foobar.lib debug foobard.lib } especially what is optimized/debug mean here? Is this
Please read before tagging as duplicate . I'm creating a set of applications which
I'm creating a Django powered website that will have numerous applications (Blog, Shop, Portfolio,
So I'm creating a django app that allows a user to add a new

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.