Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure transitive dependencies are properly resolved for inference
.NET 7.0 SDK changed from: ```xml <ResolvePackageDependencies ProjectPath="$(MSBuildProjectFullPath)" ProjectAssetsFile="$(ProjectAssetsFile)" ProjectLanguage="$(Language)" EmitLegacyAssetsFileItems="$(EmitLegacyAssetsFileItems)" TargetFramework="$(TargetFramework)" ContinueOnError="ErrorAndContinue"> <Output TaskParameter="PackageDefinitions" ItemName="PackageDefinitions" /> <Output TaskParameter="PackageDependencies" ItemName="PackageDependencies" /> <!-- These outputs only produced when EmitLegacyAssetsFileItems is true --> <Output TaskParameter="TargetDefinitions" ItemName="TargetDefinitions" /> <Output TaskParameter="FileDefinitions" ItemName="FileDefinitions" /> <Output TaskParameter="FileDependencies" ItemName="FileDependencies" /> </ResolvePackageDependencies> ``` to: ```xml <ResolvePackageDependencies ProjectPath="$(MSBuildProjectFullPath)" ProjectAssetsFile="$(ProjectAssetsFile)" ProjectLanguage="$(Language)" TargetFramework="$(TargetFramework)" ContinueOnError="ErrorAndContinue" Condition="'$(EmitLegacyAssetsFileItems)' == 'true'"> <Output TaskParameter="PackageDefinitions" ItemName="PackageDefinitions" /> <Output TaskParameter="PackageDependencies" ItemName="PackageDependencies" /> <Output TaskParameter="TargetDefinitions" ItemName="TargetDefinitions" /> <Output TaskParameter="FileDefinitions" ItemName="FileDefinitions" /> <Output TaskParameter="FileDependencies" ItemName="FileDependencies" /> </ResolvePackageDependencies> ``` Since the SDK now conditions the execution of the resolve to the value of `EmitLegacyAssetsFileItems`, we need to explicitly set it. Since this was likely done for performance reasons, only turn on when package inference is active, since we don't use that anywhere else.
- Loading branch information