--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+ <ProductVersion>9.0.30729</ProductVersion>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
+ <ProjectGuid>{AE80331E-4C95-4F65-BE43-0C3011661AE1}</ProjectGuid>\r
+ <OutputType>Library</OutputType>\r
+ <NoWarn>1699</NoWarn>\r
+ <OutputPath>bin\Debug\Microsoft.Build.Engine-tests-net_4_5</OutputPath>\r
+ <NoStdLib>True</NoStdLib>\r
+ <NoConfig>False</NoConfig>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <AssemblyName>Microsoft.Build.Engine_test_net_4_5</AssemblyName>\r
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
+ <FileAlignment>512</FileAlignment>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>pdbonly</DebugType>\r
+ <Optimize>true</Optimize>\r
+ <DefineConstants>NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
+ Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
+ is a problem to compile the Mono mscorlib.dll -->\r
+ <PropertyGroup>\r
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
+ </PropertyGroup>\r
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+ <ItemGroup>\r
+ <Compile Include="..\Microsoft.Build.Tasks\Test\Microsoft.Build.Tasks\TestMessageLogger.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\BuildChooseTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\BuildItemGroupCollectionTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\BuildItemGroupTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\BuildItemTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\BuildPropertyGroupCollectionTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\BuildPropertyGroupTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\BuildPropertyTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\BuildTaskTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\ConsoleLoggerTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\Consts.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\EngineTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\ImportCollectionTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\ImportTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\InternalLoggerExceptionTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\InvalidProjectFileExceptionTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\ProjectTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\TargetCollectionTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\TargetTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\TestNamespaceManager.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\UsingTaskCollectionTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\UsingTaskTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.BuildEngine\UtilitiesTest.cs" />\r
+ <Compile Include="Test\various\Build.cs" />\r
+ <Compile Include="Test\various\Conditions.cs" />\r
+ <Compile Include="Test\various\DefaultTasks.cs" />\r
+ <Compile Include="Test\various\EvaluationOrder.cs" />\r
+ <Compile Include="Test\various\Items.cs" />\r
+ <Compile Include="Test\various\ProjectElement.cs" />\r
+ <Compile Include="Test\various\Properties.cs" />\r
+ </ItemGroup>\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+ Other similar extension points exist, see Microsoft.Common.targets.\r
+ <Target Name="BeforeBuild">\r
+ </Target>\r
+ <Target Name="AfterBuild">\r
+ </Target>\r
+ -->\r
+ <ItemGroup>\r
+ <Reference Include="System" />\r
+ <Reference Include="System.Xml" />\r
+ <Reference Include="System.Core" />\r
+ <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />\r
+ <ProjectReference Include="Microsoft.Build.Engine-useful.csproj">\r
+ <Project>{0DA63190-E6E1-41C5-B683-A54FADBE61CB}</Project>\r
+ <Name>Microsoft.Build.Engine-useful</Name>\r
+ </ProjectReference>\r
+ <ProjectReference Include="..\Microsoft.Build.Framework\Microsoft.Build.Framework-useful.csproj">\r
+ <Project>{2BAFB878-D329-46A5-93AF-5A4ECD403A13}</Project>\r
+ <Name>Microsoft.Build.Framework-useful</Name>\r
+ </ProjectReference>\r
+ <ProjectReference Include="..\Microsoft.Build.Utilities\Microsoft.Build.Utilities-useful.csproj">\r
+ <Project>{5CD66EA1-51EB-48EE-8C1C-DDFD23E22C38}</Project>\r
+ <Name>Microsoft.Build.Utilities-useful</Name>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Folder Include="Properties\" />\r
+ </ItemGroup>\r
+</Project>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+ <ProductVersion>9.0.30729</ProductVersion>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
+ <ProjectGuid>{0DA63190-E6E1-41C5-B683-A54FADBE61CB}</ProjectGuid>\r
+ <OutputType>Library</OutputType>\r
+ <NoWarn>1699</NoWarn>\r
+ <OutputPath>bin\Debug\Microsoft.Build.Engine-net_4_5</OutputPath>\r
+ <NoStdLib>True</NoStdLib>\r
+ <NoConfig>True</NoConfig>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <AssemblyName>Microsoft.Build.Engine</AssemblyName>\r
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
+ <FileAlignment>512</FileAlignment>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>pdbonly</DebugType>\r
+ <Optimize>true</Optimize>\r
+ <DefineConstants>NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
+ Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
+ is a problem to compile the Mono mscorlib.dll -->\r
+ <PropertyGroup>\r
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
+ </PropertyGroup>\r
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+ <ItemGroup>\r
+ <Compile Include="..\..\build\common\Consts.cs" />\r
+ <Compile Include="..\..\build\common\MonoTODOAttribute.cs" />\r
+ <Compile Include="..\..\tools\xbuild\SolutionParser.cs" />\r
+ <Compile Include="..\Microsoft.Build.Framework\Mono.XBuild.Framework\AssemblyLoadInfo.cs" />\r
+ <Compile Include="..\Microsoft.Build.Utilities\Mono.XBuild.Utilities\MSBuildUtils.cs" />\r
+ <Compile Include="..\Microsoft.Build.Utilities\Mono.XBuild.Utilities\ReservedNameUtils.cs" />\r
+ <Compile Include="Assembly\AssemblyInfo.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\BatchingImplBase.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\BuildChoose.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\BuildEngine.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\BuildItem.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\BuildItemGroup.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\BuildItemGroupCollection.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\BuildProperty.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\BuildPropertyGroup.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\BuildPropertyGroupCollection.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\BuildSettings.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\BuildTask.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\BuildTaskItem.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\BuildTaskItemGroup.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\BuildTaskPropertyGroup.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\BuildWhen.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ChangeType.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ColorResetter.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ColorSetter.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ConditionAndExpression.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ConditionExpression.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ConditionFactorExpresion.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ConditionFunctionExpression.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ConditionNotExpression.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ConditionOrExpression.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ConditionParser.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ConditionRelationalExpression.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ConditionTokenizer.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ConsoleLogger.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\DirectoryScanner.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\Engine.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\EventSource.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\Expression.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ExpressionCollection.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ExpressionEvaluationException.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ExpressionParseException.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\FileLogger.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\GroupingCollection.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\IBuildTask.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\Import.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ImportCollection.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ImportedProject.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\InternalLoggerException.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\InvalidProjectFileException.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\IReference.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ItemReference.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\LogExtensions.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\MetadataReference.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\Project.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ProjectLoadSettings.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\PropertyPosition.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\PropertyReference.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\Target.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\TargetBatchingImpl.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\TargetCollection.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\TaskBatchingImpl.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\TaskDatabase.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\TaskEngine.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\Token.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\Toolset.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ToolsetCollection.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\ToolsetDefinitionLocations.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\UnknownToolsVersionException.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\UsingTask.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\UsingTaskCollection.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\Utilities.cs" />\r
+ <Compile Include="Microsoft.Build.BuildEngine\WriteHandler.cs" />\r
+ </ItemGroup>\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+ Other similar extension points exist, see Microsoft.Common.targets.\r
+ <Target Name="BeforeBuild">\r
+ </Target>\r
+ <Target Name="AfterBuild">\r
+ </Target>\r
+ -->\r
+ <ItemGroup>\r
+ <ProjectReference Include="..\Microsoft.Build.Framework\Microsoft.Build.Framework-useful.csproj">\r
+ <Project>{2BAFB878-D329-46A5-93AF-5A4ECD403A13}</Project>\r
+ <Name>Microsoft.Build.Framework-useful</Name>\r
+ </ProjectReference>\r
+ <ProjectReference Include="..\Microsoft.Build.Utilities\Microsoft.Build.Utilities-useful.csproj">\r
+ <Project>{5CD66EA1-51EB-48EE-8C1C-DDFD23E22C38}</Project>\r
+ <Name>Microsoft.Build.Utilities-useful</Name>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Folder Include="Properties\" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Reference Include="System" />\r
+ <Reference Include="System.Xml" />\r
+ <Reference Include="System.Core" />\r
+ </ItemGroup>\r
+</Project>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+ <ProductVersion>9.0.30729</ProductVersion>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
+ <ProjectGuid>{DB6937A9-D27A-42AB-A044-1DB4B1F97414}</ProjectGuid>\r
+ <OutputType>Library</OutputType>\r
+ <NoWarn>1699</NoWarn>\r
+ <OutputPath>bin\Debug\Microsoft.Build.Framework-tests-net_4_5</OutputPath>\r
+ <NoStdLib>True</NoStdLib>\r
+ <NoConfig>False</NoConfig>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <AssemblyName>Microsoft.Build.Framework_test_net_4_5</AssemblyName>\r
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
+ <FileAlignment>512</FileAlignment>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>pdbonly</DebugType>\r
+ <Optimize>true</Optimize>\r
+ <DefineConstants>NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
+ Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
+ is a problem to compile the Mono mscorlib.dll -->\r
+ <PropertyGroup>\r
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
+ </PropertyGroup>\r
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+ <ItemGroup>\r
+ <Compile Include="Test\Microsoft.Build.Framework\BuildErrorEventArgsTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Framework\BuildEventArgsTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Framework\BuildFinishedEventArgsTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Framework\BuildMessageEventArgsTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Framework\BuildStartedEventArgsTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Framework\BuildWarningEventArgsTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Framework\ExternalProjectFinishedEventArgsTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Framework\ExternalProjectStartedEventArgsTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Framework\LoggerExceptionTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Framework\ProjectFinishedEventArgsTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Framework\ProjectStartedEventArgsTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Framework\TargetFinishedEventArgsTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Framework\TargetStartedEventArgsTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Framework\TaskCommandLineEventArgsTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Framework\TaskFinishedEventArgsTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Framework\TaskStartedEventArgsTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Framework\BuildEventContextTest.cs" />\r
+ </ItemGroup>\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+ Other similar extension points exist, see Microsoft.Common.targets.\r
+ <Target Name="BeforeBuild">\r
+ </Target>\r
+ <Target Name="AfterBuild">\r
+ </Target>\r
+ -->\r
+ <ItemGroup>\r
+ <Reference Include="System" />\r
+ <Reference Include="System.Xml" />\r
+ <Reference Include="System.Core" />\r
+ <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />\r
+ <ProjectReference Include="Microsoft.Build.Framework-useful.csproj">\r
+ <Project>{2BAFB878-D329-46A5-93AF-5A4ECD403A13}</Project>\r
+ <Name>Microsoft.Build.Framework-useful</Name>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Folder Include="Properties\" />\r
+ </ItemGroup>\r
+</Project>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+ <ProductVersion>9.0.30729</ProductVersion>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
+ <ProjectGuid>{2BAFB878-D329-46A5-93AF-5A4ECD403A13}</ProjectGuid>\r
+ <OutputType>Library</OutputType>\r
+ <NoWarn>1699</NoWarn>\r
+ <OutputPath>bin\Debug\Microsoft.Build.Framework-net_4_5</OutputPath>\r
+ <NoStdLib>True</NoStdLib>\r
+ <NoConfig>True</NoConfig>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <AssemblyName>Microsoft.Build.Framework</AssemblyName>\r
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
+ <FileAlignment>512</FileAlignment>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>pdbonly</DebugType>\r
+ <Optimize>true</Optimize>\r
+ <DefineConstants>NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
+ Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
+ is a problem to compile the Mono mscorlib.dll -->\r
+ <PropertyGroup>\r
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
+ </PropertyGroup>\r
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+ <ItemGroup>\r
+ <Compile Include="..\..\build\common\Consts.cs" />\r
+ <Compile Include="..\..\build\common\MonoTODOAttribute.cs" />\r
+ <Compile Include="Assembly\AssemblyInfo.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\AnyEventHandler.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\BuildErrorEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\BuildErrorEventHandler.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\BuildEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\BuildFinishedEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\BuildFinishedEventHandler.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\BuildMessageEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\BuildMessageEventHandler.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\BuildStartedEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\BuildStartedEventHandler.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\BuildStatusEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\BuildStatusEventHandler.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\BuildWarningEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\BuildWarningEventHandler.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\CustomBuildEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\CustomBuildEventHandler.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\ExternalProjectFinishedEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\ExternalProjectStartedEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\IBuildEngine.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\IBuildEngine2.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\ICancelableTask.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\IEventSource.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\ILogger.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\INodeLogger.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\ITask.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\ITaskHost.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\ITaskItem.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\ITaskItem2.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\LoadInSeparateAppDomainAttribute.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\LoggerException.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\LoggerVerbosity.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\MessageImportance.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\OutputAttribute.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\ProjectFinishedEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\ProjectFinishedEventHandler.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\ProjectStartedEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\ProjectStartedEventHandler.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\RequiredAttribute.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\TargetFinishedEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\TargetFinishedEventHandler.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\TargetStartedEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\TargetStartedEventHandler.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\TaskCommandLineEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\TaskFinishedEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\TaskFinishedEventHandler.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\TaskStartedEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\TaskStartedEventHandler.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\LazyFormattedBuildEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\IBuildEngine3.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\BuildEngineResult.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\IBuildEngine4.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\RegisteredTaskObjectLifetime.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\BuildEventContext.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\IForwardingLogger.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\IEventRedirector.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\ITaskFactory.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\TaskPropertyInfo.cs" />\r
+ <Compile Include="Microsoft.Build.Framework\ITaskFactory2.cs" />\r
+ </ItemGroup>\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+ Other similar extension points exist, see Microsoft.Common.targets.\r
+ <Target Name="BeforeBuild">\r
+ </Target>\r
+ <Target Name="AfterBuild">\r
+ </Target>\r
+ -->\r
+ <ItemGroup>\r
+ <Folder Include="Properties\" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Reference Include="System" />\r
+ <Reference Include="System.Xml" />\r
+ <Reference Include="System.Core" />\r
+ </ItemGroup>\r
+</Project>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+ <ProductVersion>9.0.30729</ProductVersion>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
+ <ProjectGuid>{E572DA55-C0E6-42BA-9BCF-05B2C777D15B}</ProjectGuid>\r
+ <OutputType>Library</OutputType>\r
+ <NoWarn>1699</NoWarn>\r
+ <OutputPath>bin\Debug\Microsoft.Build.Tasks-tests-net_4_5</OutputPath>\r
+ <NoStdLib>True</NoStdLib>\r
+ <NoConfig>False</NoConfig>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <AssemblyName>Microsoft.Build.Tasks_test_net_4_5</AssemblyName>\r
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
+ <FileAlignment>512</FileAlignment>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>pdbonly</DebugType>\r
+ <Optimize>true</Optimize>\r
+ <DefineConstants>NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
+ Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
+ is a problem to compile the Mono mscorlib.dll -->\r
+ <PropertyGroup>\r
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
+ </PropertyGroup>\r
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+ <ItemGroup>\r
+ <Compile Include="..\Microsoft.Build.Engine\Test\Microsoft.Build.BuildEngine\Consts.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\ALTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\AssignCultureTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\AssignProjectConfigurationTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\AssignTargetPathTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\CombinePathTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\CopyTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\CreateCSharpManifestResourceNameTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\CreateItemTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\CreatePropertyTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\CreateVisualBasicManifestResourceNameTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\CscTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\DeleteTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\ErrorTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\FindAppConfigFileTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\GetFrameworkPathTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\GetFrameworkSdkPathTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\LCTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\MakeDirTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\ManagedCompilerTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\MessageTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\RemoveDirTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\RemoveDuplicatesTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\ResolveAssemblyReferenceTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\TaskBatchingTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\TestEngine.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\TestMessageLogger.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\WarningTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Tasks\WriteLinesToFileTest.cs" />\r
+ </ItemGroup>\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+ Other similar extension points exist, see Microsoft.Common.targets.\r
+ <Target Name="BeforeBuild">\r
+ </Target>\r
+ <Target Name="AfterBuild">\r
+ </Target>\r
+ -->\r
+ <ItemGroup>\r
+ <Reference Include="..\lib\net_4_5\nunit.framework.dll" />\r
+ <Reference Include="System" />\r
+ <Reference Include="System.Xml" />\r
+ <Reference Include="System.Core" />\r
+ <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />\r
+ <ProjectReference Include="..\Microsoft.Build.Engine\Microsoft.Build.Engine-useful.csproj">\r
+ <Project>{0DA63190-E6E1-41C5-B683-A54FADBE61CB}</Project>\r
+ <Name>Microsoft.Build.Engine-useful</Name>\r
+ </ProjectReference>\r
+ <ProjectReference Include="..\Microsoft.Build.Framework\Microsoft.Build.Framework-useful.csproj">\r
+ <Project>{2BAFB878-D329-46A5-93AF-5A4ECD403A13}</Project>\r
+ <Name>Microsoft.Build.Framework-useful</Name>\r
+ </ProjectReference>\r
+ <ProjectReference Include="Microsoft.Build.Tasks-useful.csproj">\r
+ <Project>{B0995E00-BF37-4B8A-8229-285C060E5957}</Project>\r
+ <Name>Microsoft.Build.Tasks-useful</Name>\r
+ </ProjectReference>\r
+ <ProjectReference Include="..\Microsoft.Build.Utilities\Microsoft.Build.Utilities-useful.csproj">\r
+ <Project>{5CD66EA1-51EB-48EE-8C1C-DDFD23E22C38}</Project>\r
+ <Name>Microsoft.Build.Utilities-useful</Name>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Folder Include="Properties\" />\r
+ </ItemGroup>\r
+</Project>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+ <ProductVersion>9.0.30729</ProductVersion>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
+ <ProjectGuid>{B0995E00-BF37-4B8A-8229-285C060E5957}</ProjectGuid>\r
+ <OutputType>Library</OutputType>\r
+ <NoWarn>1699</NoWarn>\r
+ <OutputPath>bin\Debug\Microsoft.Build.Tasks-net_4_5</OutputPath>\r
+ <NoStdLib>True</NoStdLib>\r
+ <NoConfig>True</NoConfig>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <AssemblyName>Microsoft.Build.Tasks.v4.0</AssemblyName>\r
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
+ <FileAlignment>512</FileAlignment>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>pdbonly</DebugType>\r
+ <Optimize>true</Optimize>\r
+ <DefineConstants>NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
+ Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
+ is a problem to compile the Mono mscorlib.dll -->\r
+ <PropertyGroup>\r
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
+ </PropertyGroup>\r
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+ <ItemGroup>\r
+ <Compile Include="..\..\build\common\Consts.cs" />\r
+ <Compile Include="..\..\build\common\MonoTODOAttribute.cs" />\r
+ <Compile Include="..\Microsoft.Build.Engine\Microsoft.Build.BuildEngine\DirectoryScanner.cs" />\r
+ <Compile Include="..\Microsoft.Build.Engine\Microsoft.Build.BuildEngine\UnknownToolsVersionException.cs" />\r
+ <Compile Include="..\Microsoft.Build.Utilities\Mono.XBuild.Utilities\MSBuildUtils.cs" />\r
+ <Compile Include="Assembly\AssemblyInfo.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\BootstrapperBuilder.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\BuildMessage.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\BuildMessageSeverity.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\BuildResults.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\BuildSettings.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\ComponentsLocation.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\IBootstrapperBuilder.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\IBuildMessage.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\IBuildResults.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\IBuildSettings.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\IProduct.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\IProductBuilder.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\IProductBuilderCollection.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\IProductCollection.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\Product.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\ProductBuilder.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\ProductBuilderCollection.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.Bootstrapper\ProductCollection.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\ApplicationIdentity.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\ApplicationManifest.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\AssemblyIdentity.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\AssemblyManifest.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\AssemblyReference.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\AssemblyReferenceCollection.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\AssemblyReferenceType.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\BaseReference.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\ComClass.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\DeployManifest.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\FileReference.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\FileReferenceCollection.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\Manifest.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\ManifestReader.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\ManifestWriter.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\OutputMessage.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\OutputMessageCollection.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\OutputMessageType.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\ProxyStub.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\SecurityUtilities.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\TrustInfo.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\TypeLib.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\UpdateMode.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\UpdateUnit.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Deployment.ManifestUtilities\WindowClass.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Hosting\ICscHostObject.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks.Hosting\IVbcHostObject.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\AL.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\AppDomainIsolatedTaskExtension.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\AspNetCompiler.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\AssemblyResolver.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\AssignCulture.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\AssignProjectConfiguration.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\AssignTargetPath.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\CallTarget.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\CombinePath.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\CommandLineBuilderExtension.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\Copy.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\CreateCSharpManifestResourceName.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\CreateItem.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\CreateManifestResourceName.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\CreateProperty.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\CreateTemporaryVCProject.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\CreateVisualBasicManifestResourceName.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\Csc.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\Delete.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\Error.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\Exec.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\ExtractedClassName.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\FindAppConfigFile.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\FindUnderPath.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\FormatUrl.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\FormatVersion.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\GenerateApplicationManifest.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\GenerateBootstrapper.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\GenerateDeploymentManifest.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\GenerateManifestBase.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\GenerateResource.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\GenerateTrustInfo.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\GetAssemblyIdentity.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\GetFrameworkPath.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\GetFrameworkSdkPath.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\GetReferenceAssemblyPaths.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\LC.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\LibraryPcFileCache.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\MakeDir.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\ManagedCompiler.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\Message.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\MSBuild.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\PcFileCache.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\ReadLinesFromFile.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\RegisterAssembly.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\RemoveDir.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\RemoveDuplicates.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\ResolveAssemblyReference.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\ResolvedReference.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\ResolveManifestFiles.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\ResolveProjectBase.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\SGen.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\SignFile.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\TaskExtension.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\TaskLoggingHelperExtension.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\ToolTaskExtension.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\Touch.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\UnregisterAssembly.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\UpdateManifest.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\Vbc.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\VCBuild.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\Warning.cs" />\r
+ <Compile Include="Microsoft.Build.Tasks\WriteLinesToFile.cs" />\r
+ <Compile Include="Mono.XBuild.Tasks.GenerateResourceInternal\PoResourceReader.cs" />\r
+ <Compile Include="Mono.XBuild.Tasks.GenerateResourceInternal\PoResourceWriter.cs" />\r
+ <Compile Include="Mono.XBuild.Tasks.GenerateResourceInternal\TxtResourceReader.cs" />\r
+ <Compile Include="Mono.XBuild.Tasks.GenerateResourceInternal\TxtResourceWriter.cs" />\r
+ </ItemGroup>\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+ Other similar extension points exist, see Microsoft.Common.targets.\r
+ <Target Name="BeforeBuild">\r
+ </Target>\r
+ <Target Name="AfterBuild">\r
+ </Target>\r
+ -->\r
+ <ItemGroup>\r
+ <ProjectReference Include="..\Microsoft.Build.Engine\Microsoft.Build.Engine-useful.csproj">\r
+ <Project>{0DA63190-E6E1-41C5-B683-A54FADBE61CB}</Project>\r
+ <Name>Microsoft.Build.Engine-useful</Name>\r
+ </ProjectReference>\r
+ <ProjectReference Include="..\Microsoft.Build.Framework\Microsoft.Build.Framework-useful.csproj">\r
+ <Project>{2BAFB878-D329-46A5-93AF-5A4ECD403A13}</Project>\r
+ <Name>Microsoft.Build.Framework-useful</Name>\r
+ </ProjectReference>\r
+ <ProjectReference Include="..\Microsoft.Build.Utilities\Microsoft.Build.Utilities-useful.csproj">\r
+ <Project>{5CD66EA1-51EB-48EE-8C1C-DDFD23E22C38}</Project>\r
+ <Name>Microsoft.Build.Utilities-useful</Name>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Folder Include="Properties\" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Reference Include="System" />\r
+ <Reference Include="System.Core" />\r
+ <Reference Include="System.Xml" />\r
+ </ItemGroup>\r
+</Project>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+ <ProductVersion>9.0.30729</ProductVersion>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
+ <ProjectGuid>{7E7B683B-FA73-492D-A59B-E13AF28F8B21}</ProjectGuid>\r
+ <OutputType>Library</OutputType>\r
+ <NoWarn>1699</NoWarn>\r
+ <OutputPath>bin\Debug\Microsoft.Build.Utilities-tests-net_4_5</OutputPath>\r
+ <NoStdLib>True</NoStdLib>\r
+ <NoConfig>False</NoConfig>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <AssemblyName>Microsoft.Build.Utilities_test_net_4_5</AssemblyName>\r
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
+ <FileAlignment>512</FileAlignment>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>pdbonly</DebugType>\r
+ <Optimize>true</Optimize>\r
+ <DefineConstants>NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
+ Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
+ is a problem to compile the Mono mscorlib.dll -->\r
+ <PropertyGroup>\r
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
+ </PropertyGroup>\r
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+ <ItemGroup>\r
+ <Compile Include="Test\Microsoft.Build.Utilities\CommandLineBuilderTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Utilities\LoggerTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Utilities\TaskItemTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Utilities\TaskLoggingHelperTest.cs" />\r
+ </ItemGroup>\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+ Other similar extension points exist, see Microsoft.Common.targets.\r
+ <Target Name="BeforeBuild">\r
+ </Target>\r
+ <Target Name="AfterBuild">\r
+ </Target>\r
+ -->\r
+ <ItemGroup>\r
+ <Reference Include="..\lib\net_4_5\nunit.framework.dll" />\r
+ <Reference Include="System" />\r
+ <Reference Include="System.Xml" />\r
+ <Reference Include="System.Core" />\r
+ <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />\r
+ <ProjectReference Include="..\Microsoft.Build.Framework\Microsoft.Build.Framework-useful.csproj">\r
+ <Project>{2BAFB878-D329-46A5-93AF-5A4ECD403A13}</Project>\r
+ <Name>Microsoft.Build.Framework-useful</Name>\r
+ </ProjectReference>\r
+ <ProjectReference Include="Microsoft.Build.Utilities-useful.csproj">\r
+ <Project>{5CD66EA1-51EB-48EE-8C1C-DDFD23E22C38}</Project>\r
+ <Name>Microsoft.Build.Utilities-useful</Name>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Folder Include="Properties\" />\r
+ </ItemGroup>\r
+</Project>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+ <ProductVersion>9.0.30729</ProductVersion>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
+ <ProjectGuid>{5CD66EA1-51EB-48EE-8C1C-DDFD23E22C38}</ProjectGuid>\r
+ <OutputType>Library</OutputType>\r
+ <NoWarn>1699</NoWarn>\r
+ <OutputPath>bin\Debug\Microsoft.Build.Utilities-net_4_5</OutputPath>\r
+ <NoStdLib>True</NoStdLib>\r
+ <NoConfig>True</NoConfig>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <AssemblyName>Microsoft.Build.Utilities.v4.0</AssemblyName>\r
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
+ <FileAlignment>512</FileAlignment>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>pdbonly</DebugType>\r
+ <Optimize>true</Optimize>\r
+ <DefineConstants>NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
+ Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
+ is a problem to compile the Mono mscorlib.dll -->\r
+ <PropertyGroup>\r
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
+ </PropertyGroup>\r
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+ <ItemGroup>\r
+ <Compile Include="..\..\build\common\Consts.cs" />\r
+ <Compile Include="..\..\build\common\MonoTODOAttribute.cs" />\r
+ <Compile Include="..\System\System.Collections.Specialized\ProcessStringDictionary.cs" />\r
+ <Compile Include="Assembly\AssemblyInfo.cs" />\r
+ <Compile Include="Microsoft.Build.Utilities\AppDomainIsolatedTask.cs" />\r
+ <Compile Include="Microsoft.Build.Utilities\CommandLineBuilder.cs" />\r
+ <Compile Include="Microsoft.Build.Utilities\HostObjectInitializationStatus.cs" />\r
+ <Compile Include="Microsoft.Build.Utilities\IAsyncOperation.cs" />\r
+ <Compile Include="Microsoft.Build.Utilities\IProcessAsyncOperation.cs" />\r
+ <Compile Include="Microsoft.Build.Utilities\Logger.cs" />\r
+ <Compile Include="Microsoft.Build.Utilities\ProcessService.cs" />\r
+ <Compile Include="Microsoft.Build.Utilities\ProcessWrapper.cs" />\r
+ <Compile Include="Microsoft.Build.Utilities\TargetDotNetFrameworkVersion.cs" />\r
+ <Compile Include="Microsoft.Build.Utilities\Task.cs" />\r
+ <Compile Include="Microsoft.Build.Utilities\TaskItem.cs" />\r
+ <Compile Include="Microsoft.Build.Utilities\TaskLoggingHelper.cs" />\r
+ <Compile Include="Microsoft.Build.Utilities\ToolLocationHelper.cs" />\r
+ <Compile Include="Microsoft.Build.Utilities\ToolTask.cs" />\r
+ <Compile Include="Mono.XBuild.Utilities\MonoLocationHelper.cs" />\r
+ <Compile Include="Mono.XBuild.Utilities\MSBuildUtils.cs" />\r
+ <Compile Include="Mono.XBuild.Utilities\ReservedNameUtils.cs" />\r
+ </ItemGroup>\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+ Other similar extension points exist, see Microsoft.Common.targets.\r
+ <Target Name="BeforeBuild">\r
+ </Target>\r
+ <Target Name="AfterBuild">\r
+ </Target>\r
+ -->\r
+ <ItemGroup>\r
+ <ProjectReference Include="..\Microsoft.Build.Framework\Microsoft.Build.Framework-useful.csproj">\r
+ <Project>{2BAFB878-D329-46A5-93AF-5A4ECD403A13}</Project>\r
+ <Name>Microsoft.Build.Framework-useful</Name>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Folder Include="Properties\" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Reference Include="System" />\r
+ <Reference Include="System.Xml" />\r
+ <Reference Include="System.Core" />\r
+ </ItemGroup>\r
+</Project>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+ <ProductVersion>9.0.30729</ProductVersion>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
+ <ProjectGuid>{E34212A3-F152-4A6F-88F7-7A4D0324D11C}</ProjectGuid>\r
+ <OutputType>Library</OutputType>\r
+ <NoWarn>1699</NoWarn>\r
+ <OutputPath>bin\Debug\Microsoft.Build-tests-net_4_5</OutputPath>\r
+ <NoStdLib>True</NoStdLib>\r
+ <NoConfig>False</NoConfig>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <AssemblyName>Microsoft.Build_test_net_4_5</AssemblyName>\r
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
+ <FileAlignment>512</FileAlignment>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>pdbonly</DebugType>\r
+ <Optimize>true</Optimize>\r
+ <DefineConstants>NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
+ Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
+ is a problem to compile the Mono mscorlib.dll -->\r
+ <PropertyGroup>\r
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
+ </PropertyGroup>\r
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+ <ItemGroup>\r
+ <Compile Include="Test\FunctionalTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Internal\CollectionFromEnumerableTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Logging\ConsoleLoggerTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Logging\LoggerDescriptionTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Evaluation\ToolsetTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Construction\ProjectRootElementTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Execution\ProjectInstanceTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Evaluation\ProjectTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Execution\BuildManagerTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Evaluation\ProjectCollectionTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Execution\BuildParametersTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Evaluation\ProjectPropertyTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Evaluation\ProjectItemDefinitionTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Evaluation\ProjectItemTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Internal\ExpressionParserTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Construction\ProjectItemElementTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Evaluation\ResolvedImportTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Execution\ProjectMetadataInstanceTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Execution\ProjectTargetInstanceTest.cs" />\r
+ <Compile Include="Test\Microsoft.Build.Execution\BuildSubmissionTest.cs" />\r
+ </ItemGroup>\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+ Other similar extension points exist, see Microsoft.Common.targets.\r
+ <Target Name="BeforeBuild">\r
+ </Target>\r
+ <Target Name="AfterBuild">\r
+ </Target>\r
+ -->\r
+ <ItemGroup>\r
+ <Reference Include="..\lib\net_4_5\nunit.framework.dll" />\r
+ <Reference Include="System" />\r
+ <Reference Include="System.Xml" />\r
+ <Reference Include="System.Core" />\r
+ <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />\r
+ <ProjectReference Include="Microsoft.Build-useful.csproj">\r
+ <Project>{D8A2B8F2-F52B-44D5-A868-C344682749E2}</Project>\r
+ <Name>Microsoft.Build-useful</Name>\r
+ </ProjectReference>\r
+ <ProjectReference Include="..\Microsoft.Build.Framework\Microsoft.Build.Framework-useful.csproj">\r
+ <Project>{2BAFB878-D329-46A5-93AF-5A4ECD403A13}</Project>\r
+ <Name>Microsoft.Build.Framework-useful</Name>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Folder Include="Properties\" />\r
+ <Folder Include="Test\" />\r
+ <Folder Include="Test\Microsoft.Build.Execution\" />\r
+ </ItemGroup>\r
+</Project>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+ <ProductVersion>9.0.30729</ProductVersion>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
+ <ProjectGuid>{D8A2B8F2-F52B-44D5-A868-C344682749E2}</ProjectGuid>\r
+ <OutputType>Library</OutputType>\r
+ <NoWarn>1699</NoWarn>\r
+ <OutputPath>bin\Debug\Microsoft.Build-net_4_5</OutputPath>\r
+ <NoStdLib>True</NoStdLib>\r
+ <NoConfig>True</NoConfig>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <AssemblyName>Microsoft.Build</AssemblyName>\r
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
+ <FileAlignment>512</FileAlignment>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;MICROSOFT_BUILD_DLL</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <Optimize>true</Optimize>\r
+ <DefineConstants>NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;MICROSOFT_BUILD_DLL</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>false</NoStdLib>\r
+ </PropertyGroup>\r
+ <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
+ Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
+ is a problem to compile the Mono mscorlib.dll -->\r
+ <PropertyGroup>\r
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
+ </PropertyGroup>\r
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+ <ItemGroup>\r
+ <Compile Include="..\..\build\common\Consts.cs" />\r
+ <Compile Include="..\..\build\common\MonoTODOAttribute.cs" />\r
+ <Compile Include="Assembly\AssemblyInfo.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ElementLocation.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectChooseElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectCommentElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectElementContainer.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectExtensionsElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectImportElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectImportGroupElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectItemDefinitionElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectItemDefinitionGroupElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectItemElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectItemGroupElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectMetadataElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectOnErrorElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectOtherwiseElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectOutputElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectPropertyElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectPropertyGroupElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectRootElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectTargetElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectTaskElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectUsingTaskBodyElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectUsingTaskElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectUsingTaskParameterElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\ProjectWhenElement.cs" />\r
+ <Compile Include="Microsoft.Build.Construction\UsingTaskParameterGroupElement.cs" />\r
+ <Compile Include="Microsoft.Build.Evaluation\Project.cs" />\r
+ <Compile Include="Microsoft.Build.Evaluation\ProjectCollection.cs" />\r
+ <Compile Include="Microsoft.Build.Evaluation\ProjectItem.cs" />\r
+ <Compile Include="Microsoft.Build.Evaluation\ProjectItemDefinition.cs" />\r
+ <Compile Include="Microsoft.Build.Evaluation\ProjectLoadSettings.cs" />\r
+ <Compile Include="Microsoft.Build.Evaluation\ProjectMetadata.cs" />\r
+ <Compile Include="Microsoft.Build.Evaluation\ProjectProperty.cs" />\r
+ <Compile Include="Microsoft.Build.Evaluation\ResolvedImport.cs" />\r
+ <Compile Include="Microsoft.Build.Evaluation\Toolset.cs" />\r
+ <Compile Include="Microsoft.Build.Evaluation\ToolsetDefinitionLocations.cs" />\r
+ <Compile Include="Microsoft.Build.Exceptions\InvalidProjectFileException.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\BuildManager.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\BuildParameters.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\BuildRequestData.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\BuildRequestDataFlags.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\BuildResult.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\BuildResultCode.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\BuildSubmission.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\HostServices.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ITargetResult.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\NodeAffinity.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectInstance.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectItemDefinitionInstance.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectItemInstance.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectMetadataInstance.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectPropertyInstance.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectTargetInstance.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\TargetResult.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\TargetResultCode.cs" />\r
+ <Compile Include="Microsoft.Build.Internal\CollectionFromEnumerable.cs" />\r
+ <Compile Include="Microsoft.Build.Internal\FilteredEnumerable.cs" />\r
+ <Compile Include="Microsoft.Build.Internal\ReverseEnumerable.cs" />\r
+ <Compile Include="Microsoft.Build.Logging\ForwardingLoggerRecord.cs" />\r
+ <Compile Include="Microsoft.Build.Logging\LoggerDescription.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\BuildSubmissionCompleteCallback.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectOnErrorInstance.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectTargetInstanceChild.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectTaskInstanceChild.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectTaskOutputItemInstance.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectTaskOutputPropertyInstance.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectItemGroupTaskItemInstance.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectItemGroupTaskMetadataInstance.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectItemGroupTaskInstance.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectTaskInstance.cs" />\r
+ <Compile Include="..\Microsoft.Build.Utilities\Microsoft.Build.Utilities\ToolLocationHelper.cs">\r
+ <Link>external\utilities\ToolLocationHelper.cs</Link>\r
+ </Compile>\r
+ <Compile Include="..\Microsoft.Build.Utilities\Microsoft.Build.Utilities\TargetDotNetFrameworkVersion.cs">\r
+ <Link>external\utilities\TargetDotNetFrameworkVersion.cs</Link>\r
+ </Compile>\r
+ <Compile Include="Microsoft.Build.Evaluation\SubToolset.cs" />\r
+ <Compile Include="..\Microsoft.Build.Utilities\Mono.XBuild.Utilities\MSBuildUtils.cs">\r
+ <Link>external\utilities\MSBuildUtils.cs</Link>\r
+ </Compile>\r
+ <Compile Include="Microsoft.Build.Evaluation\ProjectCollectionChangedEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Evaluation\ProjectCollectionChangedState.cs" />\r
+ <Compile Include="Microsoft.Build.Evaluation\ProjectChangedEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Evaluation\ProjectXmlChangedEventArgs.cs" />\r
+ <Compile Include="Microsoft.Build.Internal\ExpressionParser.cs" />\r
+ <Compile Include="Microsoft.Build.Internal\ExpressionTokenizer.cs" />\r
+ <Compile Include="Microsoft.Build.Internal\ExpressionConstructs.cs" />\r
+ <Compile Include="Microsoft.Build.Internal\ExpressionEvaluator.cs" />\r
+ <Compile Include="Microsoft.Build.Internal\ExpressionParserManual.cs" />\r
+ <Compile Include="..\Microsoft.Build.Engine\Microsoft.Build.BuildEngine\DirectoryScanner.cs">\r
+ <Link>external\engine\DirectoryScanner.cs</Link>\r
+ </Compile>\r
+ <Compile Include="..\Microsoft.Build.Utilities\Microsoft.Build.Utilities\TaskItem.cs">\r
+ <Link>external\utilities\TaskItem.cs</Link>\r
+ </Compile>\r
+ <Compile Include="..\Microsoft.Build.Utilities\Mono.XBuild.Utilities\ReservedNameUtils.cs">\r
+ <Link>external\engine\ReservedNameUtils.cs</Link>\r
+ </Compile>\r
+ <Compile Include="Microsoft.Build.Internal\ProjectTaskItem.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectPropertyGroupTaskInstance.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\ProjectPropertyGroupTaskPropertyInstance.cs" />\r
+ <Compile Include="..\Microsoft.Build.Engine\Microsoft.Build.BuildEngine\ColorResetter.cs">\r
+ <Link>Microsoft.Build.Logging\ColorResetter.cs</Link>\r
+ </Compile>\r
+ <Compile Include="..\Microsoft.Build.Engine\Microsoft.Build.BuildEngine\ColorSetter.cs">\r
+ <Link>Microsoft.Build.Logging\ColorSetter.cs</Link>\r
+ </Compile>\r
+ <Compile Include="..\Microsoft.Build.Engine\Microsoft.Build.BuildEngine\ConsoleLogger.cs">\r
+ <Link>Microsoft.Build.Logging\ConsoleLogger.cs</Link>\r
+ </Compile>\r
+ <Compile Include="..\Microsoft.Build.Engine\Microsoft.Build.BuildEngine\FileLogger.cs">\r
+ <Link>Microsoft.Build.Logging\FileLogger.cs</Link>\r
+ </Compile>\r
+ <Compile Include="..\Microsoft.Build.Engine\Microsoft.Build.BuildEngine\WriteHandler.cs">\r
+ <Link>Microsoft.Build.Logging\WriteHandler.cs</Link>\r
+ </Compile>\r
+ <Compile Include="Microsoft.Build.Logging\ConfigurableForwardingLogger.cs" />\r
+ <Compile Include="Microsoft.Build.Logging\DistributedFileLogger.cs" />\r
+ <Compile Include="Microsoft.Build.Internal\WindowsCompatibilityExtensions.cs" />\r
+ <Compile Include="..\Microsoft.Build.Engine\Microsoft.Build.BuildEngine\EventSource.cs">\r
+ <Link>external\engine\EventSource.cs</Link>\r
+ </Compile>\r
+ <Compile Include="Microsoft.Build.Internal\BuildEngine4.cs" />\r
+ <Compile Include="Microsoft.Build.Internal\BuildNodeManager.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\OutOfProcNode.cs" />\r
+ <Compile Include="Microsoft.Build.Execution\NodeEngineShutdownReason.cs" />\r
+ <Compile Include="Microsoft.Build.Internal\BuildTaskDatabase.cs" />\r
+ <Compile Include="Microsoft.Build.Internal\BuildTaskFactory.cs" />\r
+ <Compile Include="Microsoft.Build.Exceptions\BuildAbortedException.cs" />\r
+ <Compile Include="Microsoft.Build.Exceptions\InvalidToolsetDefinitionException.cs" />\r
+ <Compile Include="Microsoft.Build.Exceptions\InternalLoggerException.cs" />\r
+ </ItemGroup>\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+ Other similar extension points exist, see Microsoft.Common.targets.\r
+ <Target Name="BeforeBuild">\r
+ </Target>\r
+ <Target Name="AfterBuild">\r
+ </Target>\r
+ -->\r
+ <ItemGroup>\r
+ <ProjectReference Include="..\Microsoft.Build.Engine\Microsoft.Build.Engine-useful.csproj">\r
+ <Project>{0DA63190-E6E1-41C5-B683-A54FADBE61CB}</Project>\r
+ <Name>Microsoft.Build.Engine-useful</Name>\r
+ </ProjectReference>\r
+ <ProjectReference Include="..\Microsoft.Build.Framework\Microsoft.Build.Framework-useful.csproj">\r
+ <Project>{2BAFB878-D329-46A5-93AF-5A4ECD403A13}</Project>\r
+ <Name>Microsoft.Build.Framework-useful</Name>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Folder Include="Properties\" />\r
+ <Folder Include="external\" />\r
+ <Folder Include="external\engine\" />\r
+ <Folder Include="external\utilities\" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Reference Include="System" />\r
+ <Reference Include="System.Xml" />\r
+ <Reference Include="System.Core" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="Microsoft.Build.Internal\ExpressionParser.jay" />\r
+ </ItemGroup>\r
+</Project>\r
public bool SkipEvaluation { get; set; }
- public IDictionary<string, ProjectTargetInstance> Targets {
+ #if NET_4_5
+ public
+ #else
+ internal
+ #endif
+ IDictionary<string, ProjectTargetInstance> Targets {
get { return targets; }
}
get { return properties; }
}
- public IDictionary<string, ProjectTargetInstance> Targets {
+ #if NET_4_5
+ public
+ #else
+ internal
+ #endif
+ IDictionary<string, ProjectTargetInstance> Targets {
get { return targets; }
}
namespace Microsoft.Build.Execution
{
- public sealed class ProjectTargetInstance
+#if NET_4_5
+ public
+#endif
+ sealed class ProjectTargetInstance
{
internal ProjectTargetInstance (ProjectTargetElement xml)
{
Outputs = xml.Outputs;
Returns = xml.Returns;
Tasks = xml.Tasks.Select (t => new ProjectTaskInstance (t)).ToArray ();
+ #if NET_4_5
AfterTargetsLocation = xml.AfterTargetsLocation;
BeforeTargetsLocation = xml.BeforeTargetsLocation;
ConditionLocation = xml.ConditionLocation;
Location = xml.Location;
OutputsLocation = xml.OutputsLocation;
ReturnsLocation = xml.ReturnsLocation;
+ #endif
}
+ public ElementLocation AfterTargetsLocation { get; private set; }
+ public ElementLocation BeforeTargetsLocation { get; private set; }
public IList<ProjectTargetInstanceChild> Children { get; private set; }
public string Condition { get; private set; }
+ public ElementLocation ConditionLocation { get; private set; }
public string DependsOnTargets { get; private set; }
+ public ElementLocation DependsOnTargetsLocation { get; private set; }
public string FullPath { get; private set; }
public string Inputs { get; private set; }
+ public ElementLocation InputsLocation { get; private set; }
public string KeepDuplicateOutputs { get; private set; }
+ public ElementLocation KeepDuplicateOutputsLocation { get; private set; }
+ public ElementLocation Location { get; private set; }
public string Name { get; private set; }
public IList<ProjectOnErrorInstance> OnErrorChildren { get; private set; }
public string Outputs { get; private set; }
- public string Returns { get; private set; }
- public ICollection<ProjectTaskInstance> Tasks { get; private set; }
-#if NET_4_5
- public ElementLocation AfterTargetsLocation { get; private set; }
- public ElementLocation BeforeTargetsLocation { get; private set; }
- public ElementLocation ConditionLocation { get; private set; }
- public ElementLocation DependsOnTargetsLocation { get; private set; }
- public ElementLocation InputsLocation { get; private set; }
- public ElementLocation KeepDuplicateOutputsLocation { get; private set; }
- public ElementLocation Location { get; private set; }
public ElementLocation OutputsLocation { get; private set; }
+ public string Returns { get; private set; }
public ElementLocation ReturnsLocation { get; private set; }
-#else
- internal ElementLocation AfterTargetsLocation { get; private set; }
- internal ElementLocation BeforeTargetsLocation { get; private set; }
- internal ElementLocation ConditionLocation { get; private set; }
- internal ElementLocation DependsOnTargetsLocation { get; private set; }
- internal ElementLocation InputsLocation { get; private set; }
- internal ElementLocation KeepDuplicateOutputsLocation { get; private set; }
- internal ElementLocation Location { get; private set; }
- internal ElementLocation OutputsLocation { get; private set; }
- internal ElementLocation ReturnsLocation { get; private set; }
-#endif
+ public ICollection<ProjectTaskInstance> Tasks { get; private set; }
}
}
--- /dev/null
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following
+// attributes.
+//
+// change them to the information which is associated with the assembly
+// you compile.
+
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all values by your own or you can build default build and revision
+// numbers with the '*' character (the default):
+
+[assembly: AssemblyVersion(Consts.MonoVersion)]
+
+// The following attributes specify the key for the sign of your assembly. See the
+// .NET Framework documentation for more information about signing.
+// This is not required, if you don't want signing let these attributes like they're.
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
--- /dev/null
+//
+// CommandLineException.cs: Represents various exceptions thrown during parsing
+// command line parameters.
+//
+// Author:
+// Marek Sieradzki (marek.sieradzki@gmail.com)
+//
+// (C) 2005 Marek Sieradzki
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+#if NET_2_0
+
+using System;
+using System.Runtime.Serialization;
+
+namespace Mono.XBuild.CommandLine {
+ [Serializable]
+ public class CommandLineException : Exception {
+ int errorCode;
+
+ public CommandLineException ()
+ : base ("Unknown command line exception has occured.")
+ {
+ }
+
+ public CommandLineException (string message)
+ : base (message)
+ {
+ }
+
+ public CommandLineException (string message, int errorCode)
+ : base (message)
+ {
+ this.errorCode = errorCode;
+ }
+
+ public CommandLineException (string message, Exception innerException)
+ : base (message, innerException)
+ {
+ }
+
+ public CommandLineException (string message, Exception innerException, int errorCode)
+ : base (message, innerException)
+ {
+ this.errorCode = errorCode;
+ }
+
+ public CommandLineException (SerializationInfo info, StreamingContext context)
+ : base (info, context)
+ {
+ errorCode = info.GetInt32 ("ErrorCode");
+ }
+
+ public override void GetObjectData (SerializationInfo info, StreamingContext context)
+ {
+ base.GetObjectData (info, context);
+ info.AddValue ("ErrorCode", errorCode);
+ }
+
+ public int ErrorCode {
+ get { return errorCode; }
+ }
+
+ public override string Message {
+ get {
+ if (InnerException != null)
+ return base.Message + ": " + InnerException.Message;
+ else
+ return base.Message;
+ }
+ }
+ }
+}
+
+#endif
--- /dev/null
+//
+// ErrorUtilities.cs: Functions that print out errors, warnings, help etc.
+//
+// Author:
+// Marek Sieradzki (marek.sieradzki@gmail.com)
+//
+// (C) 2006 Marek Sieradzki
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+#if NET_2_0
+
+using System;
+
+namespace Mono.XBuild.CommandLine {
+ public static class ErrorUtilities {
+
+ static string[] version = {
+ String.Format ("XBuild Engine Version {0}", Consts.MonoVersion),
+ String.Format ("Mono, Version {0}", Consts.MonoVersion),
+ "Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.",
+ };
+
+
+ static public void ReportError (int errorNum, string msg)
+ {
+ Console.WriteLine (String.Format ("MSBUILD: error MSBUILD{0:0000}: {1}", errorNum, msg));
+ Environment.Exit (1);
+ }
+
+ static public void ReportWarning (int errorNum, string msg)
+ {
+ Console.WriteLine (String.Format ("MSBUILD: warning MSBUILD{0:0000}: {1}", errorNum, msg));
+ }
+
+ static public void ReportInvalidArgument (string option, string value)
+ {
+ ReportError (1012, String.Format ("'{0}' is not a valid setting for option '{1}'", value, option));
+ }
+
+ static public void ReportMissingArgument (string option)
+ {
+ ReportError (1003, String.Format ("Compiler option '{0}' must be followed by an argument", option));
+ }
+
+ static public void ReportNotImplemented (string option)
+ {
+ ReportError (0, String.Format ("Compiler option '{0}' is not implemented", option));
+ }
+
+ static public void ReportMissingFileSpec (string option)
+ {
+ ReportError (1008, String.Format ("Missing file specification for '{0}' command-line option", option));
+ }
+
+ static public void ReportMissingText (string option)
+ {
+ ReportError (1010, String.Format ("Missing ':<text>' for '{0}' option", option));
+ }
+
+ static public void ShowUsage ()
+ {
+ Display (version);
+ Console.WriteLine ("xbuild [options] [project-file]");
+ Console.WriteLine (
+ " /version Show the xbuild version\n" +
+ " /noconsolelogger Disable the default console logger\n" +
+ " /target:T1[,TN] List of targets to build\n" +
+ " /property:Name=Value\n" +
+ " Set or override project properties\n" +
+ " /logger:<logger> Custom logger to log events\n" +
+ " /verbosity:<level> Logger verbosity level : quiet, minimal, normal, detailed, diagnostic\n" +
+ " /validate Validate the project file against the schema\n" +
+ " /validate:<schema> Validate the project file against the specified schema\n" +
+ " /consoleloggerparameters:<params>\n" +
+ " /clp:<params>\n" +
+ " Parameters for the console logger\n" +
+ " /fileloggerparameters[n]:<params>\n" +
+ " /flp[n]:<params>\n" +
+ " Parameters for the file logger, eg. LogFile=foo.log\n" +
+ " /nologo Don't show the initial banner\n" +
+ " /help Show this help\n"
+ );
+ Environment.Exit (0);
+ }
+
+ static public void ShowVersion (bool exit)
+ {
+ Display (version);
+ if (exit)
+ Environment.Exit (0);
+ }
+
+ static private void Display (string[] array)
+ {
+ foreach (string s in array)
+ Console.WriteLine (s);
+ }
+ }
+}
+
+#endif
--- /dev/null
+//
+// LoggerInfo.cs: Contains information about logger parameters.
+//
+// Authors:
+// Craig Sutherland (cj.sutherland(at)xtra.co.nz)
+// Daniel Nauck (dna(at)mono-project.de)
+//
+// (C) 2009 Craig Sutherland, Daniel Nauck
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+#if NET_2_0
+
+using System;
+using System.Globalization;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Text.RegularExpressions;
+using Mono.XBuild.Framework;
+
+namespace Mono.XBuild.CommandLine
+{
+ internal class LoggerInfo : AssemblyLoadInfo
+ {
+ static readonly Regex assemblyInfoRegEx = new Regex(@"(?<assemblyName>[\w\.]+)(,\s?Version=(?<assemblyVersion>\d+\.\d+\.\d+\.\d+))?(,\s?Culture=(?<assemblyCulture>\w+))?(,\s?PublicKeyToken=(?<publicKeyToken>\w+))?",
+ RegexOptions.Compiled | RegexOptions.CultureInvariant);
+
+ string loggerAssemblyName;
+ string loggerType;
+ string loggerArgs;
+
+ string assemblyInfoName;
+ string assemblyInfoVersion;
+ string assemblyInfoCulture;
+ string assemblyInfoPublicKeyToken;
+
+ internal LoggerInfo (string value)
+ {
+ if (!Parse (value))
+ return;
+
+ if (string.IsNullOrEmpty (loggerType))
+ loggerType = GetLoggerTypeName (loggerAssemblyName);
+
+ if (assemblyInfoName != null)
+ SetAssemblyName (LoadInfoType.AssemblyName, null, assemblyInfoName, assemblyInfoVersion, assemblyInfoCulture, assemblyInfoPublicKeyToken, loggerType);
+
+ else
+ SetAssemblyName (LoadInfoType.AssemblyFilename, loggerAssemblyName, null, null, null, null, loggerType);
+ }
+
+ internal string Parameters {
+ get { return loggerArgs; }
+ }
+
+ static string GetLoggerTypeName (string assemblyName)
+ {
+ Assembly loggerAssembly = null;
+
+ // try to load assembly that contains the logger
+ if (HasAssemblyInfo (assemblyName))
+ loggerAssembly = Assembly.Load (assemblyName);
+ else if (File.Exists (assemblyName))
+ loggerAssembly = Assembly.LoadFile (assemblyName);
+
+ if (loggerAssembly == null)
+ return null;
+
+ // search for a class thats implement ILogger
+ var loggerClass = (from t in loggerAssembly.GetTypes ()
+ where t.IsClass &&
+ t.GetInterface ("Microsoft.Build.Framework.ILogger") != null &&
+ t.IsPublic
+ select t).FirstOrDefault ();
+
+ if (loggerClass != null)
+ return loggerClass.FullName;
+
+ return null;
+ }
+
+ bool Parse (string arg)
+ {
+ // Wipe all the existing values, just in case
+ loggerAssemblyName = null;
+ loggerType = null;
+ loggerArgs = null;
+ assemblyInfoName = null;
+ assemblyInfoVersion = null;
+ assemblyInfoCulture = null;
+ assemblyInfoPublicKeyToken = null;
+
+ if (string.IsNullOrEmpty (arg))
+ return false;
+
+ string [] parts = arg.Split (new char [] {':'}, 2);
+ if (parts.Length != 2)
+ return false;
+
+ if (string.Compare ("/l", parts [0], StringComparison.OrdinalIgnoreCase) != 0 &&
+ string.Compare ("/logger", parts [0], StringComparison.OrdinalIgnoreCase) != 0)
+ return false;
+
+ arg = parts [1];
+
+ // We have a logger arg, now get the various parts
+ parts = arg.Split (new char [] {';'}, 2);
+ string firstPart = parts [0];
+ if (parts.Length > 1)
+ loggerArgs = parts [1];
+
+ // Next see if there is a type name
+ parts = firstPart.Split (new char [] {','}, 2);
+ if (parts.Length == 1) {
+ loggerAssemblyName = firstPart;
+ } else {
+ if (HasAssemblyInfo (parts [1])) {
+ loggerAssemblyName = firstPart;
+ GetAssemblyInfo (loggerAssemblyName);
+ } else {
+ loggerType = parts [0];
+ parts [0] = string.Empty;
+ loggerAssemblyName = string.Join (",", parts).Substring (1).Trim ();
+ }
+ }
+
+ return true;
+ }
+
+ static bool HasAssemblyInfo (string part)
+ {
+ var containsInfo = (part.IndexOf ("version=", StringComparison.OrdinalIgnoreCase) >= 0) ||
+ (part.IndexOf ("culture=", StringComparison.OrdinalIgnoreCase) >= 0) ||
+ (part.IndexOf ("publickeytoken=", StringComparison.OrdinalIgnoreCase) >= 0);
+
+ return containsInfo;
+ }
+
+ void GetAssemblyInfo (string assemblyName)
+ {
+ var match = assemblyInfoRegEx.Match (assemblyName);
+
+ if(match == null)
+ return;
+
+ assemblyInfoName = match.Groups ["assemblyName"].Value;
+ assemblyInfoVersion = match.Groups ["assemblyVersion"].Value;
+ assemblyInfoCulture = match.Groups ["assemblyCulture"].Value;
+ assemblyInfoPublicKeyToken = match.Groups ["publicKeyToken"].Value;
+ }
+ }
+}
+#endif
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{89938F1A-C851-41D5-96D2-C329E00887B6}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Mono.MSBuild</RootNamespace>
+ <AssemblyName>MSBuild</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;NET_2_0;NET_4_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugMS|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;NET_2_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE;NET_2_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\build\common\Consts.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="CommandLineException.cs" />
+ <Compile Include="ErrorUtilities.cs" />
+ <Compile Include="LoggerInfo.cs" />
+ <Compile Include="Main.cs" />
+ <Compile Include="Parameters.cs" />
+ <Compile Include="SolutionParser.cs" />
+ <Compile Include="..\..\class\Microsoft.Build.Framework\Mono.XBuild.Framework\AssemblyLoadInfo.cs" />
+ <Compile Include="..\..\class\Microsoft.Build.Utilities\Microsoft.Build.Utilities\ToolLocationHelper.cs">
+ <Link>ToolLocationHelper.cs</Link>
+ </Compile>
+ <Compile Include="..\..\class\Microsoft.Build.Utilities\Microsoft.Build.Utilities\TargetDotNetFrameworkVersion.cs">
+ <Link>TargetDotNetFrameworkVersion.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ItemGroup>
+ <ProjectReference Include="..\..\class\Microsoft.Build.Framework\Microsoft.Build.Framework-useful.csproj">
+ <Project>{2BAFB878-D329-46A5-93AF-5A4ECD403A13}</Project>
+ <Name>Microsoft.Build.Framework-useful</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\class\Microsoft.Build\Microsoft.Build-useful.csproj">
+ <Project>{D8A2B8F2-F52B-44D5-A868-C344682749E2}</Project>
+ <Name>Microsoft.Build-useful</Name>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+//
+// Main.cs: Main program file of command line utility.
+//
+// Author:
+// Marek Sieradzki (marek.sieradzki@gmail.com)
+// Miguel de Icaza (miguel@ximian.com)
+// Marek Safar (marek.safar@seznam.cz)
+//
+// (C) 2005 Marek Sieradzki
+// Copyright 2009 Novell, Inc (http://www.novell.com)
+// Copyright 2011 Xamarin Inc (http://www.xamarin.com).
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+using Microsoft.Build.Utilities;
+using Microsoft.Build.Exceptions;
+using Microsoft.Build.Construction;
+using System.Xml;
+using System.Xml.Schema;
+
+#if NET_2_0
+
+using System;
+using System.Collections;
+using System.IO;
+using System.Reflection;
+using System.Text;
+using Microsoft.Build.Evaluation;
+using Microsoft.Build.Execution;
+using Microsoft.Build.Framework;
+using Microsoft.Build.Logging;
+using Mono.XBuild.Framework;
+
+class MonoTODOAttribute : Attribute
+{
+}
+
+namespace Mono.XBuild.CommandLine {
+ public class MainClass {
+
+ Parameters parameters;
+ string[] args;
+ string defaultSchema;
+
+ ProjectCollection project_collection;
+ ProjectRootElement project;
+ ConsoleReportPrinter printer;
+
+
+ public static void Main (string[] args)
+ {
+ MainClass mc = new MainClass ();
+ mc.args = args;
+ mc.Execute ();
+ }
+
+ public MainClass ()
+ {
+ string binPath = ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version20);
+ defaultSchema = Path.Combine (binPath, "Microsoft.Build.xsd");
+ parameters = new Parameters ();
+ }
+
+ public void Execute ()
+ {
+ bool result = false;
+ bool show_stacktrace = false;
+
+ try {
+ parameters.ParseArguments (args);
+ show_stacktrace = (parameters.LoggerVerbosity == LoggerVerbosity.Detailed ||
+ parameters.LoggerVerbosity == LoggerVerbosity.Diagnostic);
+
+ if (!parameters.NoLogo)
+ ErrorUtilities.ShowVersion (false);
+
+ project_collection = new ProjectCollection ();
+ if (!String.IsNullOrEmpty (parameters.ToolsVersion)) {
+ if (project_collection.GetToolset (parameters.ToolsVersion) == null)
+ ErrorUtilities.ReportError (0, new InvalidToolsetDefinitionException ("Toolset " + parameters.ToolsVersion + " was not found").Message);
+
+ project_collection.DefaultToolsVersion = parameters.ToolsVersion;
+ }
+
+ foreach (var p in parameters.Properties)
+ project_collection.GlobalProperties.Add (p.Key, p.Value);
+
+ if (!parameters.NoConsoleLogger) {
+ printer = new ConsoleReportPrinter ();
+ ConsoleLogger cl = new ConsoleLogger (parameters.LoggerVerbosity,
+ printer.Print, printer.SetForeground, printer.ResetColor);
+
+ cl.Parameters = parameters.ConsoleLoggerParameters;
+ cl.Verbosity = parameters.LoggerVerbosity;
+ project_collection.RegisterLogger (cl);
+ }
+
+ if (parameters.FileLoggerParameters != null) {
+ for (int i = 0; i < parameters.FileLoggerParameters.Length; i ++) {
+ string fl_params = parameters.FileLoggerParameters [i];
+ if (fl_params == null)
+ continue;
+
+ var fl = new FileLogger ();
+ if (fl_params.Length == 0 && i > 0)
+ fl.Parameters = String.Format ("LogFile=msbuild{0}.log", i);
+ else
+ fl.Parameters = fl_params;
+ project_collection.RegisterLogger (fl);
+ }
+ }
+
+ foreach (LoggerInfo li in parameters.Loggers) {
+ Assembly assembly;
+ if (li.InfoType == LoadInfoType.AssemblyFilename)
+ assembly = Assembly.LoadFrom (li.Filename);
+ else
+ assembly = Assembly.Load (li.AssemblyName);
+ ILogger logger = (ILogger)Activator.CreateInstance (assembly.GetType (li.ClassName));
+ logger.Parameters = li.Parameters;
+ project_collection.RegisterLogger (logger);
+ }
+
+ string projectFile = parameters.ProjectFile;
+ if (!File.Exists (projectFile)) {
+ ErrorUtilities.ReportError (0, String.Format ("Project file '{0}' not found.", projectFile));
+ return;
+ }
+
+ XmlReaderSettings settings = new XmlReaderSettings ();
+ if (parameters.Validate) {
+ settings.ValidationType = ValidationType.Schema;
+ if (parameters.ValidationSchema == null)
+ using (var xsdxml = XmlReader.Create (defaultSchema))
+ settings.Schemas.Add (XmlSchema.Read (xsdxml, null));
+ else
+ using (var xsdxml = XmlReader.Create (parameters.ValidationSchema))
+ settings.Schemas.Add (XmlSchema.Read (xsdxml, null));
+ }
+
+ project = ProjectRootElement.Create (XmlReader.Create (projectFile, settings), project_collection);
+
+ var projectInstance = new ProjectInstance (project, parameters.Properties, parameters.ToolsVersion, project_collection);
+
+ result = projectInstance.Build (parameters.Targets, parameters.Loggers);
+ //result = project_collection.BuildProjectFile (projectFile, parameters.Targets, null, null, BuildSettings.None, parameters.ToolsVersion);
+ }
+
+ catch (InvalidProjectFileException ipfe) {
+ ErrorUtilities.ReportError (0, show_stacktrace ? ipfe.ToString () : ipfe.Message);
+ }
+
+ catch (InternalLoggerException ile) {
+ ErrorUtilities.ReportError (0, show_stacktrace ? ile.ToString () : ile.Message);
+ }
+
+ catch (CommandLineException cle) {
+ ErrorUtilities.ReportError(cle.ErrorCode, show_stacktrace ? cle.ToString() : cle.Message);
+ }
+ finally {
+ //if (project_collection != null)
+ // project_collection.UnregisterAllLoggers ();
+
+ Environment.Exit (result ? 0 : 1);
+ }
+
+ }
+ }
+
+ // code from mcs/report.cs
+ class ConsoleReportPrinter
+ {
+ string prefix, postfix;
+ bool color_supported;
+ TextWriter writer;
+ string [] colorPrefixes;
+
+ public ConsoleReportPrinter ()
+ : this (Console.Out)
+ {
+ }
+
+ public ConsoleReportPrinter (TextWriter writer)
+ {
+ this.writer = writer;
+
+ string term = Environment.GetEnvironmentVariable ("TERM");
+ bool xterm_colors = false;
+
+ color_supported = false;
+ switch (term){
+ case "xterm":
+ case "rxvt":
+ case "rxvt-unicode":
+ if (Environment.GetEnvironmentVariable ("COLORTERM") != null){
+ xterm_colors = true;
+ }
+ break;
+
+ case "xterm-color":
+ case "xterm-256color":
+ xterm_colors = true;
+ break;
+ }
+ if (!xterm_colors)
+ return;
+
+ if (!(UnixUtils.isatty (1) && UnixUtils.isatty (2)))
+ return;
+
+ color_supported = true;
+ PopulateColorPrefixes ();
+ postfix = "\x001b[0m";
+ }
+
+ void PopulateColorPrefixes ()
+ {
+ colorPrefixes = new string [16];
+
+ colorPrefixes [(int)ConsoleColor.Black] = GetForeground ("black");
+ colorPrefixes [(int)ConsoleColor.DarkBlue] = GetForeground ("blue");
+ colorPrefixes [(int)ConsoleColor.DarkGreen] = GetForeground ("green");
+ colorPrefixes [(int)ConsoleColor.DarkCyan] = GetForeground ("cyan");
+ colorPrefixes [(int)ConsoleColor.DarkRed] = GetForeground ("red");
+ colorPrefixes [(int)ConsoleColor.DarkMagenta] = GetForeground ("magenta");
+ colorPrefixes [(int)ConsoleColor.DarkYellow] = GetForeground ("yellow");
+ colorPrefixes [(int)ConsoleColor.DarkGray] = GetForeground ("grey");
+
+ colorPrefixes [(int)ConsoleColor.Gray] = GetForeground ("brightgrey");
+ colorPrefixes [(int)ConsoleColor.Blue] = GetForeground ("brightblue");
+ colorPrefixes [(int)ConsoleColor.Green] = GetForeground ("brightgreen");
+ colorPrefixes [(int)ConsoleColor.Cyan] = GetForeground ("brightcyan");
+ colorPrefixes [(int)ConsoleColor.Red] = GetForeground ("brightred");
+ colorPrefixes [(int)ConsoleColor.Magenta] = GetForeground ("brightmagenta");
+ colorPrefixes [(int)ConsoleColor.Yellow] = GetForeground ("brightyellow");
+
+ colorPrefixes [(int)ConsoleColor.White] = GetForeground ("brightwhite");
+ }
+
+ public void SetForeground (ConsoleColor color)
+ {
+ if (color_supported)
+ prefix = colorPrefixes [(int)color];
+ }
+
+ public void ResetColor ()
+ {
+ prefix = "\x001b[0m";
+ }
+
+ static int NameToCode (string s)
+ {
+ switch (s) {
+ case "black":
+ return 0;
+ case "red":
+ return 1;
+ case "green":
+ return 2;
+ case "yellow":
+ return 3;
+ case "blue":
+ return 4;
+ case "magenta":
+ return 5;
+ case "cyan":
+ return 6;
+ case "grey":
+ case "white":
+ return 7;
+ }
+ return 7;
+ }
+
+ //
+ // maps a color name to its xterm color code
+ //
+ static string GetForeground (string s)
+ {
+ string highcode;
+
+ if (s.StartsWith ("bright")) {
+ highcode = "1;";
+ s = s.Substring (6);
+ } else
+ highcode = "";
+
+ return "\x001b[" + highcode + (30 + NameToCode (s)).ToString () + "m";
+ }
+
+ static string GetBackground (string s)
+ {
+ return "\x001b[" + (40 + NameToCode (s)).ToString () + "m";
+ }
+
+ string FormatText (string txt)
+ {
+ if (prefix != null && color_supported)
+ return prefix + txt + postfix;
+
+ return txt;
+ }
+
+ public void Print (string message)
+ {
+ writer.WriteLine (FormatText (message));
+ }
+
+ }
+
+ class UnixUtils {
+ [System.Runtime.InteropServices.DllImport ("libc", EntryPoint="isatty")]
+ extern static int _isatty (int fd);
+
+ public static bool isatty (int fd)
+ {
+ try {
+ return _isatty (fd) == 1;
+ } catch {
+ return false;
+ }
+ }
+ }
+
+}
+
+#endif
--- /dev/null
+thisdir = tools/msbuild
+SUBDIRS =
+include ../../build/rules.make
+NO_TESTS = yes
+
+BUILD_FRAMEWORK = Microsoft.Build.Framework.dll
+BUILD_NEW_ENGINE = Microsoft.Build.dll
+INSTALL_FRAMEWORK_VERSION = $(FRAMEWORK_VERSION)
+
+ifeq (3.5, $(FRAMEWORK_VERSION))
+NAME_SUFFIX = .v3.5
+ASSEMBLY_VERSION = 3.5.0.0
+else
+ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
+NAME_SUFFIX = .v4.0
+ASSEMBLY_VERSION = 4.0.0.0
+BUILD_FRAMEWORK := $(topdir)/class/lib/$(PROFILE)/$(BUILD_FRAMEWORK)
+BUILD_NEW_ENGINE := $(topdir)/class/lib/$(PROFILE)/$(BUILD_NEW_ENGINE)
+INSTALL_FRAMEWORK_VERSION = 4.0
+endif
+endif
+
+LOCAL_MCS_FLAGS = -r:$(BUILD_FRAMEWORK) -r:$(BUILD_NEW_ENGINE)
+PROGRAM = msbuild.exe
+
+include ../../build/executable.make
+
+XBUILD_DIR=.
+XBUILD_FRAMEWORKS_DIR=$(mono_libdir)/mono/xbuild-frameworks/.NETFramework/
+REDISTLIST_DIR=$(XBUILD_FRAMEWORKS_DIR)/v$(FRAMEWORK_VERSION)/RedistList
+include $(XBUILD_DIR)/xbuild_targets.make
+
+install-local: install-extras
+
+WEBAPP_DIR = Microsoft/VisualStudio
+SILVERLIGHT_DIR = $(mono_libdir)/mono/xbuild/Microsoft/Silverlight
+PORTABLE_DIR = $(mono_libdir)/mono/xbuild/Microsoft/Portable
+EXTRAS_DIR = $(mono_libdir)/mono/$(INSTALL_FRAMEWORK_VERSION)
+install-extras:
+ $(MKINSTALLDIRS) $(DESTDIR)$(EXTRAS_DIR) $(DESTDIR)$(REDISTLIST_DIR) $(DESTDIR)$(XBUILD_FRAMEWORKS_DIR)/v3.0/RedistList $(DESTDIR)$(XBUILD_FRAMEWORKS_DIR)/v4.0/RedistList $(DESTDIR)$(mono_libdir)/mono/3.5 $(DESTDIR)$(mono_libdir)/mono/4.0
+ $(INSTALL_DATA) xbuild/xbuild.rsp $(DESTDIR)$(mono_libdir)/mono/$(FRAMEWORK_VERSION)
+ $(INSTALL_DATA) xbuild/$(INSTALL_FRAMEWORK_VERSION)/Microsoft.Common.tasks $(DESTDIR)$(EXTRAS_DIR)
+ $(INSTALL_DATA) xbuild/$(INSTALL_FRAMEWORK_VERSION)/Microsoft.Common.targets $(DESTDIR)$(EXTRAS_DIR)
+ $(INSTALL_DATA) xbuild/Microsoft.Build.xsd $(DESTDIR)$(EXTRAS_DIR)
+ $(INSTALL_DATA) xbuild/2.0/Microsoft.Common.targets $(DESTDIR)$(mono_libdir)/mono/2.0
+ $(INSTALL_DATA) xbuild/3.5/Microsoft.Common.targets $(DESTDIR)$(mono_libdir)/mono/3.5
+ $(INSTALL_DATA) xbuild/Microsoft.CSharp.targets $(DESTDIR)$(EXTRAS_DIR)
+ $(INSTALL_DATA) xbuild/Microsoft.VisualBasic.targets $(DESTDIR)$(EXTRAS_DIR)
+ $(INSTALL_DATA) xbuild/$(FRAMEWORK_VERSION)/FrameworkList.xml $(DESTDIR)$(REDISTLIST_DIR)
+ $(INSTALL_DATA) xbuild/4.0/FrameworkList.xml $(DESTDIR)$(XBUILD_FRAMEWORKS_DIR)/v4.0/RedistList/FrameworkList.xml
+ $(INSTALL_DATA) xbuild/FrameworkList-3.0.xml $(DESTDIR)$(XBUILD_FRAMEWORKS_DIR)/v3.0/RedistList/FrameworkList.xml
+ $(MKINSTALLDIRS) $(DESTDIR)$(EXTRAS_DIR)/MSBuild
+ $(INSTALL_DATA) xbuild/MSBuild/Microsoft.Build.CommonTypes.xsd $(DESTDIR)$(EXTRAS_DIR)/MSBuild
+ $(INSTALL_DATA) xbuild/MSBuild/Microsoft.Build.Core.xsd $(DESTDIR)$(EXTRAS_DIR)/MSBuild
+ $(MKINSTALLDIRS) $(DESTDIR)$(mono_libdir)/mono/xbuild
+ $(MKINSTALLDIRS) $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR)/v9.0/WebApplications
+ $(INSTALL_DATA) xbuild/Microsoft.WebApplication.targets $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR)/v9.0/WebApplications
+ $(MKINSTALLDIRS) $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR)/v10.0/WebApplications
+ $(INSTALL_DATA) xbuild/Microsoft.WebApplication.targets $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR)/v10.0/WebApplications
+ $(MKINSTALLDIRS) $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR)/v11.0/WebApplications
+ $(INSTALL_DATA) xbuild/Microsoft.WebApplication.targets $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR)/v11.0/WebApplications
+ $(MKINSTALLDIRS) $(DESTDIR)$(SILVERLIGHT_DIR)/v2.0
+ $(MKINSTALLDIRS) $(DESTDIR)$(SILVERLIGHT_DIR)/v3.0
+ $(INSTALL_DATA) xbuild/Microsoft.Silverlight.CSharp.targets $(DESTDIR)$(SILVERLIGHT_DIR)/v2.0
+ $(INSTALL_DATA) xbuild/Microsoft.Silverlight.CSharp.targets $(DESTDIR)$(SILVERLIGHT_DIR)/v3.0
+ $(INSTALL_DATA) xbuild/Microsoft.Silverlight.VisualBasic.targets $(DESTDIR)$(SILVERLIGHT_DIR)/v2.0
+ $(INSTALL_DATA) xbuild/Microsoft.Silverlight.VisualBasic.targets $(DESTDIR)$(SILVERLIGHT_DIR)/v3.0
+ sed -e 's/@SILVERLIGHT_VERSION@/2.0/g' xbuild/Microsoft.Silverlight.Common.targets > $(DESTDIR)$(SILVERLIGHT_DIR)/v2.0/Microsoft.Silverlight.Common.targets
+ sed -e 's/@SILVERLIGHT_VERSION@/3.0/g' xbuild/Microsoft.Silverlight.Common.targets > $(DESTDIR)$(SILVERLIGHT_DIR)/v3.0/Microsoft.Silverlight.Common.targets
+ $(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_DIR)/v4.0
+ $(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_DIR)/v4.5
+ $(INSTALL_DATA) xbuild/4.0/Microsoft.Portable.CSharp.targets $(DESTDIR)$(PORTABLE_DIR)/v4.0
+ $(INSTALL_DATA) xbuild/4.5/Microsoft.Portable.CSharp.targets $(DESTDIR)$(PORTABLE_DIR)/v4.5
+ $(INSTALL_DATA) xbuild/Microsoft.Portable.CSharp.targets $(DESTDIR)$(mono_libdir)/mono/4.0
+
+EXTRA_DISTFILES = \
+ xbuild/xbuild.rsp \
+ xbuild/2.0/Microsoft.Common.tasks \
+ xbuild/3.5/Microsoft.Common.tasks \
+ xbuild/4.0/Microsoft.Common.tasks \
+ xbuild/2.0/Microsoft.Common.targets \
+ xbuild/3.5/Microsoft.Common.targets \
+ xbuild/4.0/Microsoft.Common.targets \
+ xbuild/4.0/Microsoft.Portable.CSharp.targets \
+ xbuild/4.5/Microsoft.Portable.CSharp.targets \
+ xbuild/2.0/FrameworkList.xml \
+ xbuild/3.5/FrameworkList.xml \
+ xbuild/4.0/FrameworkList.xml \
+ xbuild/4.5/FrameworkList.xml \
+ xbuild/FrameworkList-3.0.xml \
+ xbuild/Microsoft.Build.xsd \
+ xbuild/Microsoft.CSharp.targets \
+ xbuild/MSBuild/Microsoft.Build.CommonTypes.xsd \
+ xbuild/MSBuild/Microsoft.Build.Core.xsd \
+ xbuild/Microsoft.VisualBasic.targets \
+ xbuild/Microsoft.WebApplication.targets \
+ xbuild/Microsoft.Silverlight.Common.targets \
+ xbuild/Microsoft.Silverlight.CSharp.targets \
+ xbuild/Microsoft.Silverlight.VisualBasic.targets \
+ xbuild/Microsoft.Portable.CSharp.targets \
+ xbuild_targets.make
--- /dev/null
+//
+// Parameters.cs: Class that contains information about command line parameters
+//
+// Author:
+// Marek Sieradzki (marek.sieradzki@gmail.com)
+//
+// (C) 2005 Marek Sieradzki
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+using Microsoft.Build.Logging;
+
+#if NET_2_0
+
+using System;
+using System.IO;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Reflection;
+using Microsoft.Build.BuildEngine;
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+
+namespace Mono.XBuild.CommandLine {
+ public class Parameters {
+
+ string consoleLoggerParameters;
+ bool displayHelp;
+ IList flatArguments;
+ IList<LoggerInfo> loggerInfos;
+ LoggerVerbosity loggerVerbosity;
+ bool noConsoleLogger;
+ bool noLogo;
+ string projectFile;
+ Dictionary<string,string> properties;
+ IList remainingArguments;
+ Hashtable responseFiles;
+ string[] targets;
+ bool validate;
+ string validationSchema;
+ string toolsVersion;
+
+ string responseFile;
+
+ public Parameters ()
+ {
+ consoleLoggerParameters = "";
+ displayHelp = false;
+ loggerInfos = new List<LoggerInfo> ();
+ loggerVerbosity = LoggerVerbosity.Normal;
+ noConsoleLogger = false;
+ noLogo = false;
+ properties = new Dictionary<string,string> ();
+ targets = new string [0];
+
+ responseFile = Path.Combine (
+ Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location),
+ "xbuild.rsp");
+ }
+
+ public void ParseArguments (string[] args)
+ {
+ bool autoResponse = true;
+ flatArguments = new ArrayList ();
+ remainingArguments = new ArrayList ();
+ responseFiles = new Hashtable ();
+ FileLoggerParameters = new string[10];
+ foreach (string s in args) {
+ if (s.StartsWith ("/noautoresponse") || s.StartsWith ("/noautorsp")) {
+ autoResponse = false;
+ continue;
+ }
+ if (s [0] != '@') {
+ flatArguments.Add (s);
+ continue;
+ }
+ string responseFilename = Path.GetFullPath (UnquoteIfNeeded (s.Substring (1)));
+ if (responseFiles.ContainsKey (responseFilename))
+ ReportError (1, String.Format ("We already have {0} file.", responseFilename));
+ responseFiles [responseFilename] = responseFilename;
+ LoadResponseFile (responseFilename);
+ }
+ if (autoResponse == true) {
+ // FIXME: we do not allow nested auto response file
+ LoadResponseFile (responseFile);
+ }
+ foreach (string s in flatArguments) {
+ if (s [0] != '/' || !ParseFlatArgument (s))
+ remainingArguments.Add (s);
+ }
+ if (remainingArguments.Count == 0) {
+ string[] sln_files = Directory.GetFiles (Directory.GetCurrentDirectory (), "*.sln");
+ string[] proj_files = Directory.GetFiles (Directory.GetCurrentDirectory (), "*proj");
+
+ if (sln_files.Length == 0 && proj_files.Length == 0)
+ ReportError (3, "Please specify the project or solution file " +
+ "to build, as none was found in the current directory.");
+
+ if (sln_files.Length == 1 && proj_files.Length > 0) {
+ var projects_table = new Dictionary<string, string> ();
+ foreach (string pfile in SolutionParser.GetAllProjectFileNames (sln_files [0])) {
+ string full_path = Path.GetFullPath (pfile);
+ projects_table [full_path] = full_path;
+ }
+
+ if (!proj_files.Any (p => !projects_table.ContainsKey (Path.GetFullPath (p))))
+ // if all the project files in the cur dir, are referenced
+ // from the single .sln in the cur dir, then pick the sln
+ proj_files = new string [0];
+ }
+
+ if (sln_files.Length + proj_files.Length > 1)
+ ReportError (5, "Please specify the project or solution file " +
+ "to build, as more than one solution or project file was found " +
+ "in the current directory");
+
+ if (sln_files.Length == 1)
+ projectFile = sln_files [0];
+ else
+ projectFile = proj_files [0];
+ } else if (remainingArguments.Count == 1) {
+ projectFile = (string) remainingArguments [0];
+ } else {
+ ReportError (4, "Too many project files specified");
+ }
+ }
+
+ private string UnquoteIfNeeded(string arg)
+ {
+ if (arg.StartsWith("\""))
+ return arg.Substring(1, arg.Length - 2);
+ return arg;
+ }
+
+ void LoadResponseFile (string filename)
+ {
+ StreamReader sr = null;
+ string line;
+ try {
+ sr = new StreamReader (filename);
+ StringBuilder sb = new StringBuilder ();
+
+ while ((line = sr.ReadLine ()) != null) {
+ int t = line.Length;
+
+ for (int i = 0; i < t; i++) {
+ char c = line [i];
+
+ if (c == '#')
+ // comment, ignore rest of the line
+ break;
+
+ if (c == '"' || c == '\'') {
+ char end = c;
+
+ for (i++; i < t; i++) {
+ c = line [i];
+
+ if (c == end)
+ break;
+ sb.Append (c);
+ }
+ } else if (c == ' ') {
+ if (sb.Length > 0) {
+ flatArguments.Add (sb.ToString ());
+ sb.Length = 0;
+ }
+ } else
+ sb.Append (c);
+ }
+ if (sb.Length > 0){
+ flatArguments.Add (sb.ToString ());
+ sb.Length = 0;
+ }
+ }
+ } catch (IOException x) {
+ ErrorUtilities.ReportWarning (2, String.Format (
+ "Error loading response file. (Exception: {0}). Ignoring.",
+ x.Message));
+ } finally {
+ if (sr != null)
+ sr.Close ();
+ }
+ }
+
+ private bool ParseFlatArgument (string s)
+ {
+ switch (s) {
+ case "/help":
+ case "/h":
+ case "/?":
+ ErrorUtilities.ShowUsage ();
+ break;
+ case "/nologo":
+ noLogo = true;
+ break;
+ case "/version":
+ case "/ver":
+ ErrorUtilities.ShowVersion (true);
+ break;
+ case "/noconsolelogger":
+ case "/noconlog":
+ noConsoleLogger = true;
+ break;
+ case "/validate":
+ case "/val":
+ validate = true;
+ break;
+ case "/fl":
+ case "/filelogger":
+ if (FileLoggerParameters [0] == null)
+ FileLoggerParameters [0] = String.Empty;
+ break;
+ default:
+ if (s.StartsWith ("/fl") && s.Length == 4 && Char.IsDigit (s[3])) {
+ int index = Int32.Parse (s[3].ToString ());
+ if (FileLoggerParameters [index] == null)
+ FileLoggerParameters [index] = String.Empty;
+ } else if (s.StartsWith ("/fileloggerparameters") || s.StartsWith ("/flp")) {
+ ProcessFileLoggerParameters (s);
+ } else if (s.StartsWith ("/target:") || s.StartsWith ("/t:")) {
+ ProcessTarget (s);
+ } else if (s.StartsWith ("/property:") || s.StartsWith ("/p:")) {
+ if (!ProcessProperty (s))
+ return false;
+ } else if (s.StartsWith ("/logger:") || s.StartsWith ("/l:")) {
+ ProcessLogger (s);
+ } else if (s.StartsWith ("/verbosity:") || s.StartsWith ("/v:")) {
+ ProcessVerbosity (s);
+ } else if (s.StartsWith ("/consoleloggerparameters:") || s.StartsWith ("/clp:")) {
+ ProcessConsoleLoggerParameters (s);
+ } else if (s.StartsWith ("/validate:") || s.StartsWith ("/val:")) {
+ ProcessValidate (s);
+ } else if (s.StartsWith ("/toolsversion:") || s.StartsWith ("/tv:")) {
+ ToolsVersion = s.Split (':') [1];
+ } else
+ return false;
+ break;
+ }
+
+ return true;
+ }
+
+ internal void ProcessTarget (string s)
+ {
+ TryProcessMultiOption (s, "Target names must be specified as /t:Target1;Target2",
+ out targets);
+ }
+
+ internal bool ProcessProperty (string s)
+ {
+ string[] splitProperties;
+ if (!TryProcessMultiOption (s, "Property name and value expected as /p:<prop name>=<prop value>",
+ out splitProperties))
+ return false;
+
+ foreach (string st in splitProperties) {
+ if (st.IndexOf ('=') < 0) {
+ ReportError (5,
+ "Invalid syntax. Property name and value expected as " +
+ "<prop name>=[<prop value>]");
+ return false;
+ }
+ string [] property = st.Split ('=');
+ properties.Add (property [0], property.Length == 2 ? property [1] : "");
+ }
+
+ return true;
+ }
+
+ bool TryProcessMultiOption (string s, string error_message, out string[] values)
+ {
+ values = null;
+ int colon = s.IndexOf (':');
+ if (colon + 1 == s.Length) {
+ ReportError (5, error_message);
+ return false;
+ }
+
+ values = s.Substring (colon + 1).Split (';');
+ return true;
+ }
+
+ private void ReportError (int errorCode, string message)
+ {
+ throw new CommandLineException (message, errorCode);
+ }
+
+ private void ReportError (int errorCode, string message, Exception cause)
+ {
+ throw new CommandLineException (message, cause, errorCode);
+ }
+
+ internal void ProcessLogger (string s)
+ {
+ loggerInfos.Add (new LoggerInfo (s));
+ }
+
+ internal void ProcessVerbosity (string s)
+ {
+ string[] temp = s.Split (':');
+ switch (temp [1]) {
+ case "q":
+ case "quiet":
+ loggerVerbosity = LoggerVerbosity.Quiet;
+ break;
+ case "m":
+ case "minimal":
+ loggerVerbosity = LoggerVerbosity.Minimal;
+ break;
+ case "n":
+ case "normal":
+ loggerVerbosity = LoggerVerbosity.Normal;
+ break;
+ case "d":
+ case "detailed":
+ loggerVerbosity = LoggerVerbosity.Detailed;
+ break;
+ case "diag":
+ case "diagnostic":
+ loggerVerbosity = LoggerVerbosity.Diagnostic;
+ break;
+ }
+ }
+
+ void ProcessFileLoggerParameters (string s)
+ {
+ int colon = s.IndexOf (':');
+ if (colon + 1 == s.Length)
+ ReportError (5, "Invalid syntax, specify parameters as /fileloggerparameters[n]:parameters");
+
+ int index = 0;
+ string key = s.Substring (0, colon);
+ if (Char.IsDigit (key [key.Length - 1]))
+ //if (key.Length == 22 && Char.IsDigit (key [21]))
+ index = Int32.Parse (key [key.Length - 1].ToString ());
+
+ FileLoggerParameters [index] = s.Substring (colon + 1);
+ }
+
+ internal void ProcessConsoleLoggerParameters (string s)
+ {
+ int colon = s.IndexOf (':');
+ if (colon + 1 == s.Length)
+ ReportError (5, "Invalid syntax, specify parameters as /clp:parameters");
+
+ consoleLoggerParameters = s.Substring (colon + 1);
+ }
+
+ internal void ProcessValidate (string s)
+ {
+ string[] temp;
+ validate = true;
+ temp = s.Split (':');
+ validationSchema = temp [1];
+ }
+ public bool DisplayHelp {
+ get { return displayHelp; }
+ }
+
+ public bool NoLogo {
+ get { return noLogo; }
+ }
+
+ public string ProjectFile {
+ get { return projectFile; }
+ }
+
+ public string[] Targets {
+ get { return targets; }
+ }
+
+ public Dictionary<string,string> Properties {
+ get { return properties; }
+ }
+
+ IList<ILogger> loggers;
+ public IList<ILogger> Loggers {
+ get {
+ if (loggers == null)
+ loggers = loggerInfos.Select (li => new LoggerDescription (li.ClassName, li.AssemblyNameString, li.Filename, li.Parameters, LoggerVerbosity).CreateLogger ()).ToArray ();
+ return loggers;
+ }
+ }
+
+ public LoggerVerbosity LoggerVerbosity {
+ get { return loggerVerbosity; }
+ }
+
+ public string ConsoleLoggerParameters {
+ get { return consoleLoggerParameters; }
+ }
+
+ public bool NoConsoleLogger {
+ get { return noConsoleLogger; }
+ }
+
+ public string[] FileLoggerParameters { get; set; }
+
+ public bool Validate {
+ get { return validate; }
+ }
+
+ public string ValidationSchema {
+ get { return validationSchema; }
+ }
+
+ public string ToolsVersion {
+ get { return toolsVersion; }
+ private set { toolsVersion = value; }
+ }
+
+ }
+}
+
+#endif
--- /dev/null
+WARNING: you are most likely NOT seeing what you are looking for. It is still
+experimental implementation of "MSBuild" tool that is based on MSBuild's
+"new" build engine a.k.a Microsoft.Build.dll (available only in .NET 4.0 or
+later).
+
+For old .NET 2.0-based MSBuild implementation, check out "xbuild" instead.
+
--- /dev/null
+//
+// SolutionParser.cs: Generates a project file from a solution file.
+//
+// Author:
+// Jonathan Chambers (joncham@gmail.com)
+// Ankit Jain <jankit@novell.com>
+// Lluis Sanchez Gual <lluis@novell.com>
+//
+// (C) 2009 Jonathan Chambers
+// Copyright 2008, 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.IO;
+using Microsoft.Build.Evaluation;
+using Microsoft.Build.Execution;
+using Microsoft.Build.Construction;
+using Microsoft.Build.Exceptions;
+
+namespace Mono.XBuild.CommandLine {
+ class ProjectInfo {
+ public string Name;
+ public string FileName;
+ public Guid Guid;
+
+ public ProjectInfo (string name, string fileName)
+ {
+ Name = name;
+ FileName = fileName;
+ }
+
+ public Dictionary<TargetInfo, TargetInfo> TargetMap = new Dictionary<TargetInfo, TargetInfo> ();
+ public Dictionary<Guid, ProjectInfo> Dependencies = new Dictionary<Guid, ProjectInfo> ();
+ public Dictionary<string, ProjectSection> ProjectSections = new Dictionary<string, ProjectSection> ();
+ public List<string> AspNetConfigurations = new List<string> ();
+ }
+
+ class ProjectSection {
+ public string Name;
+ public Dictionary<string, string> Properties = new Dictionary<string, string> ();
+
+ public ProjectSection (string name)
+ {
+ Name = name;
+ }
+ }
+
+ struct TargetInfo {
+ public string Configuration;
+ public string Platform;
+ public bool Build;
+
+ public TargetInfo (string configuration, string platform)
+ : this (configuration, platform, false)
+ {
+ }
+
+ public TargetInfo (string configuration, string platform, bool build)
+ {
+ Configuration = configuration;
+ Platform = platform;
+ Build = build;
+ }
+ }
+
+
+ internal delegate void RaiseWarningHandler (int errorNumber, string message);
+
+ class SolutionParser {
+ static string[] buildTargets = new string[] { "Build", "Clean", "Rebuild", "Publish" };
+
+ static string guidExpression = "{[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}}";
+
+ static Regex slnVersionRegex = new Regex (@"Microsoft Visual Studio Solution File, Format Version (\d?\d.\d\d)");
+ static Regex projectRegex = new Regex ("Project\\(\"(" + guidExpression + ")\"\\) = \"(.*?)\", \"(.*?)\", \"(" + guidExpression + ")\"(\\s*?)((\\s*?)ProjectSection\\((.*?)\\) = (.*?)EndProjectSection(\\s*?))*(\\s*?)(EndProject)?", RegexOptions.Singleline);
+ static Regex projectDependenciesRegex = new Regex ("ProjectSection\\((.*?)\\) = \\w*(.*?)EndProjectSection", RegexOptions.Singleline);
+ static Regex projectDependencyRegex = new Regex ("\\s*(" + guidExpression + ") = (" + guidExpression + ")");
+ static Regex projectSectionPropertiesRegex = new Regex ("\\s*(?<name>.*) = \"(?<value>.*)\"");
+
+ static Regex globalRegex = new Regex ("Global(.*)EndGlobal", RegexOptions.Singleline);
+ static Regex globalSectionRegex = new Regex ("GlobalSection\\((.*?)\\) = \\w*(.*?)EndGlobalSection", RegexOptions.Singleline);
+
+ static Regex solutionConfigurationRegex = new Regex ("\\s*(.*?)\\|(.*?) = (.*?)\\|(.+)");
+ static Regex projectConfigurationActiveCfgRegex = new Regex ("\\s*(" + guidExpression + ")\\.(.+?)\\|(.+?)\\.ActiveCfg = (.+?)\\|(.+)");
+ static Regex projectConfigurationBuildRegex = new Regex ("\\s*(" + guidExpression + ")\\.(.*?)\\|(.*?)\\.Build\\.0 = (.*?)\\|(.+)");
+
+ static string solutionFolderGuid = "{2150E333-8FDC-42A3-9474-1A3956D46DE8}";
+ static string vcprojGuid = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}";
+ static string websiteProjectGuid = "{E24C65DC-7377-472B-9ABA-BC803B73C61A}";
+
+ RaiseWarningHandler RaiseWarning;
+
+ public void ParseSolution (string file, ProjectCollection projects, ProjectRootElement p, RaiseWarningHandler RaiseWarning)
+ {
+ this.RaiseWarning = RaiseWarning;
+ EmitBeforeImports (p, file);
+
+ AddGeneralSettings (file, p);
+
+ StreamReader reader = new StreamReader (file);
+ string slnVersion = GetSlnFileVersion (reader);
+ if (slnVersion == "11.00")
+ projects.DefaultToolsVersion = "4.0";
+ else if (slnVersion == "10.00")
+ projects.DefaultToolsVersion = "3.5";
+ else
+ projects.DefaultToolsVersion = "2.0";
+
+ string line = reader.ReadToEnd ();
+ line = line.Replace ("\r\n", "\n");
+ string solutionDir = Path.GetDirectoryName (file);
+
+ List<TargetInfo> solutionTargets = new List<TargetInfo> ();
+ Dictionary<Guid, ProjectInfo> projectInfos = new Dictionary<Guid, ProjectInfo> ();
+ Dictionary<Guid, ProjectInfo> websiteProjectInfos = new Dictionary<Guid, ProjectInfo> ();
+ List<ProjectInfo>[] infosByLevel = null;
+ Dictionary<Guid, ProjectInfo> unsupportedProjectInfos = new Dictionary<Guid, ProjectInfo> ();
+
+ Match m = projectRegex.Match (line);
+ while (m.Success) {
+ ProjectInfo projectInfo = new ProjectInfo (m.Groups[2].Value,
+ Path.GetFullPath (Path.Combine (solutionDir,
+ m.Groups [3].Value.Replace ('\\', Path.DirectorySeparatorChar))));
+ if (String.Compare (m.Groups [1].Value, solutionFolderGuid,
+ StringComparison.InvariantCultureIgnoreCase) == 0) {
+ // Ignore solution folders
+ m = m.NextMatch ();
+ continue;
+ }
+
+ projectInfo.Guid = new Guid (m.Groups [4].Value);
+
+ if (String.Compare (m.Groups [1].Value, vcprojGuid,
+ StringComparison.InvariantCultureIgnoreCase) == 0) {
+ // Ignore vcproj
+ RaiseWarning (0, string.Format("Ignoring vcproj '{0}'.", projectInfo.Name));
+
+ unsupportedProjectInfos [projectInfo.Guid] = projectInfo;
+ m = m.NextMatch ();
+ continue;
+ }
+
+ if (String.Compare (m.Groups [1].Value, websiteProjectGuid,
+ StringComparison.InvariantCultureIgnoreCase) == 0)
+ websiteProjectInfos.Add (new Guid (m.Groups[4].Value), projectInfo);
+ else
+ projectInfos.Add (projectInfo.Guid, projectInfo);
+
+ Match projectSectionMatch = projectDependenciesRegex.Match (m.Groups[6].Value);
+ while (projectSectionMatch.Success) {
+ string section_name = projectSectionMatch.Groups [1].Value;
+ if (String.Compare (section_name, "ProjectDependencies") == 0) {
+ Match projectDependencyMatch = projectDependencyRegex.Match (projectSectionMatch.Value);
+ while (projectDependencyMatch.Success) {
+ // we might not have projectInfo available right now, so
+ // set it to null, and fill it in later
+ projectInfo.Dependencies [new Guid (projectDependencyMatch.Groups[1].Value)] = null;
+ projectDependencyMatch = projectDependencyMatch.NextMatch ();
+ }
+ } else {
+ ProjectSection section = new ProjectSection (section_name);
+ Match propertiesMatch = projectSectionPropertiesRegex.Match (
+ projectSectionMatch.Groups [2].Value);
+ while (propertiesMatch.Success) {
+ section.Properties [propertiesMatch.Groups ["name"].Value] =
+ propertiesMatch.Groups ["value"].Value;
+
+ propertiesMatch = propertiesMatch.NextMatch ();
+ }
+
+ projectInfo.ProjectSections [section_name] = section;
+ }
+ projectSectionMatch = projectSectionMatch.NextMatch ();
+ }
+ m = m.NextMatch ();
+ }
+
+ foreach (ProjectInfo projectInfo in projectInfos.Values) {
+ string filename = projectInfo.FileName;
+ string projectDir = Path.GetDirectoryName (filename);
+
+ if (!File.Exists (filename)) {
+ RaiseWarning (0, String.Format ("Project file {0} referenced in the solution file, " +
+ "not found. Ignoring.", filename));
+ continue;
+ }
+
+ Project currentProject;
+ try {
+ currentProject = new Project (filename, null, null, new ProjectCollection (), ProjectLoadSettings.IgnoreMissingImports);
+ } catch (InvalidProjectFileException e) {
+ RaiseWarning (0, e.Message);
+ continue;
+ }
+
+ foreach (var bi in currentProject.GetItems ("ProjectReference")) {
+ ProjectInfo info = null;
+ string projectReferenceGuid = bi.GetMetadataValue ("Project");
+ bool hasGuid = !String.IsNullOrEmpty (projectReferenceGuid);
+
+ // try to resolve the ProjectReference by GUID
+ // and fallback to project filename
+
+ if (hasGuid) {
+ Guid guid = new Guid (projectReferenceGuid);
+ projectInfos.TryGetValue (guid, out info);
+ if (info == null && unsupportedProjectInfos.TryGetValue (guid, out info)) {
+ RaiseWarning (0, String.Format (
+ "{0}: ProjectReference '{1}' is of an unsupported type. Ignoring.",
+ filename, bi.EvaluatedInclude));
+ continue;
+ }
+ }
+
+ if (info == null || !hasGuid) {
+ // Project not found by guid or guid not available
+ // Try to find by project file
+
+ string fullpath = Path.GetFullPath (Path.Combine (projectDir, bi.EvaluatedInclude.Replace ('\\', Path.DirectorySeparatorChar)));
+ info = projectInfos.Values.FirstOrDefault (pi => pi.FileName == fullpath);
+
+ if (info == null) {
+ if (unsupportedProjectInfos.Values.Any (pi => pi.FileName == fullpath))
+ RaiseWarning (0, String.Format (
+ "{0}: ProjectReference '{1}' is of an unsupported type. Ignoring.",
+ filename, bi.EvaluatedInclude));
+ else
+ RaiseWarning (0, String.Format (
+ "{0}: ProjectReference '{1}' not found, neither by guid '{2}' nor by project file name '{3}'.",
+ filename, bi.EvaluatedInclude, projectReferenceGuid.Replace ("{", "").Replace ("}", ""), fullpath));
+ }
+
+ }
+
+ if (info != null)
+ projectInfo.Dependencies [info.Guid] = info;
+ }
+ }
+
+ // fill in the project info for deps found in the .sln file
+ foreach (ProjectInfo projectInfo in projectInfos.Values) {
+ List<Guid> missingInfos = new List<Guid> ();
+ foreach (KeyValuePair<Guid, ProjectInfo> dependency in projectInfo.Dependencies) {
+ if (dependency.Value == null)
+ missingInfos.Add (dependency.Key);
+ }
+
+ foreach (Guid guid in missingInfos) {
+ ProjectInfo info;
+ if (projectInfos.TryGetValue (guid, out info))
+ projectInfo.Dependencies [guid] = info;
+ else
+ projectInfo.Dependencies.Remove (guid);
+ }
+ }
+
+ Match globalMatch = globalRegex.Match (line);
+ Match globalSectionMatch = globalSectionRegex.Match (globalMatch.Groups[1].Value);
+ while (globalSectionMatch.Success) {
+ string sectionType = globalSectionMatch.Groups[1].Value;
+ switch (sectionType) {
+ case "SolutionConfigurationPlatforms":
+ ParseSolutionConfigurationPlatforms (globalSectionMatch.Groups[2].Value, solutionTargets);
+ break;
+ case "ProjectConfigurationPlatforms":
+ ParseProjectConfigurationPlatforms (globalSectionMatch.Groups[2].Value,
+ projectInfos, websiteProjectInfos);
+ break;
+ case "SolutionProperties":
+ ParseSolutionProperties (globalSectionMatch.Groups[2].Value);
+ break;
+ case "NestedProjects":
+ break;
+ case "MonoDevelopProperties":
+ break;
+ default:
+ RaiseWarning (0, string.Format("Don't know how to handle GlobalSection {0}, Ignoring.", sectionType));
+ break;
+ }
+ globalSectionMatch = globalSectionMatch.NextMatch ();
+ }
+
+ int num_levels = AddBuildLevels (p, solutionTargets, projectInfos, ref infosByLevel);
+
+ AddCurrentSolutionConfigurationContents (p, solutionTargets, projectInfos, websiteProjectInfos);
+ AddProjectReferences (p, projectInfos);
+ AddWebsiteProperties (p, websiteProjectInfos, projectInfos);
+ AddValidateSolutionConfiguration (p);
+
+ EmitAfterImports (p, file);
+
+ AddGetFrameworkPathTarget (p);
+ AddWebsiteTargets (p, websiteProjectInfos, projectInfos, infosByLevel, solutionTargets);
+ AddProjectTargets (p, solutionTargets, projectInfos);
+ AddSolutionTargets (p, num_levels, websiteProjectInfos.Values);
+ }
+
+ string GetSlnFileVersion (StreamReader reader)
+ {
+ string strInput = null;
+ Match match;
+
+ strInput = reader.ReadLine();
+ if (strInput == null)
+ return null;
+
+ match = slnVersionRegex.Match(strInput);
+ if (!match.Success) {
+ strInput = reader.ReadLine();
+ if (strInput == null)
+ return null;
+ match = slnVersionRegex.Match (strInput);
+ }
+
+ if (match.Success)
+ return match.Groups[1].Value;
+
+ return null;
+ }
+
+ void EmitBeforeImports (ProjectRootElement p, string file)
+ {
+#if NET_4_0
+ p.AddImportGroup ().AddImport ("$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\SolutionFile\\ImportBefore\\*").Condition =
+ "'$(ImportByWildcardBeforeSolution)' != 'false' and " +
+ "Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\SolutionFile\\ImportBefore')";
+#endif
+
+ string before_filename = Path.Combine (Path.GetDirectoryName (file), "before." + Path.GetFileName (file) + ".targets");
+ p.AddImportGroup ().AddImport (before_filename).Condition = String.Format ("Exists ('{0}')", before_filename);
+ }
+
+ void EmitAfterImports (ProjectRootElement p, string file)
+ {
+#if NET_4_0
+ p.AddImportGroup ().AddImport ("$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\SolutionFile\\ImportAfter\\*").Condition =
+ "'$(ImportByWildcardAfterSolution)' != 'false' and " +
+ "Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\SolutionFile\\ImportAfter')";
+#endif
+
+ string after_filename = Path.Combine (Path.GetDirectoryName (file), "after." + Path.GetFileName (file) + ".targets");
+ p.AddImportGroup ().AddImport (after_filename).Condition = String.Format ("Exists ('{0}')", after_filename);
+ }
+
+ void AddGeneralSettings (string solutionFile, ProjectRootElement p)
+ {
+ p.DefaultTargets = "Build";
+ p.InitialTargets = "ValidateSolutionConfiguration";
+ p.AddUsingTask ("CreateTemporaryVCProject", null, "Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
+ p.AddUsingTask ("ResolveVCProjectOutput", null, "Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
+
+ string solutionFilePath = Path.GetFullPath (solutionFile);
+ var solutionPropertyGroup = p.CreatePropertyGroupElement ();
+ //solutionPropertyGroup.ChildrenReversed = true;
+ solutionPropertyGroup.AddProperty ("SolutionDir", Path.GetDirectoryName (solutionFilePath) + Path.DirectorySeparatorChar);
+ solutionPropertyGroup.AddProperty ("SolutionExt", Path.GetExtension (solutionFile));
+ solutionPropertyGroup.AddProperty ("SolutionFileName", Path.GetFileName (solutionFile));
+ solutionPropertyGroup.AddProperty ("SolutionName", Path.GetFileNameWithoutExtension (solutionFile));
+ solutionPropertyGroup.AddProperty ("SolutionPath", solutionFilePath);
+ }
+
+ void ParseSolutionConfigurationPlatforms (string section, List<TargetInfo> solutionTargets)
+ {
+ Match solutionConfigurationPlatform = solutionConfigurationRegex.Match (section);
+ while (solutionConfigurationPlatform.Success) {
+ string solutionConfiguration = solutionConfigurationPlatform.Groups[1].Value;
+ string solutionPlatform = solutionConfigurationPlatform.Groups[2].Value;
+ solutionTargets.Add (new TargetInfo (solutionConfiguration, solutionPlatform));
+ solutionConfigurationPlatform = solutionConfigurationPlatform.NextMatch ();
+ }
+ }
+
+ // ignores the website projects, in the websiteProjectInfos
+ void ParseProjectConfigurationPlatforms (string section, Dictionary<Guid, ProjectInfo> projectInfos,
+ Dictionary<Guid, ProjectInfo> websiteProjectInfos)
+ {
+ List<Guid> missingGuids = new List<Guid> ();
+ Match projectConfigurationPlatform = projectConfigurationActiveCfgRegex.Match (section);
+ while (projectConfigurationPlatform.Success) {
+ Guid guid = new Guid (projectConfigurationPlatform.Groups[1].Value);
+ ProjectInfo projectInfo;
+ if (!projectInfos.TryGetValue (guid, out projectInfo)) {
+ if (!missingGuids.Contains (guid)) {
+ if (!websiteProjectInfos.ContainsKey (guid))
+ // ignore website projects
+ RaiseWarning (0, string.Format("Failed to find project {0}", guid));
+ missingGuids.Add (guid);
+ }
+ projectConfigurationPlatform = projectConfigurationPlatform.NextMatch ();
+ continue;
+ }
+ string solConf = projectConfigurationPlatform.Groups[2].Value;
+ string solPlat = projectConfigurationPlatform.Groups[3].Value;
+ string projConf = projectConfigurationPlatform.Groups[4].Value;
+ string projPlat = projectConfigurationPlatform.Groups[5].Value;
+ // hack, what are they doing here?
+ if (projPlat == "Any CPU")
+ projPlat = "AnyCPU";
+ projectInfo.TargetMap.Add (new TargetInfo (solConf, solPlat), new TargetInfo (projConf, projPlat));
+ projectConfigurationPlatform = projectConfigurationPlatform.NextMatch ();
+ }
+ Match projectConfigurationPlatformBuild = projectConfigurationBuildRegex.Match (section);
+ while (projectConfigurationPlatformBuild.Success) {
+ Guid guid = new Guid (projectConfigurationPlatformBuild.Groups[1].Value);
+ ProjectInfo projectInfo;
+ if (!projectInfos.TryGetValue (guid, out projectInfo)) {
+ if (!missingGuids.Contains (guid)) {
+ RaiseWarning (0, string.Format("Failed to find project {0}", guid));
+ missingGuids.Add (guid);
+ }
+ projectConfigurationPlatformBuild = projectConfigurationPlatformBuild.NextMatch ();
+ continue;
+ }
+ string solConf = projectConfigurationPlatformBuild.Groups[2].Value;
+ string solPlat = projectConfigurationPlatformBuild.Groups[3].Value;
+ string projConf = projectConfigurationPlatformBuild.Groups[4].Value;
+ string projPlat = projectConfigurationPlatformBuild.Groups[5].Value;
+ // hack, what are they doing here?
+ if (projPlat == "Any CPU")
+ projPlat = "AnyCPU";
+ projectInfo.TargetMap[new TargetInfo (solConf, solPlat)] = new TargetInfo (projConf, projPlat, true);
+ projectConfigurationPlatformBuild = projectConfigurationPlatformBuild.NextMatch ();
+ }
+ }
+
+ void ParseSolutionProperties (string section)
+ {
+ }
+
+ void AddCurrentSolutionConfigurationContents (ProjectRootElement p, List<TargetInfo> solutionTargets,
+ Dictionary<Guid, ProjectInfo> projectInfos,
+ Dictionary<Guid, ProjectInfo> websiteProjectInfos)
+ {
+ TargetInfo default_target_info = new TargetInfo ("Debug", "Any CPU");
+ if (solutionTargets.Count > 0) {
+ bool found = false;
+ foreach (TargetInfo tinfo in solutionTargets) {
+ if (String.Compare (tinfo.Platform, "Mixed Platforms") == 0) {
+ default_target_info = tinfo;
+ found = true;
+ break;
+ }
+ }
+
+ if (!found)
+ default_target_info = solutionTargets [0];
+ }
+
+ AddDefaultSolutionConfiguration (p, default_target_info);
+
+ foreach (TargetInfo solutionTarget in solutionTargets) {
+ var platformPropertyGroup = p.AddPropertyGroup ();
+ platformPropertyGroup.Condition = string.Format (
+ " ('$(Configuration)' == '{0}') and ('$(Platform)' == '{1}') ",
+ solutionTarget.Configuration,
+ solutionTarget.Platform
+ );
+
+ StringBuilder solutionConfigurationContents = new StringBuilder ();
+ solutionConfigurationContents.Append ("<SolutionConfiguration xmlns=\"\">");
+ foreach (KeyValuePair<Guid, ProjectInfo> projectInfo in projectInfos) {
+ AddProjectConfigurationItems (projectInfo.Key, projectInfo.Value, solutionTarget, solutionConfigurationContents);
+ }
+ solutionConfigurationContents.Append ("</SolutionConfiguration>");
+
+ platformPropertyGroup.AddProperty ("CurrentSolutionConfigurationContents",
+ solutionConfigurationContents.ToString ());
+ }
+ }
+
+ void AddProjectReferences (ProjectRootElement p, Dictionary<Guid, ProjectInfo> projectInfos)
+ {
+ var big = p.AddItemGroup ();
+ foreach (KeyValuePair<Guid, ProjectInfo> pair in projectInfos)
+ big.AddItem ("ProjectReference", pair.Value.FileName);
+ }
+
+ void AddProjectConfigurationItems (Guid guid, ProjectInfo projectInfo, TargetInfo solutionTarget,
+ StringBuilder solutionConfigurationContents)
+ {
+ foreach (KeyValuePair<TargetInfo, TargetInfo> targetInfo in projectInfo.TargetMap) {
+ if (solutionTarget.Configuration == targetInfo.Key.Configuration &&
+ solutionTarget.Platform == targetInfo.Key.Platform) {
+ solutionConfigurationContents.AppendFormat (
+ "<ProjectConfiguration Project=\"{0}\">{1}|{2}</ProjectConfiguration>",
+ guid.ToString ("B").ToUpper (), targetInfo.Value.Configuration, targetInfo.Value.Platform);
+ }
+ }
+ }
+
+ void AddDefaultSolutionConfiguration (ProjectRootElement p, TargetInfo target)
+ {
+ var configurationPropertyGroup = p.AddPropertyGroup ();
+ //configurationPropertyGroup.PropertiesReversed = true;
+ configurationPropertyGroup.Condition = " '$(Configuration)' == '' ";
+ configurationPropertyGroup.AddProperty ("Configuration", target.Configuration);
+
+ var platformPropertyGroup = p.AddPropertyGroup ();
+ //platformPropertyGroup.PropertiesReversed = true;
+ platformPropertyGroup.Condition = " '$(Platform)' == '' ";
+ platformPropertyGroup.AddProperty ("Platform", target.Platform);
+
+ // emit default for AspNetConfiguration also
+ var aspNetConfigurationPropertyGroup = p.AddPropertyGroup ();
+ //aspNetConfigurationPropertyGroup.PropertiesReversed = true;
+ aspNetConfigurationPropertyGroup.Condition = " ('$(AspNetConfiguration)' == '') ";
+ aspNetConfigurationPropertyGroup.AddProperty ("AspNetConfiguration", "$(Configuration)");
+ }
+
+ void AddWarningForMissingProjectConfiguration (ProjectTargetElement target, string slnConfig, string slnPlatform, string projectName)
+ {
+ var task = target.AddTask ("Warning");
+ task.SetParameter ("Text",
+ String.Format ("The project configuration for project '{0}' corresponding " +
+ "to the solution configuration '{1}|{2}' was not found in the solution file.",
+ projectName, slnConfig, slnPlatform));
+ task.Condition = String.Format ("('$(Configuration)' == '{0}') and ('$(Platform)' == '{1}')",
+ slnConfig, slnPlatform);
+
+ }
+
+ // Website project methods
+
+ void AddWebsiteProperties (ProjectRootElement p, Dictionary<Guid, ProjectInfo> websiteProjectInfos,
+ Dictionary<Guid, ProjectInfo> projectInfos)
+ {
+ var propertyGroupByConfig = new Dictionary<string, ProjectPropertyGroupElement> ();
+ foreach (KeyValuePair<Guid, ProjectInfo> infoPair in websiteProjectInfos) {
+ ProjectInfo info = infoPair.Value;
+ string projectGuid = infoPair.Key.ToString ();
+
+ ProjectSection section;
+ if (!info.ProjectSections.TryGetValue ("WebsiteProperties", out section)) {
+ RaiseWarning (0, String.Format ("Website project '{0}' does not have the required project section: WebsiteProperties. Ignoring project.", info.Name));
+ return;
+ }
+
+ //parse project references
+ string [] ref_guids = null;
+ string references;
+ if (section.Properties.TryGetValue ("ProjectReferences", out references)) {
+ ref_guids = references.Split (new char [] {';'}, StringSplitOptions.RemoveEmptyEntries);
+ for (int i = 0; i < ref_guids.Length; i ++) {
+ // "{guid}|foo.dll"
+ ref_guids [i] = ref_guids [i].Split ('|') [0];
+
+ Guid r_guid = new Guid (ref_guids [i]);
+ ProjectInfo ref_info;
+ if (projectInfos.TryGetValue (r_guid, out ref_info))
+ // ignore if not found
+ info.Dependencies [r_guid] = ref_info;
+ }
+ }
+
+ foreach (KeyValuePair<string, string> pair in section.Properties) {
+ //looking for -- ConfigName.AspNetCompiler.PropName
+ string [] parts = pair.Key.Split ('.');
+ if (parts.Length != 3 || String.Compare (parts [1], "AspNetCompiler") != 0)
+ continue;
+
+ string config = parts [0];
+ string propertyName = parts [2];
+
+ ProjectPropertyGroupElement bpg;
+ if (!propertyGroupByConfig.TryGetValue (config, out bpg)) {
+ bpg = p.AddPropertyGroup ();
+ //bpg.PropertiesReversed = true;
+ bpg.Condition = String.Format (" '$(AspNetConfiguration)' == '{0}' ", config);
+ propertyGroupByConfig [config] = bpg;
+ }
+
+ bpg.AddProperty (String.Format ("Project_{0}_AspNet{1}", projectGuid, propertyName),
+ pair.Value);
+
+ if (!info.AspNetConfigurations.Contains (config))
+ info.AspNetConfigurations.Add (config);
+ }
+ }
+ }
+
+ // For WebSite projects
+ // The main "Build" target:
+ // 1. builds all non-website projects
+ // 2. calls target for website project
+ // - gets target path for the referenced projects
+ // - Resolves dependencies, satellites etc for the
+ // referenced project assemblies, and copies them
+ // to bin/ folder
+ void AddWebsiteTargets (ProjectRootElement p, Dictionary<Guid, ProjectInfo> websiteProjectInfos,
+ Dictionary<Guid, ProjectInfo> projectInfos, List<ProjectInfo>[] infosByLevel,
+ List<TargetInfo> solutionTargets)
+ {
+ foreach (ProjectInfo w_info in websiteProjectInfos.Values) {
+ // gets a linear list of dependencies
+ List<ProjectInfo> depInfos = new List<ProjectInfo> ();
+ foreach (List<ProjectInfo> pinfos in infosByLevel) {
+ foreach (ProjectInfo pinfo in pinfos)
+ if (w_info.Dependencies.ContainsKey (pinfo.Guid))
+ depInfos.Add (pinfo);
+ }
+
+ foreach (string buildTarget in new string [] {"Build", "Rebuild"})
+ AddWebsiteTarget (p, w_info, projectInfos, depInfos, solutionTargets, buildTarget);
+
+ // clean/publish are not supported for website projects
+ foreach (string buildTarget in new string [] {"Clean", "Publish"})
+ AddWebsiteUnsupportedTarget (p, w_info, depInfos, buildTarget);
+ }
+ }
+
+ void AddWebsiteTarget (ProjectRootElement p, ProjectInfo webProjectInfo,
+ Dictionary<Guid, ProjectInfo> projectInfos, List<ProjectInfo> depInfos,
+ List<TargetInfo> solutionTargets, string buildTarget)
+ {
+ string w_guid = webProjectInfo.Guid.ToString ().ToUpper ();
+
+ var target = p.AddTarget (GetTargetNameForProject (webProjectInfo.Name, buildTarget));
+ target.Condition = "'$(CurrentSolutionConfigurationContents)' != ''";
+ target.DependsOnTargets = GetWebsiteDependsOnTarget (depInfos, buildTarget);
+
+ // this item collects all the references
+ string final_ref_item = String.Format ("Project_{0}_References{1}", w_guid,
+ buildTarget != "Build" ? "_" + buildTarget : String.Empty);
+
+ foreach (TargetInfo targetInfo in solutionTargets) {
+ int ref_num = 0;
+ foreach (ProjectInfo depInfo in depInfos) {
+ TargetInfo projectTargetInfo;
+ if (!depInfo.TargetMap.TryGetValue (targetInfo, out projectTargetInfo))
+ // Ignore, no config, so no target path
+ continue;
+
+ // GetTargetPath from the referenced project
+ AddWebsiteMSBuildTaskForReference (target, depInfo, projectTargetInfo, targetInfo,
+ final_ref_item, ref_num);
+ ref_num ++;
+ }
+ }
+
+ // resolve the references
+ AddWebsiteResolveAndCopyReferencesTasks (target, webProjectInfo, final_ref_item, w_guid);
+ }
+
+ // emits the MSBuild task to GetTargetPath for the referenced project
+ void AddWebsiteMSBuildTaskForReference (ProjectTargetElement target, ProjectInfo depInfo, TargetInfo projectTargetInfo,
+ TargetInfo solutionTargetInfo, string final_ref_item, int ref_num)
+ {
+ var task = target.AddTask ("MSBuild");
+ task.SetParameter ("Projects", depInfo.FileName);
+ task.SetParameter ("Targets", "GetTargetPath");
+
+ task.SetParameter ("Properties", string.Format ("Configuration={0}; Platform={1}; BuildingSolutionFile=true; CurrentSolutionConfigurationContents=$(CurrentSolutionConfigurationContents); SolutionDir=$(SolutionDir); SolutionExt=$(SolutionExt); SolutionFileName=$(SolutionFileName); SolutionName=$(SolutionName); SolutionPath=$(SolutionPath)", projectTargetInfo.Configuration, projectTargetInfo.Platform));
+ task.Condition = string.Format (" ('$(Configuration)' == '{0}') and ('$(Platform)' == '{1}') ", solutionTargetInfo.Configuration, solutionTargetInfo.Platform);
+
+ string ref_item = String.Format ("{0}_{1}",
+ final_ref_item, ref_num);
+
+ task.AddOutputItem ("TargetOutputs", ref_item);
+
+ task = target.AddTask ("CreateItem");
+ task.SetParameter ("Include", String.Format ("@({0})", ref_item));
+ task.SetParameter ("AdditionalMetadata", String.Format ("Guid={{{0}}}",
+ depInfo.Guid.ToString ().ToUpper ()));
+ task.AddOutputItem ("Include", final_ref_item);
+ }
+
+ void AddWebsiteResolveAndCopyReferencesTasks (ProjectTargetElement target, ProjectInfo webProjectInfo,
+ string final_ref_item, string w_guid)
+ {
+ var task = target.AddTask ("ResolveAssemblyReference");
+ task.SetParameter ("Assemblies", String.Format ("@({0}->'%(FullPath)')", final_ref_item));
+ task.SetParameter ("TargetFrameworkDirectories", "$(TargetFrameworkPath)");
+ task.SetParameter ("SearchPaths", "{RawFileName};{TargetFrameworkDirectory};{GAC}");
+ task.SetParameter ("FindDependencies", "true");
+ task.SetParameter ("FindSatellites", "true");
+ task.SetParameter ("FindRelatedFiles", "true");
+ task.Condition = String.Format ("Exists ('%({0}.Identity)')", final_ref_item);
+
+ string copylocal_item = String.Format ("{0}_CopyLocalFiles", final_ref_item);
+ task.AddOutputItem ("CopyLocalFiles", copylocal_item);
+
+ // Copy the references
+ task = target.AddTask ("Copy");
+ task.SetParameter ("SourceFiles", String.Format ("@({0})", copylocal_item));
+ task.SetParameter ("DestinationFiles", String.Format (
+ "@({0}->'$(Project_{1}_AspNetPhysicalPath)\\Bin\\%(DestinationSubDirectory)%(Filename)%(Extension)')",
+ copylocal_item, w_guid));
+
+ // AspNetConfiguration, is config for the website project, useful
+ // for overriding from command line
+ StringBuilder cond = new StringBuilder ();
+ foreach (string config in webProjectInfo.AspNetConfigurations) {
+ if (cond.Length > 0)
+ cond.Append (" or ");
+ cond.AppendFormat (" ('$(AspNetConfiguration)' == '{0}') ", config);
+ }
+ task.Condition = cond.ToString ();
+
+ task = target.AddTask ("Message");
+ cond = new StringBuilder ();
+ foreach (string config in webProjectInfo.AspNetConfigurations) {
+ if (cond.Length > 0)
+ cond.Append (" and ");
+ cond.AppendFormat (" ('$(AspNetConfiguration)' != '{0}') ", config);
+ }
+ task.Condition = cond.ToString ();
+ task.SetParameter ("Text", "Skipping as the '$(AspNetConfiguration)' configuration is " +
+ "not supported by this website project.");
+ }
+
+ void AddWebsiteUnsupportedTarget (ProjectRootElement p, ProjectInfo webProjectInfo, List<ProjectInfo> depInfos,
+ string buildTarget)
+ {
+ var target = p.AddTarget (GetTargetNameForProject (webProjectInfo.Name, buildTarget));
+ target.DependsOnTargets = GetWebsiteDependsOnTarget (depInfos, buildTarget);
+
+ var task = target.AddTask ("Message");
+ task.SetParameter ("Text", String.Format (
+ "Target '{0}' not support for website projects", buildTarget));
+ }
+
+ string GetWebsiteDependsOnTarget (List<ProjectInfo> depInfos, string buildTarget)
+ {
+ StringBuilder deps = new StringBuilder ();
+ foreach (ProjectInfo pinfo in depInfos) {
+ if (deps.Length > 0)
+ deps.Append (";");
+ deps.Append (GetTargetNameForProject (pinfo.Name, buildTarget));
+ }
+ deps.Append (";GetFrameworkPath");
+ return deps.ToString ();
+ }
+
+ void AddGetFrameworkPathTarget (ProjectRootElement p)
+ {
+ var t = p.AddTarget ("GetFrameworkPath");
+ var task = t.AddTask ("GetFrameworkPath");
+ task.AddOutputProperty ("Path", "TargetFrameworkPath");
+ }
+
+ void AddValidateSolutionConfiguration (ProjectRootElement p)
+ {
+ var t = p.AddTarget ("ValidateSolutionConfiguration");
+ var task = t.AddTask ("Warning");
+ task.SetParameter ("Text", "On windows, an environment variable 'Platform' is set to MCD sometimes, and this overrides the Platform property" +
+ " for xbuild, which could be an invalid Platform for this solution file. And so you are getting the following error." +
+ " You could override it by either setting the environment variable to nothing, as\n" +
+ " set Platform=\n" +
+ "Or explicity specify its value on the command line, as\n" +
+ " xbuild Foo.sln /p:Platform=Release");
+ task.Condition = "('$(CurrentSolutionConfigurationContents)' == '') and ('$(SkipInvalidConfigurations)' != 'true')" +
+ " and '$(Platform)' == 'MCD' and '$(OS)' == 'Windows_NT'";
+
+ task = t.AddTask ("Error");
+ task.SetParameter ("Text", "Invalid solution configuration and platform: \"$(Configuration)|$(Platform)\".");
+ task.Condition = "('$(CurrentSolutionConfigurationContents)' == '') and ('$(SkipInvalidConfigurations)' != 'true')";
+ task = t.AddTask ("Warning");
+ task.SetParameter ("Text", "Invalid solution configuration and platform: \"$(Configuration)|$(Platform)\".");
+ task.Condition = "('$(CurrentSolutionConfigurationContents)' == '') and ('$(SkipInvalidConfigurations)' == 'true')";
+ task = t.AddTask ("Message");
+ task.SetParameter ("Text", "Building solution configuration \"$(Configuration)|$(Platform)\".");
+ task.Condition = "'$(CurrentSolutionConfigurationContents)' != ''";
+ }
+
+ void AddProjectTargets (ProjectRootElement p, List<TargetInfo> solutionTargets, Dictionary<Guid, ProjectInfo> projectInfos)
+ {
+ foreach (KeyValuePair<Guid, ProjectInfo> projectInfo in projectInfos) {
+ ProjectInfo project = projectInfo.Value;
+ foreach (string buildTarget in buildTargets) {
+ string target_name = GetTargetNameForProject (project.Name, buildTarget);
+ bool is_build_or_rebuild = buildTarget == "Build" || buildTarget == "Rebuild";
+ var target = p.AddTarget (target_name);
+ target.Condition = "'$(CurrentSolutionConfigurationContents)' != ''";
+
+ if (is_build_or_rebuild)
+ target.Outputs = "@(CollectedBuildOutput)";
+ if (project.Dependencies.Count > 0)
+ target.DependsOnTargets = String.Join (";",
+ project.Dependencies.Values.Select (
+ di => GetTargetNameForProject (di.Name, buildTarget)).ToArray ());
+
+ foreach (TargetInfo targetInfo in solutionTargets) {
+ ProjectTaskElement task = null;
+ TargetInfo projectTargetInfo;
+ if (!project.TargetMap.TryGetValue (targetInfo, out projectTargetInfo)) {
+ AddWarningForMissingProjectConfiguration (target, targetInfo.Configuration,
+ targetInfo.Platform, project.Name);
+ continue;
+ }
+ if (projectTargetInfo.Build) {
+ task = target.AddTask ("MSBuild");
+ task.SetParameter ("Projects", project.FileName);
+ task.SetParameter ("ToolsVersion", "$(ProjectToolsVersion)");
+ if (is_build_or_rebuild)
+ task.AddOutputItem ("TargetOutputs", "CollectedBuildOutput");
+
+ if (buildTarget != "Build")
+ task.SetParameter ("Targets", buildTarget);
+ task.SetParameter ("Properties", string.Format ("Configuration={0}; Platform={1}; BuildingSolutionFile=true; CurrentSolutionConfigurationContents=$(CurrentSolutionConfigurationContents); SolutionDir=$(SolutionDir); SolutionExt=$(SolutionExt); SolutionFileName=$(SolutionFileName); SolutionName=$(SolutionName); SolutionPath=$(SolutionPath)", projectTargetInfo.Configuration, projectTargetInfo.Platform));
+ } else {
+ task = target.AddTask ("Message");
+ task.SetParameter ("Text", string.Format ("Project \"{0}\" is disabled for solution configuration \"{1}|{2}\".", project.Name, targetInfo.Configuration, targetInfo.Platform));
+ }
+ task.Condition = string.Format (" ('$(Configuration)' == '{0}') and ('$(Platform)' == '{1}') ", targetInfo.Configuration, targetInfo.Platform);
+ }
+ }
+ }
+ }
+
+
+ string GetTargetNameForProject (string projectName, string buildTarget)
+ {
+ //FIXME: hack
+ projectName = projectName.Replace ("\\", "/").Replace (".", "_");
+ string target_name = projectName +
+ (buildTarget == "Build" ? string.Empty : ":" + buildTarget);
+
+ if (IsBuildTargetName (projectName))
+ target_name = "Solution:" + target_name;
+
+ return target_name;
+ }
+
+ bool IsBuildTargetName (string name)
+ {
+ foreach (string tgt in buildTargets)
+ if (name == tgt)
+ return true;
+ return false;
+ }
+
+ // returns number of levels
+ int AddBuildLevels (ProjectRootElement p, List<TargetInfo> solutionTargets, Dictionary<Guid, ProjectInfo> projectInfos,
+ ref List<ProjectInfo>[] infosByLevel)
+ {
+ infosByLevel = TopologicalSort<ProjectInfo> (projectInfos.Values);
+
+ foreach (TargetInfo targetInfo in solutionTargets) {
+ var big = p.AddItemGroup ();
+ big.Condition = String.Format (" ('$(Configuration)' == '{0}') and ('$(Platform)' == '{1}') ",
+ targetInfo.Configuration, targetInfo.Platform);
+
+ //FIXME: every level has projects that can be built in parallel.
+ // levels are ordered on the basis of the dependency graph
+
+ for (int i = 0; i < infosByLevel.Length; i ++) {
+ string build_level = String.Format ("BuildLevel{0}", i);
+ string skip_level = String.Format ("SkipLevel{0}", i);
+ string missing_level = String.Format ("MissingConfigLevel{0}", i);
+
+ foreach (ProjectInfo projectInfo in infosByLevel [i]) {
+ TargetInfo projectTargetInfo;
+ if (!projectInfo.TargetMap.TryGetValue (targetInfo, out projectTargetInfo)) {
+ // missing project config
+ big.AddItem (missing_level, projectInfo.Name);
+ continue;
+ }
+
+ if (projectTargetInfo.Build) {
+ var item = big.AddItem (build_level, projectInfo.FileName);
+ item.AddMetadata ("Configuration", projectTargetInfo.Configuration);
+ item.AddMetadata ("Platform", projectTargetInfo.Platform);
+ } else {
+ // build disabled
+ big.AddItem (skip_level, projectInfo.Name);
+ }
+ }
+ }
+ }
+
+ return infosByLevel.Length;
+ }
+
+ void AddSolutionTargets (ProjectRootElement p, int num_levels, IEnumerable<ProjectInfo> websiteProjectInfos)
+ {
+ foreach (string buildTarget in buildTargets) {
+ var t = p.AddTarget (buildTarget);
+ bool is_build_or_rebuild = buildTarget == "Build" || buildTarget == "Rebuild";
+
+ t.Condition = "'$(CurrentSolutionConfigurationContents)' != ''";
+ if (is_build_or_rebuild)
+ t.Outputs = "@(CollectedBuildOutput)";
+
+ ProjectTaskElement task = null;
+ for (int i = 0; i < num_levels; i ++) {
+ string level_str = String.Format ("BuildLevel{0}", i);
+ task = t.AddTask ("MSBuild");
+ task.SetParameter ("Condition", String.Format ("'@({0})' != ''", level_str));
+ task.SetParameter ("Projects", String.Format ("@({0})", level_str));
+ task.SetParameter ("ToolsVersion", "$(ProjectToolsVersion)");
+ task.SetParameter ("Properties",
+ string.Format ("Configuration=%(Configuration); Platform=%(Platform); BuildingSolutionFile=true; CurrentSolutionConfigurationContents=$(CurrentSolutionConfigurationContents); SolutionDir=$(SolutionDir); SolutionExt=$(SolutionExt); SolutionFileName=$(SolutionFileName); SolutionName=$(SolutionName); SolutionPath=$(SolutionPath)"));
+ if (buildTarget != "Build")
+ task.SetParameter ("Targets", buildTarget);
+ //FIXME: change this to BuildInParallel=true, when parallel
+ // build support gets added
+ task.SetParameter ("RunEachTargetSeparately", "true");
+ if (is_build_or_rebuild)
+ task.AddOutputItem ("TargetOutputs", "CollectedBuildOutput");
+
+ level_str = String.Format ("SkipLevel{0}", i);
+ task = t.AddTask ("Message");
+ task.Condition = String.Format ("'@({0})' != ''", level_str);
+ task.SetParameter ("Text",
+ String.Format ("The project '%({0}.Identity)' is disabled for solution " +
+ "configuration '$(Configuration)|$(Platform)'.", level_str));
+
+ level_str = String.Format ("MissingConfigLevel{0}", i);
+ task = t.AddTask ("Warning");
+ task.Condition = String.Format ("'@({0})' != ''", level_str);
+ task.SetParameter ("Text",
+ String.Format ("The project configuration for project '%({0}.Identity)' " +
+ "corresponding to the solution configuration " +
+ "'$(Configuration)|$(Platform)' was not found.", level_str));
+ }
+
+ // "build" website projects also
+ StringBuilder w_targets = new StringBuilder ();
+ foreach (ProjectInfo info in websiteProjectInfos) {
+ if (w_targets.Length > 0)
+ w_targets.Append (";");
+ w_targets.Append (GetTargetNameForProject (info.Name, buildTarget));
+ }
+
+ task = t.AddTask ("CallTarget");
+ task.SetParameter ("Targets", w_targets.ToString ());
+ task.SetParameter ("RunEachTargetSeparately", "true");
+ }
+ }
+
+ // Sorts the ProjectInfo dependency graph, to obtain
+ // a series of build levels with projects. Projects
+ // in each level can be run parallel (no inter-dependency).
+ static List<T>[] TopologicalSort<T> (IEnumerable<T> items) where T: ProjectInfo
+ {
+ IList<T> allItems;
+ allItems = items as IList<T>;
+ if (allItems == null)
+ allItems = new List<T> (items);
+
+ bool[] inserted = new bool[allItems.Count];
+ bool[] triedToInsert = new bool[allItems.Count];
+ int[] levels = new int [allItems.Count];
+
+ int maxdepth = 0;
+ for (int i = 0; i < allItems.Count; ++i) {
+ int d = Insert<T> (i, allItems, levels, inserted, triedToInsert);
+ if (d > maxdepth)
+ maxdepth = d;
+ }
+
+ // Separate out the project infos by build level
+ List<T>[] infosByLevel = new List<T>[maxdepth];
+ for (int i = 0; i < levels.Length; i ++) {
+ int level = levels [i] - 1;
+ if (infosByLevel [level] == null)
+ infosByLevel [level] = new List<T> ();
+
+ infosByLevel [level].Add (allItems [i]);
+ }
+
+ return infosByLevel;
+ }
+
+ // returns level# for the project
+ static int Insert<T> (int index, IList<T> allItems, int[] levels, bool[] inserted, bool[] triedToInsert)
+ where T: ProjectInfo
+ {
+ if (inserted [index])
+ return levels [index];
+
+ if (triedToInsert[index])
+ throw new InvalidOperationException (String.Format (
+ "Cyclic dependency involving project {0} found in the project dependency graph",
+ allItems [index].Name));
+
+ triedToInsert[index] = true;
+ ProjectInfo insertItem = allItems[index];
+
+ int maxdepth = 0;
+ foreach (ProjectInfo dependency in insertItem.Dependencies.Values) {
+ for (int j = 0; j < allItems.Count; ++j) {
+ ProjectInfo checkItem = allItems [j];
+ if (dependency.FileName == checkItem.FileName) {
+ int d = Insert (j, allItems, levels, inserted, triedToInsert);
+ maxdepth = d > maxdepth ? d : maxdepth;
+ break;
+ }
+ }
+ }
+ levels [index] = maxdepth + 1;
+ inserted [index] = true;
+
+ return levels [index];
+ }
+
+ public static IEnumerable<string> GetAllProjectFileNames (string solutionFile)
+ {
+ StreamReader reader = new StreamReader (solutionFile);
+ string line = reader.ReadToEnd ();
+ line = line.Replace ("\r\n", "\n");
+ string soln_dir = Path.GetDirectoryName (solutionFile);
+
+ Match m = projectRegex.Match (line);
+ while (m.Success) {
+ if (String.Compare (m.Groups [1].Value, solutionFolderGuid,
+ StringComparison.InvariantCultureIgnoreCase) != 0)
+ yield return Path.Combine (soln_dir, m.Groups [3].Value).Replace ("\\", "/");
+
+ m = m.NextMatch ();
+ }
+ }
+ }
+}
--- /dev/null
+../../build/common/Consts.cs
+../../class/Microsoft.Build.Framework/Mono.XBuild.Framework/AssemblyLoadInfo.cs
+../../class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs
+../../class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs
+AssemblyInfo.cs
+CommandLineException.cs
+ErrorUtilities.cs
+LoggerInfo.cs
+Main.cs
+Parameters.cs
+SolutionParser.cs
--- /dev/null
+\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio 2012\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Framework-useful", "..\..\mcs\class\Microsoft.Build.Framework\Microsoft.Build.Framework-useful.csproj", "{2BAFB878-D329-46A5-93AF-5A4ECD403A13}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Framework-tests-useful", "..\..\mcs\class\Microsoft.Build.Framework\Microsoft.Build.Framework-tests-useful.csproj", "{DB6937A9-D27A-42AB-A044-1DB4B1F97414}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Utilities-useful", "..\..\mcs\class\Microsoft.Build.Utilities\Microsoft.Build.Utilities-useful.csproj", "{5CD66EA1-51EB-48EE-8C1C-DDFD23E22C38}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Utilities-tests-useful", "..\..\mcs\class\Microsoft.Build.Utilities\Microsoft.Build.Utilities-tests-useful.csproj", "{7E7B683B-FA73-492D-A59B-E13AF28F8B21}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Engine-useful", "..\..\mcs\class\Microsoft.Build.Engine\Microsoft.Build.Engine-useful.csproj", "{0DA63190-E6E1-41C5-B683-A54FADBE61CB}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Engine-tests-useful", "..\..\mcs\class\Microsoft.Build.Engine\Microsoft.Build.Engine-tests-useful.csproj", "{AE80331E-4C95-4F65-BE43-0C3011661AE1}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Tasks-useful", "..\..\mcs\class\Microsoft.Build.Tasks\Microsoft.Build.Tasks-useful.csproj", "{B0995E00-BF37-4B8A-8229-285C060E5957}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Tasks-tests-useful", "..\..\mcs\class\Microsoft.Build.Tasks\Microsoft.Build.Tasks-tests-useful.csproj", "{E572DA55-C0E6-42BA-9BCF-05B2C777D15B}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build-useful", "..\..\mcs\class\Microsoft.Build\Microsoft.Build-useful.csproj", "{D8A2B8F2-F52B-44D5-A868-C344682749E2}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build-tests-useful", "..\..\mcs\class\Microsoft.Build\Microsoft.Build-tests-useful.csproj", "{E34212A3-F152-4A6F-88F7-7A4D0324D11C}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSBuild", "..\..\mcs\tools\msbuild\MSBuild.csproj", "{89938F1A-C851-41D5-96D2-C329E00887B6}"\r
+EndProject\r
+Global\r
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+ Debug|Any CPU = Debug|Any CPU\r
+ Release|Any CPU = Release|Any CPU\r
+ DebugMS|Any CPU = DebugMS|Any CPU\r
+ EndGlobalSection\r
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+ {0DA63190-E6E1-41C5-B683-A54FADBE61CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {0DA63190-E6E1-41C5-B683-A54FADBE61CB}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {0DA63190-E6E1-41C5-B683-A54FADBE61CB}.DebugMS|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {0DA63190-E6E1-41C5-B683-A54FADBE61CB}.DebugMS|Any CPU.Build.0 = Debug|Any CPU\r
+ {0DA63190-E6E1-41C5-B683-A54FADBE61CB}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {0DA63190-E6E1-41C5-B683-A54FADBE61CB}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ {2BAFB878-D329-46A5-93AF-5A4ECD403A13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {2BAFB878-D329-46A5-93AF-5A4ECD403A13}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {2BAFB878-D329-46A5-93AF-5A4ECD403A13}.DebugMS|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {2BAFB878-D329-46A5-93AF-5A4ECD403A13}.DebugMS|Any CPU.Build.0 = Debug|Any CPU\r
+ {2BAFB878-D329-46A5-93AF-5A4ECD403A13}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {2BAFB878-D329-46A5-93AF-5A4ECD403A13}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ {5CD66EA1-51EB-48EE-8C1C-DDFD23E22C38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {5CD66EA1-51EB-48EE-8C1C-DDFD23E22C38}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {5CD66EA1-51EB-48EE-8C1C-DDFD23E22C38}.DebugMS|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {5CD66EA1-51EB-48EE-8C1C-DDFD23E22C38}.DebugMS|Any CPU.Build.0 = Debug|Any CPU\r
+ {5CD66EA1-51EB-48EE-8C1C-DDFD23E22C38}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {5CD66EA1-51EB-48EE-8C1C-DDFD23E22C38}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ {7E7B683B-FA73-492D-A59B-E13AF28F8B21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {7E7B683B-FA73-492D-A59B-E13AF28F8B21}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {7E7B683B-FA73-492D-A59B-E13AF28F8B21}.DebugMS|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {7E7B683B-FA73-492D-A59B-E13AF28F8B21}.DebugMS|Any CPU.Build.0 = Debug|Any CPU\r
+ {7E7B683B-FA73-492D-A59B-E13AF28F8B21}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {7E7B683B-FA73-492D-A59B-E13AF28F8B21}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ {89938F1A-C851-41D5-96D2-C329E00887B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {89938F1A-C851-41D5-96D2-C329E00887B6}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {89938F1A-C851-41D5-96D2-C329E00887B6}.DebugMS|Any CPU.ActiveCfg = DebugMS|Any CPU\r
+ {89938F1A-C851-41D5-96D2-C329E00887B6}.DebugMS|Any CPU.Build.0 = DebugMS|Any CPU\r
+ {89938F1A-C851-41D5-96D2-C329E00887B6}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {89938F1A-C851-41D5-96D2-C329E00887B6}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ {AE80331E-4C95-4F65-BE43-0C3011661AE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {AE80331E-4C95-4F65-BE43-0C3011661AE1}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {AE80331E-4C95-4F65-BE43-0C3011661AE1}.DebugMS|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {AE80331E-4C95-4F65-BE43-0C3011661AE1}.DebugMS|Any CPU.Build.0 = Debug|Any CPU\r
+ {AE80331E-4C95-4F65-BE43-0C3011661AE1}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {AE80331E-4C95-4F65-BE43-0C3011661AE1}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ {B0995E00-BF37-4B8A-8229-285C060E5957}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {B0995E00-BF37-4B8A-8229-285C060E5957}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {B0995E00-BF37-4B8A-8229-285C060E5957}.DebugMS|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {B0995E00-BF37-4B8A-8229-285C060E5957}.DebugMS|Any CPU.Build.0 = Debug|Any CPU\r
+ {B0995E00-BF37-4B8A-8229-285C060E5957}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {B0995E00-BF37-4B8A-8229-285C060E5957}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ {D8A2B8F2-F52B-44D5-A868-C344682749E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {D8A2B8F2-F52B-44D5-A868-C344682749E2}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {D8A2B8F2-F52B-44D5-A868-C344682749E2}.DebugMS|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {D8A2B8F2-F52B-44D5-A868-C344682749E2}.DebugMS|Any CPU.Build.0 = Debug|Any CPU\r
+ {D8A2B8F2-F52B-44D5-A868-C344682749E2}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {D8A2B8F2-F52B-44D5-A868-C344682749E2}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ {DB6937A9-D27A-42AB-A044-1DB4B1F97414}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {DB6937A9-D27A-42AB-A044-1DB4B1F97414}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {DB6937A9-D27A-42AB-A044-1DB4B1F97414}.DebugMS|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {DB6937A9-D27A-42AB-A044-1DB4B1F97414}.DebugMS|Any CPU.Build.0 = Debug|Any CPU\r
+ {DB6937A9-D27A-42AB-A044-1DB4B1F97414}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {DB6937A9-D27A-42AB-A044-1DB4B1F97414}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ {E34212A3-F152-4A6F-88F7-7A4D0324D11C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {E34212A3-F152-4A6F-88F7-7A4D0324D11C}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {E34212A3-F152-4A6F-88F7-7A4D0324D11C}.DebugMS|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {E34212A3-F152-4A6F-88F7-7A4D0324D11C}.DebugMS|Any CPU.Build.0 = Debug|Any CPU\r
+ {E34212A3-F152-4A6F-88F7-7A4D0324D11C}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {E34212A3-F152-4A6F-88F7-7A4D0324D11C}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ {E572DA55-C0E6-42BA-9BCF-05B2C777D15B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {E572DA55-C0E6-42BA-9BCF-05B2C777D15B}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {E572DA55-C0E6-42BA-9BCF-05B2C777D15B}.DebugMS|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {E572DA55-C0E6-42BA-9BCF-05B2C777D15B}.DebugMS|Any CPU.Build.0 = Debug|Any CPU\r
+ {E572DA55-C0E6-42BA-9BCF-05B2C777D15B}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {E572DA55-C0E6-42BA-9BCF-05B2C777D15B}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ EndGlobalSection\r
+ GlobalSection(MonoDevelopProperties) = preSolution\r
+ StartupItem = ..\..\mcs\tools\msbuild\MSBuild.csproj\r
+ EndGlobalSection\r
+ GlobalSection(SolutionProperties) = preSolution\r
+ HideSolutionNode = FALSE\r
+ EndGlobalSection\r
+EndGlobal\r