Is it possible to split the information in a .csproj across more than one file? A bit like a project version of the partial class feature.
Is it possible to split the information in a .csproj across more than one
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can not have more than one master csproj. But because the underneath wiring of the csproj is done using msbuild you can simply have multiple partial csproj that import each other. The solution file would see the most derived csproj.
project1.csproj
project2.csproj
project.csproj – this is the main project that is referred by the solution file.
Bottom line is that using msbuild Import feature you can have partial csproj files where each one would contain definitions that the main project (project.csproj in my example) would use.
Visual Studio will show a Security Warning for project dialog when you open your changed solution or project file. Choose the option Load Project Normally and press OK. When opening the solution again later the warning will not be shown because the configuration to Load Project Normally is stored in the suo file.