Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Remove Microsoft.CSharp.Core.targets workaround
Browse files Browse the repository at this point in the history
UseBuildTools used to be true all the time. Now that we are building
wrappers on core, UseBuildTools becomes false. However, the rest of
the runtest.proj expects to build using buildtools, so we keep
UseBuildTools true until we switch to arcade.

The CSharpCoreTargetsPath was imported when running on core only. This
used to happen only on unix, but now it also happens when building
runtest.proj for the xunit wrappers on windows. On unix, this targets
file was a symlink to itself to work around some buildtools logic that
expected the file to exist. This workaround no longer appears
necessary, and on windows, this was never used in the first place, so
this change removes it.
  • Loading branch information
sbomer committed Jul 6, 2018
1 parent 3657aea commit 3fb996c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
7 changes: 0 additions & 7 deletions build-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,6 @@ generate_layout()
# Make sure to copy over the pulled down packages
cp -r $__BinDir/* $CORE_ROOT/ > /dev/null

# Work hardcoded path around
if [ ! -f "${__BuildToolsDir}/Microsoft.CSharp.Core.Targets" ]; then
ln -s "${__BuildToolsDir}/Microsoft.CSharp.Core.targets" "${__BuildToolsDir}/Microsoft.CSharp.Core.Targets"
fi
if [ ! -f "${__BuildToolsDir}/Microsoft.CSharp.targets" ]; then
ln -s "${__BuildToolsDir}/Microsoft.CSharp.Targets" "${__BuildToolsDir}/Microsoft.CSharp.targets"
fi
}

build_Tests()
Expand Down
2 changes: 0 additions & 2 deletions tests/dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
<BuildToolsTargets45>$(BuildToolsTargetsDesktop)</BuildToolsTargets45>
<RunningOnUnix Condition="('$(RunningOnUnix)' == '') And ('$(MSBuildRuntimeType)' == 'Core') And ('$(OS)'!='Windows_NT')">true</RunningOnUnix>
<UseBuildTools>true</UseBuildTools>
<UseBuildTools Condition="'$(OS)'=='Windows_NT' And '$(RunningOnCore)' == 'true'">false</UseBuildTools>
</PropertyGroup>

<!-- Common repo directories -->
Expand All @@ -47,7 +46,6 @@
<DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli\</DotnetCliPath>
<BuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true'">$(ToolsDir)net46\</BuildToolsTaskDir>
<OverrideToolHost Condition="'$(OS)' != 'Windows_NT'">$(DotnetCliPath)dotnet</OverrideToolHost>
<CSharpCoreTargetsPath Condition="('$(BuildToolsTargetsDesktop)' != 'true') And ('$(UseBuildTools)'=='true')">$(ToolsDir)\Microsoft.CSharp.Core.targets</CSharpCoreTargetsPath>
<!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two properties to any folder that exists to skip
the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). -->
<_TargetFrameworkDirectories Condition="'$(BuildToolsTargetsDesktop)' != 'true'">$(MSBuildThisFileDirectory)/Documentation</_TargetFrameworkDirectories>
Expand Down

0 comments on commit 3fb996c

Please sign in to comment.