@@ -745,6 +745,53 @@ public void TestWindowCSharpMsBuild()
745745 TestAutobuilderScript ( autobuilder , 0 , 6 ) ;
746746 }
747747
748+ [ Fact ]
749+ public void TestWindowCSharpMsBuildMultipleSolutions ( )
750+ {
751+ Actions . RunProcess [ @"cmd.exe /C C:\odasa\tools\csharp\nuget\nuget.exe restore test1.csproj" ] = 0 ;
752+ Actions . RunProcess [ "cmd.exe /C CALL ^\" C:\\ Program Files ^(x86^)\\ Microsoft Visual Studio 12.0\\ VC\\ vcvarsall.bat^\" && C:\\ odasa\\ tools\\ odasa index --auto msbuild test1.csproj /p:UseSharedCompilation=false /t:Windows /p:Platform=\" x86\" /p:Configuration=\" Debug\" /p:MvcBuildViews=true /P:Fu=Bar" ] = 0 ;
753+ Actions . RunProcess [ @"cmd.exe /C C:\odasa\tools\csharp\nuget\nuget.exe restore test2.csproj" ] = 0 ;
754+ Actions . RunProcess [ "cmd.exe /C CALL ^\" C:\\ Program Files ^(x86^)\\ Microsoft Visual Studio 12.0\\ VC\\ vcvarsall.bat^\" && C:\\ odasa\\ tools\\ odasa index --auto msbuild test2.csproj /p:UseSharedCompilation=false /t:Windows /p:Platform=\" x86\" /p:Configuration=\" Debug\" /p:MvcBuildViews=true /P:Fu=Bar" ] = 0 ;
755+ Actions . RunProcess [ @"cmd.exe /C C:\odasa\tools\java\bin\java -jar C:\odasa\tools\extractor-asp.jar ." ] = 0 ;
756+ Actions . RunProcess [ @"cmd.exe /C C:\odasa\tools\odasa index --xml --extensions config csproj props xml" ] = 0 ;
757+ Actions . FileExists [ "csharp.log" ] = true ;
758+ Actions . FileExists [ @"test1.csproj" ] = true ;
759+ Actions . FileExists [ @"test2.csproj" ] = true ;
760+ Actions . FileExists [ @"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" ] = false ;
761+ Actions . FileExists [ @"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" ] = false ;
762+ Actions . FileExists [ @"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" ] = true ;
763+ Actions . FileExists [ @"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" ] = false ;
764+ Actions . FileExists [ @"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" ] = true ;
765+
766+ Actions . GetEnvironmentVariable [ "TRAP_FOLDER" ] = null ;
767+ Actions . GetEnvironmentVariable [ "SOURCE_ARCHIVE" ] = null ;
768+ Actions . EnumerateFiles [ @"C:\Project" ] = "test1.csproj\n test2.csproj\n test1.cs\n test2.cs" ;
769+ Actions . EnumerateDirectories [ @"C:\Project" ] = "" ;
770+
771+ var csproj1 = new XmlDocument ( ) ;
772+ csproj1 . LoadXml ( @"<?xml version=""1.0"" encoding=""utf - 8""?>
773+ <Project ToolsVersion=""15.0"" xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
774+ <ItemGroup>
775+ <Compile Include=""test1.cs"" />
776+ </ItemGroup>
777+ </Project>" ) ;
778+ Actions . LoadXml [ "test1.csproj" ] = csproj1 ;
779+
780+ var csproj2 = new XmlDocument ( ) ;
781+ csproj2 . LoadXml ( @"<?xml version=""1.0"" encoding=""utf - 8""?>
782+ <Project ToolsVersion=""15.0"" xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
783+ <ItemGroup>
784+ <Compile Include=""test1.cs"" />
785+ </ItemGroup>
786+ </Project>" ) ;
787+ Actions . LoadXml [ "test2.csproj" ] = csproj2 ;
788+
789+ var autobuilder = CreateAutoBuilder ( "csharp" , true , msBuildArguments : "/P:Fu=Bar" , msBuildTarget : "Windows" , msBuildPlatform : "x86" , msBuildConfiguration : "Debug" ,
790+ vsToolsVersion : "12" ) ;
791+
792+ TestAutobuilderScript ( autobuilder , 0 , 6 ) ;
793+ }
794+
748795 [ Fact ]
749796 public void TestWindowCSharpMsBuildFailed ( )
750797 {
0 commit comments