public void SemicolonInConfiguration() { ObjectModelHelpers.DeleteTempProjectDirectory(); // --------------------- // Foo.csproj // --------------------- ObjectModelHelpers.CreateFileInTempProjectDirectory("foo.csproj", @" <Project DefaultTargets=`Build` ToolsVersion=`msbuilddefaulttoolsversion` xmlns=`msbuildnamespace`> <PropertyGroup> <Configuration Condition=` '$(Configuration)' == '' `>Debug</Configuration> <Platform Condition=` '$(Platform)' == '' `>AnyCPU</Platform> <OutputType>Library</OutputType> <AssemblyName>ClassLibrary16</AssemblyName> </PropertyGroup> <PropertyGroup Condition=` '$(Configuration)|$(Platform)' == 'a%3bb%27c|AnyCPU' `> <OutputPath>bin\a%3bb%27c\</OutputPath> </PropertyGroup> <ItemGroup> <Reference Include=`System` /> <Compile Include=`Class1.cs` /> </ItemGroup> <Import Project=`$(MSBuildBinPath)\Microsoft.CSharp.targets` /> </Project> "); // --------------------- // Class1.cs // --------------------- ObjectModelHelpers.CreateFileInTempProjectDirectory("Class1.cs", @" namespace ClassLibrary16 { public class Class1 { } } "); // Create a logger. MockLogger logger = new MockLogger(); Project project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory("foo.csproj", logger); // Build the default targets using the Configuration "a;b'c". project.GlobalProperties.SetProperty("Configuration", "a;b'c", true /* literal value */); bool success = project.Build(null, null); Assertion.Assert("Build failed. See Standard Out tab for details", success); ObjectModelHelpers.AssertFileExistsInTempProjectDirectory(@"obj\a;b'c\ClassLibrary16.dll"); ObjectModelHelpers.AssertFileExistsInTempProjectDirectory(@"bin\a;b'c\ClassLibrary16.dll"); logger.AssertLogContains(String.Format("foo -> {0}", Path.Combine(ObjectModelHelpers.TempProjectDir, @"bin\a;b'c\ClassLibrary16.dll"))); }