Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mcs/Makefile4
-rw-r--r--mcs/build/Makefile3
-rw-r--r--mcs/build/profiles/xbuild_14.make7
-rw-r--r--mcs/class/Makefile1
-rw-r--r--mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/Consts.cs16
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs7
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs13
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs3
-rw-r--r--mcs/tools/xbuild/Makefile3
-rw-r--r--mcs/tools/xbuild/SolutionParser.cs4
-rw-r--r--mcs/tools/xbuild/XBuildConsts.cs8
-rw-r--r--mcs/tools/xbuild/data/14.0/Microsoft.CSharp.targets142
-rw-r--r--mcs/tools/xbuild/data/14.0/Microsoft.Common.targets922
-rw-r--r--mcs/tools/xbuild/data/14.0/Microsoft.Common.tasks37
-rw-r--r--mcs/tools/xbuild/xbuild.make4
-rw-r--r--mcs/tools/xbuild/xbuild_test.make13
-rw-r--r--runtime/Makefile.am4
17 files changed, 1178 insertions, 13 deletions
diff --git a/mcs/Makefile b/mcs/Makefile
index 9bcf32ea2fb..49423b4a15f 100644
--- a/mcs/Makefile
+++ b/mcs/Makefile
@@ -17,6 +17,7 @@ net_3_5_SUBDIRS := build class tools/xbuild
net_4_0_SUBDIRS := build class
net_4_5_SUBDIRS := build mcs class nunit24 ilasm tools tests errors docs
xbuild_12_SUBDIRS := build class tools/xbuild
+xbuild_14_SUBDIRS := build class tools/xbuild
# List of test subdirs that should pass 100%
centum_tests := \
@@ -87,7 +88,7 @@ dir-check:
# fun specialty targets
-PROFILES = net_2_0 net_3_5 net_4_0 net_4_5 xbuild_12
+PROFILES = net_2_0 net_3_5 net_4_0 net_4_5 xbuild_12 xbuild_14
.PHONY: all-profiles $(STD_TARGETS:=-profiles)
all-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
@@ -106,6 +107,7 @@ profiles-do--run-test:
# Orchestrate the bootstrap here.
_boot_ = all clean install
+$(_boot_:%=profile-do--xbuild_14--%): profile-do--xbuild_14--%: profile-do--net_4_5--%
$(_boot_:%=profile-do--xbuild_12--%): profile-do--xbuild_12--%: profile-do--net_4_5--%
$(_boot_:%=profile-do--net_4_5--%): profile-do--net_4_5--%: profile-do--build--%
$(_boot_:%=profile-do--net_4_0--%): profile-do--net_4_0--%: profile-do--build--%
diff --git a/mcs/build/Makefile b/mcs/build/Makefile
index ce026ae275f..34d857a65f5 100644
--- a/mcs/build/Makefile
+++ b/mcs/build/Makefile
@@ -22,7 +22,8 @@ PROFILES = \
net_3_5 \
net_4_0 \
net_4_5 \
- xbuild_12
+ xbuild_12 \
+ xbuild_14
COMMON_SRCS = \
Consts.cs.in \
diff --git a/mcs/build/profiles/xbuild_14.make b/mcs/build/profiles/xbuild_14.make
new file mode 100644
index 00000000000..cc55a1ded3b
--- /dev/null
+++ b/mcs/build/profiles/xbuild_14.make
@@ -0,0 +1,7 @@
+# -*- makefile -*-
+
+include $(topdir)/build/profiles/net_4_5.make
+
+PROFILE_MCS_FLAGS := $(PROFILE_MCS_FLAGS) -d:XBUILD_12 -d:XBUILD_14 -lib:$(topdir)/class/lib/net_4_5
+
+XBUILD_VERSION = 14.0
diff --git a/mcs/class/Makefile b/mcs/class/Makefile
index 3ab5668acc7..33a7dd8ae7b 100644
--- a/mcs/class/Makefile
+++ b/mcs/class/Makefile
@@ -242,6 +242,7 @@ net_3_5_SUBDIRS := $(xbuild_2_0_dirs)
net_4_0_SUBDIRS := $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(xbuild_4_0_dirs)
net_4_5_SUBDIRS := $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_5_dirs) $(xbuild_4_0_dirs) aot-compiler
xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
+xbuild_14_SUBDIRS := $(xbuild_4_0_dirs)
include ../build/rules.make
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/Consts.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/Consts.cs
index 8db3be70a9d..e17d6dc53e5 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/Consts.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/Consts.cs
@@ -39,7 +39,9 @@ public static class Consts {
public static string BinPath {
get {
if (RunningOnMono ()) {
-#if XBUILD_12
+#if XBUILD_14
+ string profile = "xbuild_14";
+#elif XBUILD_12
string profile = "xbuild_12";
#elif NET_4_5
string profile = "net_4_5";
@@ -54,7 +56,9 @@ public static class Consts {
var lib = Path.GetDirectoryName (Path.GetDirectoryName (corlib));
return Path.Combine (lib, profile);
} else {
-#if XBUILD_12
+#if XBUILD_14
+ return ToolLocationHelper.GetPathToBuildTools ("14.0");
+#elif XBUILD_12
return ToolLocationHelper.GetPathToBuildTools ("12.0");
#elif NET_4_5
return ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version45);
@@ -71,7 +75,9 @@ public static class Consts {
public static string ToolsVersionString {
get {
-#if XBUILD_12
+#if XBUILD_14
+ return " ToolsVersion='14.0'";
+#elif XBUILD_12
return " ToolsVersion='12.0'";
#elif NET_4_0
return " ToolsVersion='4.0'";
@@ -85,7 +91,9 @@ public static class Consts {
public static string GetTasksAsmPath ()
{
-#if XBUILD_12
+#if XBUILD_14
+ return Path.Combine (BinPath, "Microsoft.Build.Tasks.Core.dll");
+#elif XBUILD_12
return Path.Combine (BinPath, "Microsoft.Build.Tasks.v12.0.dll");
#elif NET_4_0
return Path.Combine (BinPath, "Microsoft.Build.Tasks.v4.0.dll");
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs
index 8b667ced1ba..0a894e7b0f6 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs
@@ -53,8 +53,13 @@ namespace Microsoft.Build.Utilities
#if XBUILD_12
Version451,
#endif
+#if XBUILD_14
+ Version453,
+#endif
-#if XBUILD_12
+#if XBUILD_14
+ VersionLatest = Version453
+#elif XBUILD_12
VersionLatest = Version451
#elif NET_4_5
VersionLatest = Version45
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs
index f3aa310c09b..736b8ad0c4a 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs
@@ -233,11 +233,20 @@ namespace Microsoft.Build.Utilities
public static string GetPathToBuildTools (string toolsVersion)
{
- if (toolsVersion != "12.0")
+ string path;
+ switch (toolsVersion) {
+ case "12.0":
+ path = "xbuild_12";
+ break;
+ case "14.0":
+ path = "xbuild_14";
+ break;
+ default:
return null;
+ }
if (Environment.GetEnvironmentVariable ("TESTING_MONO") != null)
- return Path.Combine (lib_mono_dir, "xbuild_12");
+ return Path.Combine (lib_mono_dir, path);
if (runningOnDotNet) {
//see http://msdn.microsoft.com/en-us/library/vstudio/bb397428(v=vs.120).aspx
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs
index 4170fa00253..11343933971 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs
@@ -264,6 +264,9 @@ namespace Microsoft.Build.Evaluation
#if XBUILD_12
AddToolset (new Toolset ("12.0", ToolLocationHelper.GetPathToBuildTools ("12.0"), this, null));
#endif
+#if XBUILD_14
+ AddToolset (new Toolset ("14.0", ToolLocationHelper.GetPathToBuildTools ("14.0"), this, null));
+#endif
default_tools_version = toolsets.First ().ToolsVersion;
}
diff --git a/mcs/tools/xbuild/Makefile b/mcs/tools/xbuild/Makefile
index 5e8dd82bd0a..05c24763cde 100644
--- a/mcs/tools/xbuild/Makefile
+++ b/mcs/tools/xbuild/Makefile
@@ -76,14 +76,17 @@ EXTRA_DISTFILES = \
data/3.5/Microsoft.Common.tasks \
data/4.0/Microsoft.Common.tasks \
data/12.0/Microsoft.Common.tasks \
+ data/14.0/Microsoft.Common.tasks \
data/2.0/Microsoft.Common.targets \
data/3.5/Microsoft.Common.targets \
data/4.0/Microsoft.Common.targets \
data/12.0/Microsoft.Common.targets \
+ data/14.0/Microsoft.Common.targets \
data/2.0/Microsoft.CSharp.targets \
data/3.5/Microsoft.CSharp.targets \
data/4.0/Microsoft.CSharp.targets \
data/12.0/Microsoft.CSharp.targets \
+ data/14.0/Microsoft.CSharp.targets \
data/Microsoft.VisualBasic.targets \
data/MSBuild/Microsoft.Build.CommonTypes.xsd \
data/MSBuild/Microsoft.Build.Core.xsd \
diff --git a/mcs/tools/xbuild/SolutionParser.cs b/mcs/tools/xbuild/SolutionParser.cs
index 47ae1d9c044..738ca70791c 100644
--- a/mcs/tools/xbuild/SolutionParser.cs
+++ b/mcs/tools/xbuild/SolutionParser.cs
@@ -121,7 +121,9 @@ namespace Mono.XBuild.CommandLine {
string slnVersion = GetSlnFileVersion (reader);
if (slnVersion == "12.00")
-#if XBUILD_12
+#if XBUILD_14
+ p.DefaultToolsVersion = "14.0";
+#elif XBUILD_12
p.DefaultToolsVersion = "12.0";
#else
p.DefaultToolsVersion = "4.0";
diff --git a/mcs/tools/xbuild/XBuildConsts.cs b/mcs/tools/xbuild/XBuildConsts.cs
index dec250204d2..5ea1279f034 100644
--- a/mcs/tools/xbuild/XBuildConsts.cs
+++ b/mcs/tools/xbuild/XBuildConsts.cs
@@ -1,6 +1,10 @@
-class XBuildConsts
+static class XBuildConsts
{
-#if XBUILD_12
+#if XBUILD_14
+ public const string Version = "14.0";
+ public const string AssemblyVersion = "14.0.0.0";
+ public const string FileVersion = "14.0.22310.1";
+#elif XBUILD_12
public const string Version = "12.0";
public const string AssemblyVersion = "12.0.0.0";
public const string FileVersion = "12.0.21005.1";
diff --git a/mcs/tools/xbuild/data/14.0/Microsoft.CSharp.targets b/mcs/tools/xbuild/data/14.0/Microsoft.CSharp.targets
new file mode 100644
index 00000000000..11b40d66a9b
--- /dev/null
+++ b/mcs/tools/xbuild/data/14.0/Microsoft.CSharp.targets
@@ -0,0 +1,142 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <DefaultLanguageSourceExtension>.cs</DefaultLanguageSourceExtension>
+ <Language>C#</Language>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <DebugSymbols Condition=" '$(DebugType)' == 'none' ">false</DebugSymbols>
+ <DebugType Condition=" '$(DebugType)' == 'none' "></DebugType>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <CreateManifestResourceNamesDependsOn></CreateManifestResourceNamesDependsOn>
+ <CoreCompileDependsOn></CoreCompileDependsOn>
+
+ <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildToolsPath)\Microsoft.CSharp.targets</MSBuildAllProjects>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <NoCompilerStandardLib Condition="'$(NoCompilerStandardLib)'==''">true</NoCompilerStandardLib>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <DocFileItem Include="$(DocumentationFile)" Condition="'$(DocumentationFile)' != ''"/>
+ </ItemGroup>
+
+ <Target Name="_AddCorlibReference" DependsOnTargets="GetReferenceAssemblyPaths">
+ <!--
+ HACK: We don't yet support property functions, so can't calculate FrameworkPathOverride
+ by calling ToolLocationHelper.GetPathToStandardLibraries. Instead, we search the framework
+ directories for mscorlib.dll by constructing a filtered item set, and assume it only has
+ one item.
+ -->
+ <ItemGroup Condition="'$(MonoUseMicrosoftBuildDll)' != 'True'">
+ <_ExplicitReference Include="@(_TargetFrameworkDirectories->'%(FullPath)\mscorlib.dll')" Condition="Exists('%(FullPath)\mscorlib.dll')">
+ <Private>false</Private>
+ </_ExplicitReference>
+ </ItemGroup>
+ <PropertyGroup Condition="'$(MonoUseMicrosoftBuildDll)' == 'True'">
+ <_ExplicitMSCorlibPath>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries ('$(TargetFrameworkIdentifier)', '$(TargetFrameworkVersion)', '$(TargetFrameworkProfile)'))\mscorlib.dll</_ExplicitMSCorlibPath>
+ </PropertyGroup>
+ <ItemGroup Condition="'$(MonoUseMicrosoftBuildDll)' == 'True'">
+ <_ExplicitReference Include="@(_TargetFrameworkDirectories->'%(FullPath)\mscorlib.dll')" Condition="Exists('%(FullPath)\mscorlib.dll')">
+ <Private>false</Private>
+ </_ExplicitReference>
+ </ItemGroup>
+ <ItemGroup Condition="'$(MonoUseMicrosoftBuildDll)' == 'True'">
+ <_ExplicitReference Include="$(_ExplicitMSCorlibPath)" Condition="Exists('$(_ExplicitMSCorlibPath)')">
+ <Private>false</Private>
+ </_ExplicitReference>
+ </ItemGroup>
+ </Target>
+
+ <Target
+ Name="CoreCompile"
+ Inputs="$(MSBuildAllProjects);@(Compile);@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile);
+ $(KeyOriginatorFile);@(ReferencePath);$(Win32Icon);$(Win32Resource)"
+ Outputs="@(DocFileItem);@(IntermediateAssembly)"
+ DependsOnTargets="$(CoreCompileDependsOn)"
+ >
+ <Csc
+ AdditionalLibPaths="$(AdditionalLibPaths)"
+ AddModules="@(AddModules)"
+ AllowUnsafeBlocks="$(AllowUnsafeBlocks)"
+ BaseAddress="$(BaseAddress)"
+ CheckForOverflowUnderflow="$(CheckForOverflowUnderflow)"
+ CodePage="$(CodePage)"
+ DebugType="$(DebugType)"
+ DefineConstants="$(DefineConstants)"
+ DelaySign="$(DelaySign)"
+ DisabledWarnings="$(NoWarn)"
+ DocumentationFile="@(DocFileItem)"
+ EmitDebugInformation="$(DebugSymbols)"
+ ErrorReport="$(ErrorReport)"
+ FileAlignment="$(FileAlignment)"
+ GenerateFullPaths="$(GenerateFullPaths)"
+ KeyContainer="$(KeyContainerName)"
+ KeyFile="$(KeyOriginatorFile)"
+ LangVersion="$(LangVersion)"
+ MainEntryPoint="$(StartupObject)"
+ ModuleAssemblyName="$(ModuleAssemblyName)"
+ NoConfig="true"
+ NoLogo="$(NoLogo)"
+ NoStandardLib="$(NoCompilerStandardLib)"
+ Optimize="$(Optimize)"
+ OutputAssembly="@(IntermediateAssembly)"
+ PdbFile="$(PdbFile)"
+ Platform="$(PlatformTarget)"
+ References="@(ReferencePath)"
+ ResponseFiles="$(CompilerResponseFile)"
+ Sources="@(Compile)"
+ TargetType="$(OutputType)"
+ TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
+ UseHostCompilerIfAvailable="$(UseHostCompilerIfAvailable)"
+ Utf8Output="$(Utf8Output)"
+ WarningLevel="$(WarningLevel)"
+ WarningsAsErrors="$(WarningsAsErrors)"
+ WarningsNotAsErrors="$(WarningsNotAsErrors)"
+ Win32Icon="$(Win32Icon)"
+ Win32Resource="$(Win32Resource)"
+ Resources="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)"
+ ToolExe="$(CscToolExe)"
+ ToolPath="$(CscToolPath)" />
+
+ </Target>
+
+ <Target Name="CreateManifestResourceNames">
+ <CreateCSharpManifestResourceName Condition="'@(ResxWithNoCulture)' != ''"
+ ResourceFiles="@(ResxWithNoCulture)" RootNamespace="$(RootNamespace)">
+ <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestResourceWithNoCultureName" />
+ </CreateCSharpManifestResourceName>
+
+ <CreateCSharpManifestResourceName Condition="'@(NonResxWithNoCulture)' != ''"
+ ResourceFiles="@(NonResxWithNoCulture)" RootNamespace="$(RootNamespace)">
+ <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestNonResxWithNoCulture" />
+ </CreateCSharpManifestResourceName>
+
+ <CreateCSharpManifestResourceName Condition="'@(ResxWithCulture)' != ''"
+ ResourceFiles="@(ResxWithCulture)" RootNamespace="$(RootNamespace)">
+ <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestResourceWithCultureName" />
+ </CreateCSharpManifestResourceName>
+
+ <CreateCSharpManifestResourceName Condition="'@(NonResxWithCulture)' != ''"
+ ResourceFiles="@(NonResxWithCulture)" RootNamespace="$(RootNamespace)">
+ <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestNonResxWithCulture" />
+ </CreateCSharpManifestResourceName>
+ </Target>
+
+ <Import Project="Microsoft.Common.targets" />
+
+ <PropertyGroup Condition="'$(NoCompilerStandardLib)'=='true' and '$(NoStdLib)'!='true'">
+ <ResolveAssemblyReferencesDependsOn>$(ResolveAssemblyReferencesDependsOn);_AddCorlibReference</ResolveAssemblyReferencesDependsOn>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <TargetFrameworkMonikerAssemblyAttributeText Condition="'$(TargetFrameworkMoniker)' != '' and '$(TargetingClr2Framework)' != 'true'">
+// &lt;autogenerated /&gt;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(&quot;$(TargetFrameworkMoniker)&quot;, FrameworkDisplayName = &quot;$(TargetFrameworkMonikerDisplayName)&quot;)]
+ </TargetFrameworkMonikerAssemblyAttributeText>
+ </PropertyGroup>
+
+</Project>
diff --git a/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets b/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets
new file mode 100644
index 00000000000..d420c093660
--- /dev/null
+++ b/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets
@@ -0,0 +1,922 @@
+<Project DefaultTargets="Build" InitialTargets="_ValidateEssentialProperties" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ImportByWildcardBeforeMicrosoftCommonTargets Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == ''">true</ImportByWildcardBeforeMicrosoftCommonTargets>
+ <ImportByWildcardAfterMicrosoftCommonTargets Condition="'$(ImportByWildcardAfterMicrosoftCommonTargets)' == ''">true</ImportByWildcardAfterMicrosoftCommonTargets>
+ </PropertyGroup>
+
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportBefore\*"
+ Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == 'true' and Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportBefore')"/>
+
+ <Import Project="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')"/>
+
+ <PropertyGroup>
+ <OutputType Condition="'$(OutputType)' == ''">Exe</OutputType>
+ <TargetExt Condition="'$(OutputType)' == 'Winexe'">.exe</TargetExt>
+ <TargetExt Condition="'$(OutputType)' == 'Exe'">.exe</TargetExt>
+ <TargetExt Condition="'$(OutputType)' == 'Library'">.dll</TargetExt>
+ <TargetExt Condition="'$(OutputType)' == 'Netmodule'">.netmodule</TargetExt>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <ProjectDir Condition="'$(ProjectDir)' == ''">$(MSBuildProjectDirectory)\</ProjectDir>
+ </PropertyGroup>
+
+ <!-- MSBuild defines this even outside of VS, and F# projects depend on it -->
+ <PropertyGroup>
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <AssemblyName Condition="'$(AssemblyName)' == ''">$(MSBuildProjectName)</AssemblyName>
+ <OutputPath Condition="'$(OutputPath)' != '' and !HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath>
+ <OutputPath Condition=" '$(Platform)'=='' and '$(Configuration)'=='' and '$(OutputPath)'=='' ">bin\Debug\</OutputPath>
+ <WarningLevel Condition="'$(WarningLevel)' == ''" >2</WarningLevel>
+
+ <TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETFramework</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v4.0</TargetFrameworkVersion>
+
+ <TargetFrameworkMoniker Condition="'$(TargetFrameworkMoniker)' == '' and '$(TargetFrameworkProfile)' != ''">$(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion),Profile=$(TargetFrameworkProfile)</TargetFrameworkMoniker>
+ <TargetFrameworkMoniker Condition="'$(TargetFrameworkMoniker)' == ''">$(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion)</TargetFrameworkMoniker>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <OutDir Condition="'$(OutDir)' == ''">$(OutputPath)</OutDir>
+ <OutDir Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')">$(OutDir)\</OutDir>
+
+ <_OriginalConfiguration>$(Configuration)</_OriginalConfiguration>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <ConfigurationName Condition="'$(ConfigurationName)' == ''">$(Configuration)</ConfigurationName>
+
+ <_OriginalPlatform>$(Platform)</_OriginalPlatform>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
+
+ <AddAdditionalExplicitAssemblyReferences Condition="'$(AddAdditionalExplicitAssemblyReferences)' == ''">true</AddAdditionalExplicitAssemblyReferences>
+ <AdditionalExplicitAssemblyReferences Condition="'$(AddAdditionalExplicitAssemblyReferences)' == 'true' and '$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.0'">System.Core;$(AdditionalExplicitAssemblyReferences)</AdditionalExplicitAssemblyReferences>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <SkipCopyUnchangedFiles Condition="'$(SkipCopyUnchangedFiles)' == ''">true</SkipCopyUnchangedFiles>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">obj\</BaseIntermediateOutputPath>
+ <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath>
+ <CleanFile Condition="'$(CleanFile)'==''">$(MSBuildProjectFile).FilesWrittenAbsolute.txt</CleanFile>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(IntermediateOutputPath)' == ''">
+ <IntermediateOutputPath Condition=" '$(PlatformName)' == 'AnyCPU'">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
+ <IntermediateOutputPath Condition=" '$(PlatformName)' != 'AnyCPU'">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')">$(IntermediateOutputPath)\</IntermediateOutputPath>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <IntermediateAssembly Include="$(IntermediateOutputPath)$(AssemblyName)$(TargetExt)" />
+
+ <!-- creating this as a item to use FullPath on it, to build TargetPath -->
+ <_OutDirItem Include="$(OutDir)"/>
+ </ItemGroup>
+
+ <PropertyGroup>
+ <TargetName Condition="'$(TargetName)' == '' ">$(AssemblyName)</TargetName>
+ <TargetFileName Condition="'$(TargetFileName)' == '' ">$(TargetName)$(TargetExt)</TargetFileName>
+ <TargetDir Condition=" '$(TargetDir)' == '' ">@(_OutDirItem->'%(FullPath)')</TargetDir>
+ <TargetPath Condition=" '$(TargetPath)' == '' ">@(_OutDirItem->'%(FullPath)\$(TargetFileName)')</TargetPath>
+ <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildProjectFullPath);$(MSBuildToolsPath)\Microsoft.Common.targets</MSBuildAllProjects>
+ <KeyOriginatorFile Condition=" '$(SignAssembly)' == 'true' ">$(AssemblyOriginatorKeyFile)</KeyOriginatorFile>
+ <TargetingClr2Framework Condition="('$(TargetFrameworkIdentifier)' == '.NETFramework') and ('$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5')">true</TargetingClr2Framework>
+ </PropertyGroup>
+
+ <Target Name="_ValidateEssentialProperties">
+ <Error Condition=" '$(OutputPath)' == '' and '$(SkipInvalidConfigurations)' != 'true'"
+ Text="'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: $(_OriginalConfiguration) Platform: $(_OriginalPlatform)."/>
+
+ <Warning Condition=" '$(OutputPath)' == '' and '$(SkipInvalidConfigurations)' == 'true'"
+ Text="'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: $(_OriginalConfiguration) Platform: $(_OriginalPlatform)."/>
+
+ <!-- If OutDir is specified via the command line, then the earlier check
+ to add a trailing slash won't have any affect, so error here. -->
+ <Error
+ Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')"
+ Text="OutDir property must end with a slash."/>
+ </Target>
+
+ <Target Name="PrepareForBuild">
+ <Message Importance="High" Text="Configuration: $(Configuration) Platform: $(Platform)"/>
+
+ <!-- Look for app.config, if $(AppConfig) is specified, then use that. Else look in
+ @(None) and @(Content) -->
+ <CreateItem Include="$(AppConfig)" Condition="'$(AppConfig)' != ''"
+ AdditionalMetadata="TargetPath=$(TargetFileName).config">
+ <Output TaskParameter="Include" ItemName="AppConfigWithTargetPath" />
+ </CreateItem>
+
+ <FindAppConfigFile PrimaryList="@(None)" SecondaryList="@(Content)" TargetPath="$(TargetFileName).config"
+ Condition="'$(AppConfig)' == ''">
+ <Output TaskParameter="AppConfigFile" ItemName="AppConfigWithTargetPath"/>
+ </FindAppConfigFile>
+
+ <MakeDir
+ Directories="$(OutDir);$(IntermediateOutputPath);@(DocFileItem->'%(RelativeDir)')"
+ />
+ </Target>
+
+ <PropertyGroup>
+ <GetFrameworkPathsDependsOn />
+ </PropertyGroup>
+ <Target Name="GetFrameworkPaths"
+ Condition="'$(TargetFrameworkIdentifier)' == '' or '$(TargetFrameworkIdentifier)' == '.NETFramework'"
+ DependsOnTargets="$(GetFrameworkPathsDependsOn)">
+ <GetFrameworkPath>
+ <Output Condition="'$(TargetFrameworkVersion)' == 'v4.5' and '$(TargetFrameworkVersion)' == 'v4.5.1'"
+ TaskParameter="FrameworkVersion45Path"
+ ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
+ <Output Condition="'$(TargetFrameworkVersion)' == 'v4.0'"
+ TaskParameter="FrameworkVersion40Path"
+ ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
+ <Output Condition="'$(TargetFrameworkVersion)' == 'v3.5'"
+ TaskParameter="FrameworkVersion35Path"
+ ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
+ <Output Condition="'$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'"
+ TaskParameter="FrameworkVersion30Path"
+ ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
+ <Output Condition="'$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'"
+ TaskParameter="FrameworkVersion20Path"
+ ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
+ </GetFrameworkPath>
+ <CreateProperty Value="@(_CombinedTargetFrameworkDirectoriesItem)">
+ <Output TaskParameter="Value" PropertyName="TargetFrameworkDirectory"/>
+ </CreateProperty>
+
+ <Warning Text="TargetFrameworkVersion '$(TargetFrameworkVersion)' not supported by this toolset (ToolsVersion: $(MSBuildToolsVersion))."
+ Condition="'$(TargetFrameworkVersion)' != 'v4.5.1' and '$(TargetFrameworkVersion)' != 'v4.5' and '$(TargetFrameworkVersion)' != 'v4.0' and '$(TargetFrameworkVersion)' != 'v3.5' and '$(TargetFrameworkVersion)' != 'v3.0' and '$(TargetFrameworkVersion)' != 'v2.0'"/>
+ </Target>
+
+ <PropertyGroup>
+ <GetReferenceAssemblyPathsDependsOn />
+ </PropertyGroup>
+ <Target Name="GetReferenceAssemblyPaths" DependsOnTargets="$(GetReferenceAssemblyPathsDependsOn)">
+ <!-- in case of .NETFramework, $(TargetFrameworkDirectory) would have been set by
+ GetFrameworkPaths, if it hasn't been changed, then clear it, to avoid duplicates -->
+ <CreateProperty Value="" Condition="'@(_CombinedTargetFrameworkDirectoriesItem)' == '$(TargetFrameworkDirectory)'">
+ <Output TaskParameter="Value" PropertyName="TargetFrameworkDirectory"/>
+ </CreateProperty>
+
+ <GetReferenceAssemblyPaths
+ Condition="'$(TargetFrameworkMoniker)' != '' and '$(_TargetFrameworkDirectories)' == ''"
+ TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
+ RootPath="$(TargetFrameworkRootPath)">
+
+ <Output TaskParameter="ReferenceAssemblyPaths" PropertyName="_TargetFrameworkDirectories"/>
+ <Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="_FullFrameworkReferenceAssemblyPaths"/>
+ <Output TaskParameter="TargetFrameworkMonikerDisplayName" PropertyName="TargetFrameworkMonikerDisplayName"/>
+ </GetReferenceAssemblyPaths>
+
+
+ <!-- Remove duplicates. -->
+ <ItemGroup>
+ <_TargetFrameworkDirectories Include="$(_TargetFrameworkDirectories);$(TargetFrameworkDirectory)" KeepDuplicates="false" />
+ </ItemGroup>
+ <PropertyGroup>
+ <TargetFrameworkDirectory>@(_TargetFrameworkDirectories)</TargetFrameworkDirectory>
+ </PropertyGroup>
+
+ <ItemGroup Condition="'$(ImplicitlyExpandDesignTimeFacades)' == 'true'">
+ <DesignTimeFacadeDirectoryRoots Include="$(TargetFrameworkDirectory)" />
+ <DesignTimeFacadeDirectories Include="%(DesignTimeFacadeDirectoryRoots.Identity)\Facades\" Condition="Exists('%(DesignTimeFacadeDirectoryRoots.Identity)\Facades\')" />
+ <_DesignTimeFacadeAssemblies Include="%(DesignTimeFacadeDirectories.Identity)\*.dll"/>
+ </ItemGroup>
+
+ <PropertyGroup Condition="'@(DesignTimeFacadeDirectories)' != ''">
+ <TargetFrameworkDirectory>$(TargetFrameworkDirectory);@(DesignTimeFacadeDirectories)</TargetFrameworkDirectory>
+ </PropertyGroup>
+
+ </Target>
+
+ <PropertyGroup>
+ <AllowedReferenceAssemblyFileExtensions Condition=" '$(AllowedReferenceAssemblyFileExtensions)' == '' ">
+ .exe;
+ .dll
+ </AllowedReferenceAssemblyFileExtensions>
+
+ <AllowedReferenceRelatedFileExtensions Condition=" '$(AllowedReferenceRelatedFileExtensions)' == '' ">
+ .exe.mdb;
+ .dll.mdb;
+ .xml
+ </AllowedReferenceRelatedFileExtensions>
+
+ <AssemblySearchPaths Condition="'$(AssemblySearchPaths)' == ''">
+ {CandidateAssemblyFiles};
+ $(ReferencePath);
+ @(AdditionalReferencePath);
+ {HintPathFromItem};
+ {TargetFrameworkDirectory};
+ {PkgConfig};
+ {GAC};
+ {RawFileName};
+ $(OutDir)
+ </AssemblySearchPaths>
+
+ <ResolveReferencesDependsOn>
+ BeforeResolveReferences;
+ ResolveProjectReferences;
+ ResolveAssemblyReferences;
+ AfterResolveReferences
+ </ResolveReferencesDependsOn>
+
+ <ResolveAssemblyReferencesDependsOn>
+ GetFrameworkPaths;
+ GetReferenceAssemblyPaths;
+ PrepareForBuild
+ </ResolveAssemblyReferencesDependsOn>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(TargetFrameworkMoniker)' != ''">
+ <TargetFrameworkMonikerAssemblyAttributesPath Condition="'$(TargetFrameworkMonikerAssemblyAttributesPath)' == ''">$(IntermediateOutputPath)$(TargetFrameworkMoniker).AssemblyAttribute$(DefaultLanguageSourceExtension)</TargetFrameworkMonikerAssemblyAttributesPath>
+ <GenerateTargetFrameworkAttribute Condition="'$(GenerateTargetFrameworkAttribute)' == '' and '$(TargetFrameworkMoniker)'
+ != '' and '$(TargetingClr2Framework)' != 'true'">true</GenerateTargetFrameworkAttribute>
+ </PropertyGroup>
+
+ <ItemGroup Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
+ <FileWrites Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" />
+ </ItemGroup>
+
+ <Target Name="GenerateTargetFrameworkMonikerAttribute"
+ DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths"
+ Inputs="$(MSBuildToolsPath)\Microsoft.Common.targets"
+ Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)"
+ Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
+
+ <WriteLinesToFile
+ File="$(TargetFrameworkMonikerAssemblyAttributesPath)"
+ Lines="$(TargetFrameworkMonikerAssemblyAttributeText)"
+ Overwrite="true"
+ ContinueOnError="true"
+ Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''"
+ />
+
+ <ItemGroup Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''">
+ <Compile Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/>
+ </ItemGroup>
+ </Target>
+
+ <Target Name="ResolveReferences" DependsOnTargets="$(ResolveReferencesDependsOn)"/>
+
+ <Target Name="BeforeResolveReferences" />
+ <Target Name="AfterResolveReferences" />
+
+ <Target Name="ResolveAssemblyReferences" DependsOnTargets="$(ResolveAssemblyReferencesDependsOn)">
+ <CreateItem Include="@(Reference)" Exclude="$(AdditionalExplicitAssemblyReferences)">
+ <Output TaskParameter="Include" ItemName="_Reference"/>
+ </CreateItem>
+
+ <CreateItem Include="$(AdditionalExplicitAssemblyReferences)">
+ <Output TaskParameter="Include" ItemName="_Reference"/>
+ </CreateItem>
+
+ <ResolveAssemblyReference
+ Assemblies="@(_Reference)"
+ AssemblyFiles="@(ChildProjectReferences);@(_ExplicitReference)"
+ SearchPaths="$(AssemblySearchPaths)"
+ CandidateAssemblyFiles="@(Content);@(None)"
+ TargetFrameworkDirectories="$(TargetFrameworkDirectory)"
+ AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)"
+ AllowedRelatedFileExtensions="$(AllowedReferenceRelatedFileExtensions)"
+ FindDependencies="true"
+ FindSatellites="true"
+ FindRelatedFiles="true"
+ TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
+ TargetFrameworkMonikerDisplayName="$(TargetFrameworkMonikerDisplayName)"
+ TargetFrameworkVersion="$(TargetFrameworkVersion)"
+ >
+ <Output TaskParameter="ResolvedFiles" ItemName="ResolvedFiles"/>
+ <Output TaskParameter="ResolvedFiles" ItemName="ReferencePath"/>
+ <Output TaskParameter="ResolvedDependencyFiles" ItemName="ReferenceDependencyPaths"/>
+ <Output TaskParameter="RelatedFiles" ItemName="_ReferenceRelatedPaths"/>
+ <Output TaskParameter="SatelliteFiles" ItemName="ReferenceSatellitePaths"/>
+ <Output TaskParameter="CopyLocalFiles" ItemName="ReferenceCopyLocalPaths"/>
+
+ <!-- FIXME: backwards compatibility -->
+ <Output TaskParameter="ResolvedDependencyFiles" ItemName="_ResolvedDependencyFiles"/>
+ </ResolveAssemblyReference>
+ </Target>
+
+ <Target
+ Name="AssignProjectConfiguration"
+ Condition="'@(ProjectReference)' != ''">
+
+ <!-- assign configs if building a solution file -->
+ <AssignProjectConfiguration
+ ProjectReferences = "@(ProjectReference)"
+ SolutionConfigurationContents = "$(CurrentSolutionConfigurationContents)"
+ Condition="'$(BuildingSolutionFile)' == 'true'">
+
+ <Output TaskParameter = "AssignedProjects" ItemName = "ProjectReferenceWithConfiguration"/>
+ </AssignProjectConfiguration>
+
+ <!-- Else, just -->
+ <CreateItem Include="@(ProjectReference)" Condition="'$(BuildingSolutionFile)' != 'true'">
+ <Output TaskParameter="Include" ItemName="ProjectReferenceWithConfiguration"/>
+ </CreateItem>
+
+ </Target>
+
+ <!-- Split projects into 2 lists
+ ProjectReferenceWithConfigurationExistent: Projects existent on disk
+ ProjectReferenceWithConfigurationNonExistent: Projects non-existent on disk -->
+
+ <Target Name="SplitProjectReferencesByExistent"
+ DependsOnTargets="AssignProjectConfiguration">
+
+ <CreateItem Include="@(ProjectReferenceWithConfiguration)" Condition="'@(ProjectReferenceWithConfiguration)' != ''">
+ <Output TaskParameter="Include" ItemName="ProjectReferenceWithConfigurationExistent"
+ Condition="Exists ('%(ProjectReferenceWithConfiguration.Identity)')"/>
+
+ <Output TaskParameter="Include" ItemName="ProjectReferenceWithConfigurationNonExistent"
+ Condition="!Exists ('%(ProjectReferenceWithConfiguration.Identity)')"/>
+ </CreateItem>
+ </Target>
+
+ <Target
+ Name="ResolveProjectReferences"
+ DependsOnTargets="SplitProjectReferencesByExistent"
+ >
+ <!-- If building from a .sln.proj or from IDE, then referenced projects have already
+ been built, so just get the target paths -->
+ <MSBuild
+ Projects="@(ProjectReferenceWithConfigurationExistent)"
+ Targets="GetTargetPath"
+ Properties="%(ProjectReferenceWithConfigurationExistent.SetConfiguration); %(ProjectReferenceWithConfigurationExistent.SetPlatform)"
+ Condition="'@(ProjectReferenceWithConfigurationExistent)' != '' and ('$(BuildingSolutionFile)' == 'true' or '$(BuildingInsideVisualStudio)' == 'true')">
+
+ <Output TaskParameter="TargetOutputs" ItemName="ChildProjectReferences" Condition="'%(ProjectReferenceWithConfigurationExistent.ReferenceOutputAssembly)' != 'false'"/>
+ </MSBuild>
+
+ <!-- Building a project directly, build the referenced the projects also -->
+ <MSBuild
+ Projects="@(ProjectReferenceWithConfigurationExistent)"
+ Properties="%(ProjectReferenceWithConfigurationExistent.SetConfiguration); %(ProjectReferenceWithConfigurationExistent.SetPlatform)"
+ Condition="'@(ProjectReferenceWithConfigurationExistent)' != '' and '$(BuildingSolutionFile)' != 'true' and '$(BuildingInsideVisualStudio)' != 'true' ">
+
+ <Output TaskParameter="TargetOutputs" ItemName="ChildProjectReferences" Condition="'%(ProjectReferenceWithConfigurationExistent.ReferenceOutputAssembly)' != 'false'"/>
+ </MSBuild>
+
+ <Warning Text="Referenced Project %(ProjectReferenceWithConfigurationNonExistent.Identity) not found, ignoring."
+ Condition="'@(ProjectReferenceWithConfigurationNonExistent)' != ''"/>
+ </Target>
+
+ <Target Name = "CopyFilesMarkedCopyLocal">
+ <Copy
+ SourceFiles="@(ReferenceCopyLocalPaths)"
+ DestinationFiles="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')"
+ SkipUnchangedFiles="$(SkipCopyUnchangedFiles)">
+ <Output TaskParameter = "DestinationFiles" ItemName = "FileWritesShareable"/>
+ </Copy>
+ </Target>
+
+ <Target Name="_ComputeNonExistentFileProperty" Condition='false'>
+ <CreateProperty Value="__NonExistentSubDir__\__NonExistentFile__">
+ <Output TaskParameter="Value" PropertyName="NonExistentFile"/>
+ </CreateProperty>
+ </Target>
+
+ <PropertyGroup>
+ <BuildDependsOn>
+ BuildOnlySettings;
+ BeforeBuild;
+ CoreBuild;
+ AfterBuild
+ </BuildDependsOn>
+ </PropertyGroup>
+
+ <Target Name="BuildOnlySettings"/>
+ <Target Name="BeforeBuild"/>
+ <Target Name="AfterBuild"/>
+
+ <Target Name="Build" DependsOnTargets="$(BuildDependsOn)" Outputs="$(TargetPath)"/>
+
+ <PropertyGroup>
+ <CoreBuildDependsOn>
+ PrepareForBuild;
+ GetFrameworkPaths;
+ GetReferenceAssemblyPaths;
+ PreBuildEvent;
+ ResolveReferences;
+ CopyFilesMarkedCopyLocal;
+ PrepareResources;
+ Compile;
+ PrepareForRun;
+ DeployOutputFiles;
+ _RecordCleanFile;
+ PostBuildEvent
+ </CoreBuildDependsOn>
+ </PropertyGroup>
+
+ <Target
+ Name="CoreBuild"
+ DependsOnTargets="$(CoreBuildDependsOn)"
+ Outputs="$(OutDir)$(AssemblyName)$(TargetExt)">
+
+ <OnError ExecuteTargets="_TimestampAfterCompile;PostBuildEvent"
+ Condition=" '$(RunPostBuildEvent)' == 'Always' or '$(RunPostBuildEvent)' == 'OnOutputUpdated'"/>
+
+ <OnError ExecuteTargets="_RecordCleanFile" />
+ </Target>
+
+ <PropertyGroup>
+ <CompileDependsOn>
+ ResolveReferences;
+ GenerateTargetFrameworkMonikerAttribute;
+ BeforeCompile;
+ _TimestampBeforeCompile;
+ CoreCompile;
+ _TimestampAfterCompile;
+ AfterCompile
+ </CompileDependsOn>
+ </PropertyGroup>
+
+ <Target Name="BeforeCompile" />
+ <Target Name="AfterCompile" />
+
+ <Target Name="Compile" DependsOnTargets="$(CompileDependsOn)"/>
+
+ <PropertyGroup>
+ <PrepareForRunDependsOn>
+ DeployOutputFiles
+ </PrepareForRunDependsOn>
+ </PropertyGroup>
+ <Target Name="PrepareForRun" DependsOnTargets="$(PrepareForRunDependsOn)"/>
+
+ <PropertyGroup>
+ <PrepareResourcesDependsOn>
+ AssignTargetPaths;
+ SplitResourcesByCulture;
+ CreateManifestResourceNames;
+ CopyNonResxEmbeddedResources;
+ GenerateResources;
+ GenerateSatelliteAssemblies;
+ CompileLicxFiles
+ </PrepareResourcesDependsOn>
+ </PropertyGroup>
+ <Target Name="PrepareResources" DependsOnTargets="$(PrepareResourcesDependsOn)" />
+
+ <Target Name="SplitResourcesByCulture" DependsOnTargets="AssignTargetPaths">
+ <!-- Extract .licx files into @(LicxFiles) -->
+ <CreateItem Include="@(EmbeddedResourceWithTargetPath)" Condition="'%(Extension)' == '.licx'">
+ <Output TaskParameter="Include" ItemName="LicxFiles"/>
+ </CreateItem>
+
+ <!-- Split *remaining* resource files into various groups.. -->
+ <AssignCulture Files="@(EmbeddedResourceWithTargetPath)" Condition="'%(Extension)' != '.licx'">
+ <Output TaskParameter="AssignedFilesWithNoCulture" ItemName="ResourcesWithNoCulture"/>
+ <Output TaskParameter="AssignedFilesWithCulture" ItemName="ResourcesWithCulture"/>
+ </AssignCulture>
+
+ <CreateItem Include="@(ResourcesWithNoCulture)" Condition="'%(Extension)' == '.resx'">
+ <Output TaskParameter="Include" ItemName="ResxWithNoCulture"/>
+ </CreateItem>
+
+ <CreateItem Include="@(ResourcesWithNoCulture)" Condition="'%(Extension)' != '.resx'">
+ <Output TaskParameter="Include" ItemName="NonResxWithNoCulture"/>
+ </CreateItem>
+
+ <CreateItem Include="@(ResourcesWithCulture)" Condition="'%(Extension)' == '.resx'">
+ <Output TaskParameter="Include" ItemName="ResxWithCulture"/>
+ </CreateItem>
+
+ <CreateItem Include="@(ResourcesWithCulture)" Condition="'%(Extension)' != '.resx'">
+ <Output TaskParameter="Include" ItemName="NonResxWithCulture"/>
+ </CreateItem>
+ </Target>
+
+ <!-- Copy non-resx resources to their manifest resource names, this is what the compiler expects -->
+ <Target Name = "CopyNonResxEmbeddedResources"
+ Condition = "'@(NonResxWithCulture)' != '' or '@(NonResxWithNoCulture)' != '' or '@(ManifestNonResxWithCulture)' != '' or '@(ManifestNonResxWithNoCulture)' != ''">
+
+ <MakeDir Directories="$(IntermediateOutputPath)%(ManifestNonResxWithCulture.Culture)"/>
+ <Copy SourceFiles = "@(NonResxWithCulture)"
+ DestinationFiles = "@(ManifestNonResxWithCulture->'$(IntermediateOutputPath)%(Identity)')"
+ SkipUnchangedFiles="$(SkipCopyUnchangedFiles)">
+ <Output TaskParameter = "DestinationFiles" ItemName = "ManifestNonResxWithCultureOnDisk"/>
+ <Output TaskParameter = "DestinationFiles" ItemName = "FileWrites"/>
+ </Copy>
+
+ <Copy SourceFiles = "@(NonResxWithNoCulture)"
+ DestinationFiles = "@(ManifestNonResxWithNoCulture->'$(IntermediateOutputPath)%(Identity)')"
+ SkipUnchangedFiles="$(SkipCopyUnchangedFiles)">
+ <Output TaskParameter = "DestinationFiles" ItemName = "ManifestNonResxWithNoCultureOnDisk"/>
+ <Output TaskParameter = "DestinationFiles" ItemName = "FileWrites"/>
+ </Copy>
+ </Target>
+
+ <Target Name = "GenerateResources">
+ <GenerateResource
+ Sources = "@(ResxWithNoCulture)"
+ UseSourcePath = "true"
+ OutputResources = "@(ManifestResourceWithNoCultureName->'$(IntermediateOutputPath)%(Identity).resources')"
+ Condition = "'@(ResxWithNoCulture)' != '' ">
+
+ <Output TaskParameter = "OutputResources" ItemName = "ManifestResourceWithNoCulture"/>
+ <Output TaskParameter = "FilesWritten" ItemName = "FileWrites"/>
+ </GenerateResource>
+
+ <GenerateResource
+ Sources = "@(ResxWithCulture)"
+ UseSourcePath = "true"
+ OutputResources = "@(ManifestResourceWithCultureName->'$(IntermediateOutputPath)%(Identity).resources')"
+ Condition = "'@(ResxWithCulture)' != '' ">
+
+ <Output TaskParameter = "OutputResources" ItemName = "ManifestResourceWithCulture"/>
+ <Output TaskParameter = "FilesWritten" ItemName = "FileWrites"/>
+ </GenerateResource>
+ </Target>
+
+ <Target Name="GenerateSatelliteAssemblies"
+ Inputs="@(ManifestResourceWithCulture);@(ManifestNonResxWithCultureOnDisk)"
+ Outputs="$(IntermediateOutputPath)%(Culture)\$(AssemblyName).resources.dll" >
+ <!-- @(NonResxWithCulture) - rename files to ManifestNon.. and then use for AL -->
+ <MakeDir Directories = "$(IntermediateOutputPath)%(ManifestResourceWithCulture.Culture)" Condition = "'@(ManifestResourceWithCulture)' != ''" />
+ <MakeDir Directories = "$(IntermediateOutputPath)%(ManifestNonResxWithCultureOnDisk.Culture)" Condition = "'@(ManifestNonResxWithCultureOnDisk)' != ''" />
+
+ <AL
+ Culture = "%(Culture)"
+ DelaySign="$(DelaySign)"
+ EmbedResources = "@(ManifestResourceWithCulture);@(ManifestNonResxWithCultureOnDisk)"
+ KeyFile="$(KeyOriginatorFile)"
+ ToolExe="$(AlToolExe)"
+ ToolPath="$(AlToolPath)"
+ OutputAssembly = "$(IntermediateOutputPath)%(Culture)\$(AssemblyName).resources.dll" >
+ <Output TaskParameter="OutputAssembly" ItemName="FileWrites"/>
+ </AL>
+
+
+ <CreateItem
+ Include = "$(IntermediateOutputPath)%(Culture)\$(AssemblyName).resources.dll"
+ AdditionalMetadata = "Culture=%(Culture)"
+ Condition = "'@(ManifestResourceWithCulture)' != '' or '@(ManifestNonResxWithCultureOnDisk)' != ''">
+ <Output TaskParameter = "Include" ItemName = "IntermediateSatelliteAssemblies" />
+ </CreateItem>
+ </Target>
+
+ <PropertyGroup>
+ <CompileLicxFilesDependsOn></CompileLicxFilesDependsOn>
+ </PropertyGroup>
+
+ <Target Name = "CompileLicxFiles"
+ Condition = "'@(LicxFiles)' != ''"
+ DependsOnTargets = "$(CompileLicxFilesDependsOn)"
+ Outputs = "$(IntermediateOutputPath)$(TargetFileName).licenses">
+ <LC
+ Sources = "@(LicxFiles)"
+ LicenseTarget = "$(TargetFileName)"
+ OutputDirectory = "$(IntermediateOutputPath)"
+ OutputLicense = "$(IntermediateOutputPath)$(TargetFileName).licenses"
+ ReferencedAssemblies = "@(ReferencePath);@(ReferenceDependencyPaths)"
+ ToolPath = "$(LCToolPath)"
+ ToolExe = "$(LCToolExe)">
+
+ <Output TaskParameter="OutputLicense" ItemName="CompiledLicenseFile"/>
+ <Output TaskParameter="OutputLicense" ItemName="FileWrites"/>
+ </LC>
+ </Target>
+
+ <!-- Assign target paths to files that will need to be copied along with the project -->
+ <Target Name = "AssignTargetPaths">
+ <AssignTargetPath Files="@(None)" RootFolder="$(MSBuildProjectDirectory)">
+ <Output TaskParameter="AssignedFiles" ItemName="NoneWithTargetPath"/>
+ </AssignTargetPath>
+
+ <AssignTargetPath Files="@(Content)" RootFolder="$(MSBuildProjectDirectory)">
+ <Output TaskParameter="AssignedFiles" ItemName="ContentWithTargetPath"/>
+ </AssignTargetPath>
+
+ <AssignTargetPath Files="@(EmbeddedResource)" RootFolder="$(MSBuildProjectDirectory)">
+ <Output TaskParameter="AssignedFiles" ItemName="EmbeddedResourceWithTargetPath"/>
+ </AssignTargetPath>
+ </Target>
+
+ <Target Name="DeployOutputFiles"
+ DependsOnTargets="PrepareResources;CoreCompile;_CopyDeployFilesToOutputDirectory;_CopyAppConfigFile">
+
+ <Copy
+ SourceFiles="$(IntermediateOutputPath)$(AssemblyName)$(TargetExt).mdb"
+ Condition="'$(OutDir)' != '' and Exists('$(IntermediateOutputPath)$(AssemblyName)$(TargetExt).mdb')"
+ DestinationFolder="$(OutDir)"
+ SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" >
+ <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
+ </Copy>
+
+ <Copy SourceFiles="@(IntermediateAssembly)" Condition="'$(OutDir)' != '' and Exists ('@(IntermediateAssembly)')" DestinationFolder="$(OutDir)" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)">
+ <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
+ </Copy>
+
+ <Copy
+ SourceFiles = "@(IntermediateSatelliteAssemblies)"
+ DestinationFiles = "@(IntermediateSatelliteAssemblies->'$(OutDir)\%(Culture)\$(AssemblyName).resources.dll')"
+ Condition = "'@(IntermediateSatelliteAssemblies)' != ''"
+ SkipUnchangedFiles="$(SkipCopyUnchangedFiles)">
+ <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
+ </Copy>
+ </Target>
+
+ <Target Name="_CopyDeployFilesToOutputDirectory"
+ DependsOnTargets="GetCopyToOutputDirectoryItems;
+ _CopyDeployFilesToOutputDirectoryAlways;
+ _CopyDeployFilesToOutputDirectoryPreserveNewest"/>
+
+ <Target Name="_CopyDeployFilesToOutputDirectoryPreserveNewest"
+ Condition="'@(ItemsToCopyToOutputDirectoryPreserveNewest)' != ''"
+ Inputs="@(ItemsToCopyToOutputDirectoryPreserveNewest)"
+ Outputs="@(ItemsToCopyToOutputDirectoryPreserveNewest->'$(OutDir)%(TargetPath)')">
+
+ <Copy SourceFiles="@(ItemsToCopyToOutputDirectoryPreserveNewest)"
+ DestinationFiles="@(ItemsToCopyToOutputDirectoryPreserveNewest->'$(OutDir)%(TargetPath)')"
+ SkipUnchangedFiles="$(SkipCopyUnchangedFiles)">
+ <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
+ </Copy>
+ </Target>
+
+ <!-- Copy if newer -->
+ <Target Name="_CopyDeployFilesToOutputDirectoryAlways"
+ Condition="'@(ItemsToCopyToOutputDirectoryAlways)' != ''">
+
+ <Copy SourceFiles="@(ItemsToCopyToOutputDirectoryAlways)"
+ DestinationFiles="@(ItemsToCopyToOutputDirectoryAlways->'$(OutDir)%(TargetPath)')">
+ <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
+ </Copy>
+ </Target>
+
+
+ <Target Name="_CopyAppConfigFile" Condition="'@(AppConfigWithTargetPath)' != ''"
+ Inputs="@(AppConfigWithTargetPath)"
+ Outputs="@(AppConfigWithTargetPath->'$(OutDir)%(TargetPath)')">
+
+ <Copy SourceFiles="@(AppConfigWithTargetPath)"
+ DestinationFiles="@(AppConfigWithTargetPath->'$(OutDir)%(TargetPath)')">
+ <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
+ </Copy>
+ </Target>
+
+ <Target Name="GetTargetPath" Outputs="$(TargetPath)"/>
+
+ <Target Name="GetCopyToOutputDirectoryItems"
+ Outputs="@(AllItemsFullPathWithTargetPath)"
+ DependsOnTargets="AssignTargetPaths;SplitProjectReferencesByExistent">
+
+ <!-- FIXME: handle .vcproj
+ FIXME: Private ProjectReferences are honored only in 3.5
+ -->
+ <MSBuild
+ Projects="@(ProjectReferenceWithConfigurationExistent)"
+ Targets="GetCopyToOutputDirectoryItems"
+ Condition="'@(ProjectReferenceWithConfigurationExistent)' != '' and '%(ProjectReferenceWithConfigurationExistent.Private)' != 'false'">
+
+ <Output TaskParameter="TargetOutputs" ItemName="AllChildProjectItemsWithTargetPath"/>
+ </MSBuild>
+
+ <!-- Process items from child project. The outputs need to have full path
+ as they'll be used from other projects -->
+
+ <CreateItem
+ Include="@(AllChildProjectItemsWithTargetPath->'%(FullPath)')"
+ Condition="'%(AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)' == 'Always' or '%(AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)' == 'PreserveNewest'">
+
+ <Output TaskParameter="Include" ItemName="AllItemsFullPathWithTargetPath"/>
+ <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryAlways"
+ Condition="'%(AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
+ <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryPreserveNewest"
+ Condition="'%(AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
+
+ </CreateItem>
+
+ <!-- Process _this_ project's items -->
+
+ <CreateItem
+ Include="@(NoneWithTargetPath->'%(FullPath)')"
+ Condition="'%(NoneWithTargetPath.CopyToOutputDirectory)' == 'Always' or '%(NoneWithTargetPath.CopyToOutputDirectory)' == 'PreserveNewest'">
+ <Output TaskParameter="Include" ItemName="AllItemsFullPathWithTargetPath"/>
+ <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryAlways"
+ Condition="'%(NoneWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
+ <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryPreserveNewest"
+ Condition="'%(NoneWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
+ </CreateItem>
+
+ <CreateItem
+ Include="@(ContentWithTargetPath->'%(FullPath)')"
+ Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)' == 'Always' or '%(ContentWithTargetPath.CopyToOutputDirectory)' == 'PreserveNewest'">
+ <Output TaskParameter="Include" ItemName="AllItemsFullPathWithTargetPath"/>
+ <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryAlways"
+ Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
+ <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryPreserveNewest"
+ Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
+ </CreateItem>
+
+ <CreateItem
+ Include="@(EmbeddedResourceWithTargetPath->'%(FullPath)')"
+ Condition="'%(EmbeddedResourceWithTargetPath.CopyToOutputDirectory)' == 'Always' or '%(EmbeddedResourceWithTargetPath.CopyToOutputDirectory)' == 'PreserveNewest'">
+ <Output TaskParameter="Include" ItemName="AllItemsFullPathWithTargetPath"/>
+ <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryAlways"
+ Condition="'%(EmbeddedResourceWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
+ <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryPreserveNewest"
+ Condition="'%(EmbeddedResourceWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
+ </CreateItem>
+
+ </Target>
+
+ <!-- Pre/Post BuildEvents -->
+ <PropertyGroup>
+ <PreBuildEventDependsOn />
+ </PropertyGroup>
+
+ <Target Name="PreBuildEvent"
+ Condition="'$(PreBuildEvent)' != ''"
+ DependsOnTargets="$(PreBuildEventDependsOn)">
+
+ <Exec WorkingDirectory="$(OutDir)" Command="$(PreBuildEvent)" />
+ </Target>
+
+ <!-- PostBuildEvent depends on $(RunPostBuildEvent)
+
+ Default: OnBuildSuccess
+ OnBuildSuccess: Run after a successful build
+ OnOutputUpdated: Run only if the output assembly got updates
+ Always: Run always
+ -->
+ <PropertyGroup>
+ <PostBuildEventDependsOn />
+ </PropertyGroup>
+
+ <!-- this gets invoked in two cases, from CoreBuildDependsOn, if the build completes
+ successfully, OR from OnError in CoreBuild, if the build failed and $(RunPostBuildEvent)
+ is 'Always' or 'OnOutputUpdated'. Invoke $(PostBuildEvent) if its either Empty (== OnBuildSuccess)
+ or OnBuildSuccess or Always OR (OnOutputUpdated and output assembly got updated) -->
+ <Target Name="PostBuildEvent"
+ Condition="'$(PostBuildEvent)' != '' and
+ ('$(RunPostBuildEvent)' != 'OnOutputUpdated' or
+ '$(_AssemblyModifiedTimeBeforeCompile)' != '$(_AssemblyModifiedTimeAfterCompile)')"
+ DependsOnTargets="$(PostBuildEventDependsOn)">
+
+ <Exec WorkingDirectory="$(OutDir)" Command="$(PostBuildEvent)" />
+ </Target>
+
+ <!-- Timestamp the output assemblies, required for PostBuildEvent -->
+ <Target Name="_TimestampBeforeCompile" Condition="'$(RunPostBuildEvent)' == 'OnOutputUpdated'">
+ <CreateItem Include="%(IntermediateAssembly.ModifiedTime)">
+ <Output TaskParameter="Include" PropertyName="_AssemblyModifiedTimeBeforeCompile" />
+ </CreateItem>
+ </Target>
+ <Target Name="_TimestampAfterCompile" Condition="'$(RunPostBuildEvent)' == 'OnOutputUpdated'">
+ <CreateItem Include="%(IntermediateAssembly.ModifiedTime)">
+ <Output TaskParameter="Include" PropertyName="_AssemblyModifiedTimeAfterCompile" />
+ </CreateItem>
+ </Target>
+
+ <!-- Rebuild -->
+ <PropertyGroup>
+ <RebuildDependsOn>
+ BeforeRebuild;
+ Clean;
+ $(MSBuildProjectDefaultTargets);
+ AfterRebuild;
+ </RebuildDependsOn>
+
+ <RebuildDependsOn Condition="'$(MSBuildProjectDefaultTargets)' == 'Rebuild'">
+ BeforeRebuild;
+ Clean;
+ Build;
+ AfterRebuild;
+ </RebuildDependsOn>
+ </PropertyGroup>
+
+ <Target Name="BeforeRebuild" />
+ <Target Name="AfterRebuild" />
+
+ <Target Name="Rebuild"
+ DependsOnTargets="$(RebuildDependsOn)"
+ Outputs="$(TargetPath)"/>
+
+ <!-- Clean -->
+ <Target Name="_RecordCleanFile"
+ DependsOnTargets="_GetCompileOutputsForClean">
+
+ <!-- add to list of previous writes for this platform/config -->
+
+ <ReadLinesFromFile File="$(IntermediateOutputPath)$(CleanFile)">
+ <Output TaskParameter="Lines" ItemName="PreviousFileWrites"/>
+ </ReadLinesFromFile>
+
+ <!-- CopyLocal files: In case all the projects build to common output
+ directory, then other projects might depend on some of these
+ CopyLocal files, so delete only the ones under *this* project
+ directory -->
+ <FindUnderPath Path="$(MSBuildProjectDirectory)" Files="@(FileWritesShareable)">
+ <Output TaskParameter="InPath" ItemName="FileWrites"/>
+ </FindUnderPath>
+
+ <RemoveDuplicates Inputs="@(PreviousFileWrites);@(FileWrites->'%(FullPath)')">
+ <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
+ </RemoveDuplicates>
+
+ <WriteLinesToFile
+ File="$(IntermediateOutputPath)$(CleanFile)"
+ Lines="@(CombinedFileWrites)"
+ Overwrite="true"/>
+ </Target>
+
+ <PropertyGroup>
+ <CleanDependsOn>
+ BeforeClean;
+ CleanReferencedProjects;
+ CoreClean;
+ AfterClean
+ </CleanDependsOn>
+ </PropertyGroup>
+
+ <Target Name="_GetCompileOutputsForClean">
+ <!-- assembly and debug file in the *intermediate output path* -->
+ <CreateItem Include="@(IntermediateAssembly)" Condition="Exists('@(IntermediateAssembly)')">
+ <Output TaskParameter="Include" ItemName="FileWrites"/>
+ </CreateItem>
+
+ <CreateItem Include="$(IntermediateOutputPath)$(AssemblyName)$(TargetExt).mdb"
+ Condition="Exists('$(IntermediateOutputPath)$(AssemblyName)$(TargetExt).mdb')">
+ <Output TaskParameter="Include" ItemName="FileWrites"/>
+ </CreateItem>
+ </Target>
+
+ <!-- Get the list of files written, for clean -->
+ <Target Name="_GetCleanFileWrites"
+ DependsOnTargets="_GetCompileOutputsForClean">
+ <ReadLinesFromFile File="$(IntermediateOutputPath)$(CleanFile)">
+ <Output TaskParameter="Lines" ItemName="PreviousFileWrites"/>
+ </ReadLinesFromFile>
+ </Target>
+
+ <Target Name="CleanReferencedProjects"
+ DependsOnTargets="AssignProjectConfiguration">
+
+ <!-- If building from .sln.proj or from IDE, clean will get handled by them,
+ else we are building a project directly, from the command line, so
+ clean the referenced projects -->
+ <MSBuild Projects="@(ProjectReferenceWithConfigurationExistent)"
+ Targets="Clean"
+ Condition=" '$(BuildingSolutionFile)' != 'true' and '$(BuildingInsideVisualStudio)' != 'true' and '@(ProjectReferenceWithConfigurationExistent)' != ''" />
+
+ </Target>
+
+ <Target Name="Clean" DependsOnTargets="$(CleanDependsOn)"/>
+
+ <!-- Override in project to run before/after clean tasks -->
+ <Target Name="BeforeClean" />
+ <Target Name="AfterClean" />
+
+ <Target Name="CoreClean" DependsOnTargets="_GetCleanFileWrites">
+ <Delete Files="@(PreviousFileWrites);@(FileWrites)" TreatErrorsAsWarnings="true"/>
+
+ <!-- all previous files written for this platform/config have been deleted,
+ we can safely remove the file list now -->
+ <Delete Files="$(IntermediateOutputPath)$(CleanFile)" TreatErrorsAsWarnings="true" />
+ </Target>
+
+ <PropertyGroup>
+ <ImplicitlyExpandDesignTimeFacades>true</ImplicitlyExpandDesignTimeFacades>
+
+ <ResolveReferencesDependsOn>
+ $(ResolveReferencesDependsOn);
+ ImplicitlyExpandDesignTimeFacades
+ </ResolveReferencesDependsOn>
+
+ <ImplicitlyExpandDesignTimeFacadesDependsOn>
+ $(ImplicitlyExpandDesignTimeFacadesDependsOn);
+ GetReferenceAssemblyPaths
+ </ImplicitlyExpandDesignTimeFacadesDependsOn>
+ </PropertyGroup>
+
+ <Target Name="ImplicitlyExpandDesignTimeFacades" Condition="'$(ImplicitlyExpandDesignTimeFacades)' == 'true'" DependsOnTargets="$(ImplicitlyExpandDesignTimeFacadesDependsOn)">
+
+ <PropertyGroup>
+ <_HasReferenceToSystemRuntime Condition="'%(_ResolvedDependencyFiles.Filename)' == 'System.Runtime'">true</_HasReferenceToSystemRuntime>
+ </PropertyGroup>
+
+ <ItemGroup Condition="'$(_HasReferenceToSystemRuntime)' == 'true'">
+ <!-- If the user has manually referenced these assemblies, remove them so we don't end up with duplicates -->
+ <ReferencePath Remove="@(_DesignTimeFacadeAssemblies)"/>
+ <ReferencePath Include="%(_DesignTimeFacadeAssemblies.Identity)">
+ <WinMDFile>false</WinMDFile>
+ <CopyLocal>false</CopyLocal>
+ <ResolvedFrom>ImplicitlyExpandDesignTimeFacades</ResolvedFrom>
+ </ReferencePath>
+ <_ResolveAssemblyReferenceResolvedFiles Include="@(ReferencePath)" Condition="'%(ReferencePath.ResolvedFrom)' == 'ImplicitlyExpandDesignTimeFacades'" />
+ </ItemGroup>
+
+ <Message Importance="Low" Text="Including @(ReferencePath)" Condition="'%(ReferencePath.ResolvedFrom)' == 'ImplicitlyExpandDesignTimeFacades'" />
+
+ </Target>
+
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportAfter\*"
+ Condition="'$(ImportByWildcardAfterMicrosoftCommonTargets)' == 'true' and Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportAfter')"/>
+</Project>
diff --git a/mcs/tools/xbuild/data/14.0/Microsoft.Common.tasks b/mcs/tools/xbuild/data/14.0/Microsoft.Common.tasks
new file mode 100644
index 00000000000..b5cede2e448
--- /dev/null
+++ b/mcs/tools/xbuild/data/14.0/Microsoft.Common.tasks
@@ -0,0 +1,37 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
+ <UsingTask TaskName="Microsoft.Build.Tasks.AL" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.AssignTargetPath" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.AssignCulture" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.AssignProjectConfiguration" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.CallTarget" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.CombinePath" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.Copy" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.CreateCSharpManifestResourceName" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
+ <UsingTask TaskName="Microsoft.Build.Tasks.CreateItem" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.CreateProperty" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.Csc" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.Delete" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.Error" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.Exec" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.FindAppConfigFile" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.FindUnderPath" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.GenerateResource" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.GetAssemblyIdentity" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.GetFrameworkPath" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.GetFrameworkSdkPath" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.GetReferenceAssemblyPaths" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.LC" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.MakeDir" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.Message" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.MSBuild" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.ReadLinesFromFile" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.RemoveDir" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.RemoveDuplicates" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.ResolveAssemblyReference" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.SignFile" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.Touch" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.Vbc" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.Warning" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <UsingTask TaskName="Microsoft.Build.Tasks.WriteCodeFragment" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
+ <UsingTask TaskName="Microsoft.Build.Tasks.WriteLinesToFile" AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+</Project>
diff --git a/mcs/tools/xbuild/xbuild.make b/mcs/tools/xbuild/xbuild.make
index 7cb5065f2d0..e17dcb2b453 100644
--- a/mcs/tools/xbuild/xbuild.make
+++ b/mcs/tools/xbuild/xbuild.make
@@ -2,6 +2,10 @@ ifneq (2.0, $(XBUILD_VERSION))
NAME_SUFFIX = .v$(XBUILD_VERSION)
endif
+ifeq (14.0, $(XBUILD_VERSION))
+NAME_SUFFIX = .Core
+endif
+
XBUILD_FRAMEWORK := $(topdir)/class/lib/$(PROFILE)/Microsoft.Build.Framework.dll
XBUILD_ENGINE := $(topdir)/class/lib/$(PROFILE)/Microsoft.Build.Engine.dll
XBUILD_UTILITIES := $(topdir)/class/lib/$(PROFILE)/Microsoft.Build.Utilities$(NAME_SUFFIX).dll
diff --git a/mcs/tools/xbuild/xbuild_test.make b/mcs/tools/xbuild/xbuild_test.make
index bddc59c6c21..033cf4fede9 100644
--- a/mcs/tools/xbuild/xbuild_test.make
+++ b/mcs/tools/xbuild/xbuild_test.make
@@ -29,6 +29,7 @@ XBUILD_2_0_PROFILE_DIR=$(topdir)/class/lib/net_2_0
XBUILD_3_5_PROFILE_DIR=$(topdir)/class/lib/net_3_5
XBUILD_4_0_PROFILE_DIR=$(topdir)/class/lib/net_4_5
XBUILD_12_0_PROFILE_DIR=$(topdir)/class/lib/xbuild_12
+XBUILD_14_0_PROFILE_DIR=$(topdir)/class/lib/xbuild_14
copy-targets-2.0:
cp $(XBUILD_DATA_DIR)/2.0/Microsoft.Common.targets $(XBUILD_2_0_PROFILE_DIR)
@@ -54,6 +55,12 @@ copy-targets-12.0:
cp $(XBUILD_DATA_DIR)/12.0/Microsoft.CSharp.targets $(XBUILD_12_0_PROFILE_DIR)
cp $(XBUILD_DATA_DIR)/Microsoft.VisualBasic.targets $(XBUILD_12_0_PROFILE_DIR)
+copy-targets-14.0:
+ cp $(XBUILD_DATA_DIR)/14.0/Microsoft.Common.targets $(XBUILD_14_0_PROFILE_DIR)
+ cp $(XBUILD_DATA_DIR)/14.0/Microsoft.Common.tasks $(XBUILD_14_0_PROFILE_DIR)
+ cp $(XBUILD_DATA_DIR)/14.0/Microsoft.CSharp.targets $(XBUILD_14_0_PROFILE_DIR)
+ cp $(XBUILD_DATA_DIR)/Microsoft.VisualBasic.targets $(XBUILD_14_0_PROFILE_DIR)
+
clean-targets-2.0:
rm -f $(XBUILD_2_0_PROFILE_DIR)/Microsoft.Common.targets
rm -f $(XBUILD_2_0_PROFILE_DIR)/Microsoft.Common.tasks
@@ -78,6 +85,12 @@ clean-targets-12.0:
rm -f $(XBUILD_12_0_PROFILE_DIR)/Microsoft.CSharp.targets
rm -f $(XBUILD_12_0_PROFILE_DIR)/Microsoft.VisualBasic.targets
+clean-targets-14.0:
+ rm -f $(XBUILD_14_0_PROFILE_DIR)/Microsoft.Common.targets
+ rm -f $(XBUILD_14_0_PROFILE_DIR)/Microsoft.Common.tasks
+ rm -f $(XBUILD_14_0_PROFILE_DIR)/Microsoft.CSharp.targets
+ rm -f $(XBUILD_14_0_PROFILE_DIR)/Microsoft.VisualBasic.targets
+
#allow tests to find older versions of libs and targets
ifneq (2.0, $(XBUILD_VERSION))
TEST_MONO_PATH := $(topdir)/class/lib/net_2_0
diff --git a/runtime/Makefile.am b/runtime/Makefile.am
index ca34a6f396f..7e5a019b823 100644
--- a/runtime/Makefile.am
+++ b/runtime/Makefile.am
@@ -44,7 +44,7 @@ al_profile = net_4_0
endif
if INSTALL_4_5
-build_profiles += net_4_5 xbuild_12
+build_profiles += net_4_5 xbuild_12 xbuild_14
al_profile = net_4_5
endif
@@ -138,6 +138,8 @@ mcs-compileall: mono-wrapper etc/mono/config
MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
elif [ "xbuild_12" = "$$profile" ]; then \
MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_4_5$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
+ elif [ "xbuild_14" = "$$profile" ]; then \
+ MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_4_5$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
else \
MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
fi; \