1

I have a C++ project that has dependencies to 4 C# projects. These dependencies are specified in an existing solution file.

The trick is, when I copy the projects in my own C# app and give them new project GUID's, I want to add it an the existing solution file programmatically (not the solution file of my own C# app), including their project dependencies. This is pretty much where I'm stuck, is there any way to do this programmatically in C#?

I need to do this from C# code that is not part of either the C# project or its dependencies.

The following is the header of the solution file I need to edit:

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27130.2010 MinimumVisualStudioVersion = 10.0.40219.1 
4
  • 2
    This is too broad. At the very least you need to specify the Visual Studio version as the answers will not be the same if you are using Roslyn or not Commented Feb 19, 2018 at 11:34
  • So .... like a NuGet package, but locally? Or a VSIX? Or do you mean something like a git submodule? Commented Feb 19, 2018 at 11:40
  • Updated my question to add a bit more clarity, essentially I just want to edit an existing solution file (Format Version 12) to add an existing project and its dependencies to it. Commented Feb 19, 2018 at 11:45
  • The question this is claimed to be a duplicate of did not apply to my situation since I won't know if the target machine will have visual studio installed. I have since found a solution to my question. I can either answer it here if the duplicate reference is removed, answer the duplicate, or delete the question which might be a shame if someone were to have a similar problem in the future. Not sure what is best. Commented Mar 5, 2018 at 12:49

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.