<OutputPath Condition="'$(OutputPath)' != '' and !HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath>
<OutputPath Condition=" '$(Platform)'=='' and '$(Configuration)'=='' and '$(OutputPath)'=='' ">bin\Debug\</OutputPath>
<WarningLevel Condition="'$(WarningLevel)' == ''" >2</WarningLevel>
- <TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v2.0</TargetFrameworkVersion>
+
+ <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>
<_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>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">obj\</BaseIntermediateOutputPath>
+ <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath>
<CleanFile Condition="'$(CleanFile)'==''">$(MSBuildProjectFile).FilesWrittenAbsolute.txt</CleanFile>
</PropertyGroup>
<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)" />
<PropertyGroup>
<TargetName Condition="'$(TargetName)' == '' ">$(AssemblyName)</TargetName>
<TargetFileName Condition="'$(TargetFileName)' == '' ">$(TargetName)$(TargetExt)</TargetFileName>
- <TargetPath>@(_OutDirItem->'%(FullPath)\$(TargetFileName)')</TargetPath>
-
+ <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>
</PropertyGroup>
</FindAppConfigFile>
<MakeDir
- Directories="$(OutDir);$(IntermediateOutputPath)"
+ Directories="$(OutDir);$(IntermediateOutputPath);@(DocFileItem->'%(RelativeDir)')"
/>
</Target>
- <Target Name="GetFrameworkPaths">
+ <PropertyGroup>
+ <GetFrameworkPathsDependsOn />
+ </PropertyGroup>
+ <Target Name="GetFrameworkPaths"
+ Condition="'$(TargetFrameworkIdentifier)' == '' or '$(TargetFrameworkIdentifier)' == '.NETFramework'"
+ DependsOnTargets="$(GetFrameworkPathsDependsOn)">
<GetFrameworkPath>
<Output Condition="'$(TargetFrameworkVersion)' == 'v4.0'"
TaskParameter="FrameworkVersion40Path"
- ItemName="TargetFrameworkDirectories"/>
+ ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
<Output Condition="'$(TargetFrameworkVersion)' == 'v3.5'"
TaskParameter="FrameworkVersion35Path"
- ItemName="TargetFrameworkDirectories"/>
+ ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
<Output Condition="'$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'"
TaskParameter="FrameworkVersion30Path"
- ItemName="TargetFrameworkDirectories"/>
+ ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
<Output Condition="'$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'"
TaskParameter="FrameworkVersion20Path"
- ItemName="TargetFrameworkDirectories"/>
+ 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.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)' != ''"
+ TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
+ RootPath="$(TargetFrameworkRootPath)">
+
+ <Output TaskParameter="ReferenceAssemblyPaths" PropertyName="_TargetFrameworkDirectories"/>
+ <Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="_FullFrameworkReferenceAssemblyPaths"/>
+ <Output TaskParameter="TargetFrameworkMonikerDisplayName" PropertyName="TargetFrameworkMonikerDisplayName"/>
+ </GetReferenceAssemblyPaths>
+
+ <CreateProperty Value="$(_TargetFrameworkDirectories);$(TargetFrameworkDirectory)">
+ <Output TaskParameter="Value" PropertyName="TargetFrameworkDirectory"/>
+ </CreateProperty>
+ </Target>
+
<PropertyGroup>
<AllowedReferenceAssemblyFileExtensions Condition=" '$(AllowedReferenceAssemblyFileExtensions)' == '' ">
.exe;
<AssemblySearchPaths Condition="'$(AssemblySearchPaths)' == ''">
{CandidateAssemblyFiles};
+ $(ReferencePath);
{HintPathFromItem};
{TargetFrameworkDirectory};
{PkgConfig};
ResolveAssemblyReferences;
AfterResolveReferences
</ResolveReferencesDependsOn>
+
+ <ResolveAssemblyReferencesDependsOn>
+ GetFrameworkPaths;
+ GetReferenceAssemblyPaths;
+ PrepareForBuild
+ </ResolveAssemblyReferencesDependsOn>
</PropertyGroup>
<Target Name="ResolveReferences" DependsOnTargets="$(ResolveReferencesDependsOn)"/>
<Target Name="BeforeResolveReferences" />
<Target Name="AfterResolveReferences" />
- <Target Name="ResolveAssemblyReferences">
+ <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)"
+ Assemblies="@(_Reference)"
AssemblyFiles="@(ChildProjectReferences)"
SearchPaths="$(AssemblySearchPaths)"
CandidateAssemblyFiles="@(Content);@(None)"
- TargetFrameworkDirectories="@(TargetFrameworkDirectories)"
+ 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"/>
SourceFiles="@(ReferenceCopyLocalPaths)"
DestinationFiles="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')"
SkipUnchangedFiles="true">
- <Output TaskParameter = "DestinationFiles" ItemName = "FileWrites"/>
+ <Output TaskParameter = "DestinationFiles" ItemName = "FileWritesShareable"/>
</Copy>
</Target>
<CoreBuildDependsOn>
PrepareForBuild;
GetFrameworkPaths;
+ GetReferenceAssemblyPaths;
PreBuildEvent;
ResolveReferences;
CopyFilesMarkedCopyLocal;
<Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
</RemoveDuplicates>
+ <!-- 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>
+
<WriteLinesToFile
File="$(IntermediateOutputPath)$(CleanFile)"
Lines="@(CombinedFileWrites)"