Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
4.33/5 (3 votes)
See more:
Hi,
I use VS2010 and have several c# "libraries" (source code) which are written for several .net frameworks. All of this libraries are under version control with subversion. Today I add this libraries to a project solution, select the right .net framework for each library and add a define “dotNetVersion3_5” for example. If I commit this libraries to subversion, and checked them out at another project whis is only for .net 2.0 I have to make all these changes again by hand.
Is there any chance to:
a) Define a .net version for a project solution
b) Define a “define” for a project solution
In VS2010 ?
Thx Peter
Posted

1 solution

Hi,

Don't know if this is a feasible solution for you but I once resolved a similar problem using following ideas:
- libraries are included as references, not as source code projects
- each library had different compile outputs (using different projects), for example one for each target framework. All the binaries went to different bin folders
- all the references for the actual project were pointing to a single directory, for example C:\CurrentLibraries
- had a small CMD file which copied the desired library versions from their original output folders to C:\CurrentLibraries

This way I could easily change the actual dll's in the C:\CurrentLibraries folder to whatever versions I needed without making modifications to the references nor to the library projects. When a library source code was changed all the necessary projects were built using again a separate cmd file so each library project didn't need to be compiled separately.

This was years ago so don't know if the tools currently provide more elegant ways to do this but this was the best solution at that time.

Regards,

mika
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900