Skip to content

Commit

Permalink
[mono] Build tasks: S.Collections.Immutable, S.Reflection.Metadata
Browse files Browse the repository at this point in the history
Instead of referencing the assemblies from Roslyn which can differ from
what msbuild uses, use a PackageReference with the same versions as rest
of msbuild.

This fixes a warning:

`/Users/ankit/dev/msbuild/artifacts/Release-MONO/bootstrap/net471/MSBuild/15.0/Bin/Microsoft.Common.CurrentVersion.targets(2130,5): warning MSB3277: Found conflicts between different versions of "System.Collections.Immutable" that could not be resolved. These reference conflicts a re listed in the build log when log verbosity is set to detailed. [/Users/ankit/dev/msbuild/mono/tasks/build.csproj]`
  • Loading branch information
radical committed Aug 3, 2018
1 parent 2455f14 commit c346796
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
3 changes: 2 additions & 1 deletion mono/targets/MSBuild.Bootstrap.Mono.targets
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
<Target Name="BuildMonoTasks" AfterTargets="Bootstrap" Condition="'$(TargetFramework)' != ''">
<MSBuild
Projects="$(RepoRoot)\mono\tasks\build.csproj"
Properties="OutputPath=$(OutputPath);OutDir=$(OutDir);TargetFramework=$(TargetFramework);MonoBuild=true" />
Properties="OutputPath=$(OutputPath);OutDir=$(OutDir);TargetFramework=$(TargetFramework);MonoBuild=true"
Targets="Restore;Build" />

<!-- Copy to the MSBuildExtensionsPath for bootstrap -->
<Copy
Expand Down
13 changes: 5 additions & 8 deletions mono/tasks/build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
</PropertyGroup>

<ItemGroup>
<Import Project="..\..\build\Versions.props" />
<ItemGroup>
<Compile Include="FilterDeniedAssemblies.cs" />

<Reference Include="Microsoft.Build.Framework" HintPath="$(OutDir)\Microsoft.Build.Framework.dll" />
<Reference Include="Microsoft.Build.Utilities.Core" HintPath="$(OutDir)\Microsoft.Build.Utilities.Core.dll" />

<Reference Include="System.Reflection.Metadata">
<HintPath>$(OutDir)\Roslyn\System.Reflection.Metadata.dll</HintPath>
</Reference>
<Reference Include="System.Collections.Immutable">
<HintPath>$(OutDir)\Roslyn\System.Collections.Immutable.dll</HintPath>
</Reference>
</ItemGroup>
<PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataVersion)" />
<PackageReference Include="System.Collections.Immutable" Version="$(SystemCollectionsImmutableVersion)" />
</ItemGroup>

<Target Name="Test" />

Expand Down

0 comments on commit c346796

Please sign in to comment.