Recommended number of projects in Visual Studio Solution

I’ve worked on products on both extremes: one with ~100 projects in a single solution, and one with >20 solutions, of 4-5 projects each (Test, Business Layer, API, etc). Each approach has its advantages and disadvantages. A single solution is very useful when making changes – its easier to work with dependencies, and allows refactoring … Read more

Using Visual Studio project properties effectively for multiple projects and configurations

I just found out somthing I didnt think was possible (it is not exposed by the GUI) that helps make property sheet far more useful. The “Condition” attribute of many of the tags in the project property files and it can be used in the .props files as well! I just put together the following … Read more

How to programmatically include a file in my project?

It worked for my just adding the it to the ProjectFolder, and also add the folder programmatically like this. var p = new Microsoft.Build.Evaluation.Project(@”C:\projects\BabDb\test\test.csproj”); p.AddItem(“Folder”, @”C:\projects\BabDb\test\test2″); p.AddItem(“Compile”, @”C:\projects\BabDb\test\test2\Class1.cs”); p.Save();