New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use PackageDownload in VS, fix design time build failures #3268
Changes from all commits
f2b6571
da3db04
6e99b4a
197617a
dcf2e55
a9e8d3a
834a02f
42ae8fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ Copyright (c) .NET Foundation. All rights reserved. | |
<UsingTask TaskName="ResolveFrameworkReferences" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" /> | ||
<UsingTask TaskName="ResolveAppHosts" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" /> | ||
|
||
<Target Name="ResolveFrameworkReferences" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;CollectPackageReferences"> | ||
<Target Name="ResolveFrameworkReferences" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;CollectPackageReferences;CollectPackageDownloads"> | ||
|
||
<CheckForDuplicateFrameworkReferences | ||
FrameworkReferences="@(FrameworkReference)" | ||
|
@@ -142,8 +142,9 @@ Copyright (c) .NET Foundation. All rights reserved. | |
</ResolveAppHosts> | ||
|
||
<PropertyGroup Condition="'$(UsePackageDownload)' == ''"> | ||
<UsePackageDownload Condition=" '$(MSBuildRuntimeType)' == 'Core'">true</UsePackageDownload> | ||
<UsePackageDownload Condition=" '$(MSBuildRuntimeType)' != 'Core'">false</UsePackageDownload> | ||
<UsePackageDownload Condition="'$(MSBuildRuntimeType)' == 'Core'">true</UsePackageDownload> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need this anymore? I can't think of a case from here forward where we'd be using core msbuild but PackageDownloadSupported != true. If we don't need it now, might as well keep it out. I guess this whole thing will go away. but I think there's still some value in keeping the bridge code as small as possible until then. Less moving parts to think about. |
||
<UsePackageDownload Condition="'$(PackageDownloadSupported)' == 'true'">true</UsePackageDownload> | ||
<UsePackageDownload Condition="'$(UsePackageDownload)' == ''">false</UsePackageDownload> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(UsePackageDownload)' == 'true'"> | ||
|
@@ -283,7 +284,7 @@ Copyright (c) .NET Foundation. All rights reserved. | |
<UsingTask TaskName="ResolveRuntimePackAssets" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" /> | ||
|
||
<Target Name="ResolveRuntimePackAssets" DependsOnTargets="ResolvePackageAssets" | ||
Condition="'@(RuntimePack)' != ''"> | ||
Condition="'@(RuntimePack)' != '' And '$(DesignTimeBuild)' != 'true'"> | ||
|
||
<GetPackageDirectory | ||
Items="@(RuntimePack)" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, the bool local feels like it's unnecessary. Would be easier to read (subjectively) as `throwIfNotFound: !_task.DesignTimeBuild. Earlier, though, the local is used more than once so it has some value, and then I can see wanting to be consistent between the methods. So I'm not sure...