This repository has been archived by the owner on May 21, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve versions for ProjectReferences and floating package references (
#149)
- Loading branch information
1 parent
91abc3e
commit 2650193
Showing
4 changed files
with
73 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
<!-- | ||
Copyright (c) .NET Foundation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0. | ||
--> | ||
<!-- | ||
WARNING: This file is meant for building Microsoft's ASP.NET Core repos, and is not intended | ||
for use outside of Microsoft. | ||
--> | ||
<Project> | ||
<Import Project="Workarounds.targets" /> | ||
|
||
<PropertyGroup> | ||
<_IsCrossTargeting Condition="'$(TargetFrameworks)'!='' AND '$(TargetFramework)'==''">true</_IsCrossTargeting> | ||
</PropertyGroup> | ||
|
||
<Import Project="Workarounds.CrossTargeting.targets" Condition="'$(_IsCrossTargeting)'=='true'" /> | ||
<Import Project="Workarounds.targets" Condition="'$(_IsCrossTargeting)'!='true'" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<!-- | ||
Copyright (c) .NET Foundation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0. | ||
WARNING: This file is meant for building Microsoft's ASP.NET Core repos, and is not intended | ||
for use outside of Microsoft. | ||
--> | ||
<Project> | ||
<!-- workaround https://github.com/NuGet/Home/issues/4063 --> | ||
<!-- workaround https://github.com/NuGet/Home/issues/3953 --> | ||
<Target Name="ResolveActualPackageVersions" BeforeTargets="GenerateNuspec"> | ||
<ItemGroup> | ||
<_TargetFramework Include="$(TargetFrameworks)" /> | ||
</ItemGroup> | ||
|
||
<MSBuild Projects="$(MSBuildProjectFile)" | ||
Targets="ResolvePackageDependenciesDesignTime" | ||
Properties="TargetFramework=%(_TargetFramework.Identity)"> | ||
<Output TaskParameter="TargetOutputs" ItemName="_DependenciesDesignTime" /> | ||
</MSBuild> | ||
|
||
<ItemGroup> | ||
<_Tmp Include="@(_ProjectReferences)" /> | ||
<_ProjectReferences Remove="@(_ProjectReferences)" /> | ||
<_ProjectReferences Include="@(_Tmp)"> | ||
<PackageVersion>$(Version)</PackageVersion> | ||
</_ProjectReferences> | ||
|
||
<_FloatingVersions Include="@(_PackageReferences)" Condition="$([System.String]::new('%(Version)').EndsWith('*'))" /> | ||
<_ResolvedFloatingVersion Include="@(_FloatingVersions)"> | ||
<ResolvedName>%(_DependenciesDesignTime.Name)</ResolvedName> | ||
<Version>%(_DependenciesDesignTime.Version)</Version> | ||
</_ResolvedFloatingVersion> | ||
<_PackageReferences Remove="@(_PackageReferences)" Condition="$([System.String]::new('%(Version)').EndsWith('*'))" /> | ||
<_PackageReferences Include="@(_ResolvedFloatingVersion)" Condition="'%(Identity)'=='%(_ResolvedFloatingVersion.ResolvedName)'" /> | ||
</ItemGroup> | ||
|
||
|
||
<Message Importance="Normal" Text="Proj: %(_ProjectReferences.FileName) %(_ProjectReferences.PackageVersion)" /> | ||
<Message Importance="Normal" Text="Pkg: %(_PackageReferences.Identity) %(_PackageReferences.Version)" /> | ||
</Target> | ||
<!-- end workaround --> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters