For a post-build step on our build server I want to get all projects inside a C# Visual Studio 2012 solution related to a specific configuration.

Here is a sample sln file: pastebin

This file has two projects: TestApplication1 and TestApplication2 with two configurations: App1 and App2. App1 will only build TestApplication1 and App2 only TestApplication2.

Now when I say "display all projects for configuration App1 I", want to get TestApplication1 back.
The problem is that I cant see any entry that specify which project should be build under which configuration. The sln file looks like that every project is related to every configuration.

How can I solve this?

有帮助吗?

解决方案

Look at the lines with "Build.0"

In order to check this, you can open the solution file with Notepad++, copy over the contents to a new document, update your Build Configuration in VS, "Save All Files", reload the solution file in Notepad++ and then click "ALT+D" to get the differences.

其他提示

The ProjectConfigurationPlatforms global section in the sln file should have that information.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top