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

Commit

Permalink
Remove packageResolve.targets (#33205)
Browse files Browse the repository at this point in the history
* Remove packageResolve.targets

* Fix packages folder fallback and runtime binplacing

* Fix UAP and NetFx builds
  • Loading branch information
ericstj authored Nov 5, 2018
1 parent 3af75a8 commit 2e3b5eb
Show file tree
Hide file tree
Showing 19 changed files with 114 additions and 208 deletions.
30 changes: 9 additions & 21 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@

<!-- Input Directories -->
<PackagesDir>$(DotNetRestorePackagesPath)</PackagesDir>
<PackagesDir Condition="'$(PackagesDir)'==''">$(NuGetPackageRoot)/</PackagesDir>
<PackagesDir Condition="'$(PackagesDir)'==''">$(ProjectDir)packages/</PackagesDir>
<RestorePackagesPath Condition="'$(RestorePackagesPath)'==''">$(PackagesDir)</RestorePackagesPath>
<PackagesDir Condition="'$(PackagesDir)'=='' AND '$(NuGetPackageRoot)' != ''">$([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)'))</PackagesDir>
<PackagesDir Condition="'$(PackagesDir)'==''">$(ProjectDir).packages/</PackagesDir>
<ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools/</ToolsDir>
<IlasmToolPath>$(ToolsDir)ilasm/ilasm</IlasmToolPath>
<CodeAnalysisRuleset>$(MSBuildThisFileDirectory)CodeAnalysis.ruleset</CodeAnalysisRuleset>
Expand All @@ -96,6 +95,13 @@
<ExcludeSigningImport>true</ExcludeSigningImport>
<ExcludeDepProjImport>true</ExcludeDepProjImport>
<ExcludeResolveContractImport>true</ExcludeResolveContractImport>
<ExcludePackageResolveImport>true</ExcludePackageResolveImport>
</PropertyGroup>

<!-- workaround https://github.com/dotnet/sdk/issues/2288
remove once we have a new CLI -->
<PropertyGroup>
<LanguageTargets Condition="'$(LanguageTargets)' == '' AND '$(MSBuildProjectExtension)' != '.csproj' AND '$(MSBuildProjectExtension)' != '.vbproj' AND '$(MSBuildProjectExtension)' != '.fsproj'">$(MSBuildToolsPath)\Microsoft.Common.targets</LanguageTargets>
</PropertyGroup>

<!-- Import Build tools common props file where repo-independent properties are found -->
Expand Down Expand Up @@ -300,24 +306,6 @@
</When>
</Choose>

<PropertyGroup>
<IsRedistAssembly Condition="'$(IsRedistAssembly)'=='' AND ($(MSBuildProjectFullPath.Contains('\redist\')) OR $(MSBuildProjectFullPath.Contains('/redist/')))">true</IsRedistAssembly>
</PropertyGroup>
<PropertyGroup Condition="'$(IsRedistAssembly)'=='true'">
<NuGetRuntimeIdentifier Condition="'$(TargetGroup)' == 'netcore50'">win8</NuGetRuntimeIdentifier>
<NuGetRuntimeIdentifier Condition="'$(TargetGroup)' == 'netcore50aot'">win8-aot</NuGetRuntimeIdentifier>

<!-- workaround Dev14 issue with nuget targets, misspelling is intentional to align with Dev14 RTM targets -->
<RuntimeIndentifier>$(NuGetRuntimeIdentifier)</RuntimeIndentifier>
</PropertyGroup>

<!-- If there is a target group, try to find project.json and lockfile in a subfolder named as that target. -->
<PropertyGroup Condition="'$(TargetGroup)'!=''">
<ProjectJson Condition="Exists('$(MSBuildProjectDirectory)/$(TargetGroup)/project.json')">$(MSBuildProjectDirectory)/$(TargetGroup)/project.json</ProjectJson>
<!-- Check for both project.json and lockfile to avoid using a stale lockfile. -->
<ProjectLockJson Condition="Exists('$(MSBuildProjectDirectory)/$(TargetGroup)/project.json') AND Exists('$(MSBuildProjectDirectory)/$(TargetGroup)/project.lock.json')">$(MSBuildProjectDirectory)/$(TargetGroup)/project.lock.json</ProjectLockJson>
</PropertyGroup>

<!-- Disable some standard properties for building our projects -->
<PropertyGroup>
<NoStdLib>true</NoStdLib>
Expand Down
2 changes: 2 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@
Include="@(_TargetGroupsWithIsAot->WithMetadataValue('IsAot', 'false'))">
<RefPath>$(RefRootPath)%(Identity)/</RefPath>
</BinPlaceConfiguration>

<BinPlaceConfiguration Include="@(AdditionalBinPlaceConfiguration)" />
</ItemGroup>

<Import Project="$(MSBuildThisFileDirectory)eng/depProj.targets" Condition="'$(MSBuildProjectExtension)' == '.depproj'" />
Expand Down
3 changes: 2 additions & 1 deletion build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
<PropertyGroup>
<BuildRestore Condition="'$(BuildRestore)'==''">true</BuildRestore>
<BuildNative Condition="'$(BuildNative)'==''">true</BuildNative>
<BuildManaged Condition="'$(BuildManaged)'==''">true</BuildManaged>
<BuildTests Condition="'$(BuildTests)'==''">false</BuildTests>
<BuildPackages Condition="'$(BuildPackages)'==''">true</BuildPackages>

<BuildDependsOn Condition="'$(BuildRestore)'=='true'">$(BuildDependsOn);Restore</BuildDependsOn>
<BuildDependsOn Condition="'$(BuildNative)'=='true'">$(BuildDependsOn);BuildNative</BuildDependsOn>
<BuildDependsOn>$(BuildDependsOn);BuildManaged</BuildDependsOn>
<BuildDependsOn Condition="'$(BuildManaged)'=='true'">$(BuildDependsOn);BuildManaged</BuildDependsOn>
<BuildDependsOn Condition="'$(BuildTests)'=='true'">$(BuildDependsOn);Test</BuildDependsOn>
<BuildDependsOn Condition="'$(BuildPackages)'=='true'">$(BuildDependsOn);Pack</BuildDependsOn>

Expand Down
Loading

0 comments on commit 2e3b5eb

Please sign in to comment.