c# - Copy External Configurations to Local Projects in Visual Studio? -


what easiest way create build configuration in approximately 50-100 projects (same solution) if visual studio has detected build configuration project?

our team uses set of common projects (namespace "common") within several solutions. common namespace has it's own master solution own set of build configurations. common's solution contains 5 build configurations ("debug-qa", "debug-dev", etc.).

whenever these projects used within new solution (ie "mynewsolution"), visual studio shows build configurations common's master solution. unfortunately, these configurations have not yet been created in mynewsolution or of mynewsolution's projects. creates problem adding build configurations other projects, or including projects in these build configurations, since there no way create build configuration if name exists (which visual studio thinks does, common projects being included).

my goal add same configurations (ie "debug-qa", "debug-dev", etc.) mynewsolution, , projects, of projects , solutions match. way can see manually create build configuration on each new project... torture since mynewsolution has approximately 50-100 projects.

fyi: i'm using visual studio 2012

this more of hack proper solution, always:

  1. create a copy of configuration want entire solution guid name.
  2. remove copy projects have original configuration (undo changes).
  3. rename guid original configuration's name using "find/replace in files" tool.

even if isn't viable option, pretty quick fix.

edit:

how manually remove configurations solutions:

with solution file opened in text editor, see block called global contains sections. solutionconfigurationplatforms section contains configuration's definitions. there other section called projectconfigurationplatforms configurations assigned. remove references configuration both groups , should it. if have more complex solutions, there might other references remove. base case.

how manually remove configurations projects: again, project file opened in text editor, see many references configuration want remove. c# projects have propertygroup configuration condition. can remove group entirely. there might other references configuration around file make sure clean properly.

make sure have backup of files if goes wrong.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -