Questions tagged [code-sharing]

101 questions
241
votes
16 answers

How do you share code between projects/solutions in Visual Studio?

I have two solutions which have some common code, so I'd like to extract it out and share it between them. Furthermore, I'd like to be able to release that library independently because it might be useful to others. What's the best way to do it…
pupeno
  • 256,034
  • 114
  • 324
  • 541
47
votes
7 answers

Share c# class source code between several projects

I have written a class that will handle internal logging in my application. Now I want to use this class in another new and totally separate project. I could simply copy the file to the new project folder, but I would like to only have one copy of…
hultqvist
  • 14,837
  • 14
  • 59
  • 90
33
votes
7 answers

Can different git-svn clones of the same svn repository expect to be able to share changes then git svn dcommit?

I've read a great deal of "go from svn to git" and other "git-svn workflow" articles on the web, and still I think they often deal with overly simple situations. They are often targeted at guys who just want to use git and hack locally, without…
Ced-le-pingouin
  • 463
  • 6
  • 11
27
votes
5 answers

How to create my own android library and host it

I'm working on creating a log-in screen to be used with multiple different android applications. What would be the best way to package it so that other people could use my log-in function on their apps. It would be preferred that it would auto-sync…
Ryan Newsom
  • 678
  • 7
  • 12
14
votes
4 answers

Shared code base for iOS and OS X development

We have a fairly rich e-learning app, built mostly using cocos2d. Currently we are in alpha and want to setup our project structure so we can also build a Mac version to target the Mac App store. It is about 80% cocos2d with some intitial screens…
poundev23
  • 707
  • 1
  • 10
  • 16
14
votes
3 answers

Centralized live collaborative editing in Visual Studio

Now before you shoot me for bringing up a duplicate question on SOF, let me first acquaint you with exactly what I'm looking for, and I will address other questions and answers and why it is insufficient. Question #1: I'm looking for a way to…
caesay
  • 15,979
  • 13
  • 88
  • 151
12
votes
3 answers

Best way to share code between WPF and Silverlight

I have a solution that contains both a Silverlight 4 and a WPF 4 solution. One is the web version of the app and one is the desktop version. Both projects have similar domain classes and interfaces and both access the cloud for storage and other…
Mark
  • 14,302
  • 17
  • 94
  • 158
12
votes
1 answer

What is the advantage of using portable class libraries instead of using "Add as Link"?

Is anybody explain to me what is the advantage of using portable class libraries instead of using "Add as Link"? Thanks
Tolga
  • 229
  • 1
  • 3
  • 9
11
votes
1 answer

Sharing a code between two projects in git

I have two tightly related projects (A and B) which share some source code (S). Both of them will be released at the same time and released version should always use the same version of shared code. Shared code S will be changed reasonably…
Victor Ronin
  • 21,310
  • 16
  • 85
  • 171
9
votes
1 answer

Sharing code between Angular applications

I have an existing Durandal app that are actual two apps tangled into each other. I want to rewrite the app(s) in Angular and want to distinct app's sharing common code. I have estimated that around 80% of the code can bee shared. I would like to…
Martin Andersen
  • 1,888
  • 25
  • 46
9
votes
3 answers

Avoid repeating the same code in copy constructor and operator=

In c++ when classes contains dynamically allocated data it is usually reasonable to explicitly define copy constructor, operator= and destructor. But the activity of these special methods overlaps. More specifically operator= usually first does some…
7
votes
2 answers

Sharing Source files between C# and C++

I have a project that is largely written in C#. I need to define a class for all of the error number "defines" for the API of this project. I'm trying to avoid writing/altering one of my many code generators to achieve this. What I would like to…
LarryF
  • 4,617
  • 4
  • 27
  • 40
5
votes
1 answer

Shared codebase for both mobile and web applications?

I've been developing a mobile application for a while now. It runs on iOS and Android as well as on the desktop as an AIR app. This is great and I'm very excited about it. However, last week I was asked why I couldn't export a version of the app…
bvaughn
  • 12,062
  • 37
  • 43
4
votes
2 answers

How to share code between Netlify lambda functions

I have 3 separate functions each in their own folders. All of them make use of a Twilio client and Apollo Client for dealing with SMS and GraphQL server respectively. Rather than having all the code to instantiate each client (get keys from env…
4
votes
3 answers

Silverlight 4 Assembly Sharing Problem

I have a WPF .NET 4.0 class library referencing a Silverlight 4 class library. The SL library compiles fine but when I compile the WPF class library, I get: Error 2 Unknown build error, 'Cannot resolve dependency to assembly 'System.Windows,…
Jeff
  • 32,948
  • 13
  • 96
  • 198
1
2 3 4 5 6 7