How do I build a solution programmatically in C#?

See .NET 4.0 MSBuild API introduction for an example using the .NET 4.0 MSBuild API: List<ILogger> loggers = new List<ILogger>(); loggers.Add(new ConsoleLogger()); var projectCollection = new ProjectCollection(); projectCollection.RegisterLoggers(loggers); var project = projectCollection.LoadProject(buildFileUri); // Needs a reference to System.Xml try { project.Build(); } finally { projectCollection.UnregisterAllLoggers(); } A simpler example: var project = new Project(buildFileUri, null, … Read more

How do I show the References folder in Solution Explorer without selecting ‘Show All Files’ in a VB.NET project?

I guess I will have to definitively crush your dream. Sorry. It has been a decision by Microsoft to remove this from the default view to reduce the ‘clutter’. However, your ‘Show All Files’ setting will persist when you save your project. So if you show all files once and then save, then it will … Read more

Visual Studio solution file – what does the “Build.0” mean?

Yes, your hunch was right. It does mean that the project has its Build option ticked to build under the build configuration. I just tested this by opening the solution in one instance of Visual Studio and the .sln file in the text editor (open with) of another Visual Studio instance. If you change the … Read more

When I unload projects in visual studio, where does VS save this setting?

This information is stored in the solution user options file (.suo) which you can find in the same directory as the solution file. As the name implies this is user specific information which means sharing this across the team will be difficult because then everyone will need to live with the same options and store … Read more

Git and Visual Studio project references

This is one of those questions that unfortunately doesn’t have a single answer – it depends. The easiest solution is always to have a single repository. This avoids many of the problems of managing multiple repositories with different versions. But this only really works if you have a single version of everything; it’s almost impossible … Read more