Update dotnet/sdk to 2.0.0-preview2-006497
[platform/core/dotnet/build-tools.git] / dotnet / sdk / 2.0.0-preview2-006497 / Microsoft / Microsoft.NET.Build.Extensions / Microsoft.NET.Build.Extensions.ConflictResolution.targets
1 <!--\r
2 ***********************************************************************************************\r
3 Microsoft.NET.Build.Extensions.ConflictResolution.targets\r
4 \r
5 WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have\r
6           created a backup copy.  Incorrect changes to this file will make it\r
7           impossible to load or build your projects from the command-line or the IDE.\r
8 \r
9 Copyright (c) .NET Foundation. All rights reserved. \r
10 ***********************************************************************************************\r
11 -->\r
12 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
13 \r
14   <PropertyGroup>\r
15     <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>\r
16   </PropertyGroup>\r
17 \r
18   <PropertyGroup Condition="'$(DisableHandlePackageFileConflicts)' != 'true'">\r
19     <!-- Non-SDK using project.json or PackageReference, run after references are read from the lock/assets file -->\r
20     <_HandlePackageFileConflictsAfter>ResolveNuGetPackageAssets</_HandlePackageFileConflictsAfter>\r
21     \r
22     <!-- In case ResolveNuGetPackageAssets is not run (eg: packages.config), ensure we run before targets that consume references -->\r
23     <_HandlePackageFileConflictsBefore>ResolveAssemblyReferences</_HandlePackageFileConflictsBefore>\r
24   </PropertyGroup>\r
25 \r
26   <UsingTask TaskName="ResolvePackageFileConflicts" AssemblyFile="$(MicrosoftNETBuildExtensionsTasksAssembly)" />\r
27   <Target Name="_HandlePackageFileConflicts" \r
28           BeforeTargets="$(_HandlePackageFileConflictsBefore)"\r
29           AfterTargets="$(_HandlePackageFileConflictsAfter)">\r
30     <ResolvePackageFileConflicts References="@(Reference)"\r
31                                  ReferenceCopyLocalPaths="@(ReferenceCopyLocalPaths)"\r
32                                  PlatformManifests="@(PackageConflictPlatformManifests)"\r
33                                  PreferredPackages="$(PackageConflictPreferredPackages)">\r
34       <Output TaskParameter="ReferencesWithoutConflicts" ItemName="_ReferencesWithoutConflicts" />\r
35       <Output TaskParameter="ReferenceCopyLocalPathsWithoutConflicts" ItemName="_ReferenceCopyLocalPathsWithoutConflicts" />\r
36       <Output TaskParameter="Conflicts" ItemName="_ConflictPackageFiles" />\r
37     </ResolvePackageFileConflicts>\r
38 \r
39     <!-- Replace Reference / ReferenceCopyLocalPaths with the filtered lists.\r
40          We must remove all and include rather than just remove since removal is based\r
41          only on ItemSpec and duplicate ItemSpecs may exist with different metadata \r
42          (eg: HintPath) -->\r
43     <ItemGroup>\r
44       <Reference Remove="@(Reference)" />\r
45       <Reference Include="@(_ReferencesWithoutConflicts)" />\r
46       <ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" />\r
47       <ReferenceCopyLocalPaths Include="@(_ReferenceCopyLocalPathsWithoutConflicts)" />\r
48     </ItemGroup>\r
49   </Target>\r
50 </Project>\r