Skip to content
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

Alter RuntimeComponentManifest.targets to use the correct runtime pack #56431

Merged
merged 7 commits into from
Jul 29, 2021
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
<Project>
<Target Name="_MonoReadAvailableComponentsManifest">
<Error Condition="'%(ResolvedRuntimePack.PackageDirectory)' == '' and '$(_MonoRuntimeComponentManifestJsonFilePath)' == ''"
Text="Empty ResolvedRuntimePack.PackageDirectory while trying to read runtime components manifest" />
<Error Condition="'%(ResolvedFrameworkReference.Identity)' == 'Microsoft.NETCore.App' and '%(RuntimePackPath)' == '' and '$(_MonoRuntimeComponentManifestJsonFilePath)' == ''"
Text="Empty ResolveFrameworkReference.RuntimePackPath while trying to read runtime components manifest" />

<PropertyGroup>
<_MonoRuntimeComponentManifestJsonFilePath Condition="'$(_MonoRuntimeComponentManifestJsonFilePath)' == ''">%(ResolvedRuntimePack.PackageDirectory)\runtimes\$(RuntimeIdentifier)\build\RuntimeComponentManifest.json</_MonoRuntimeComponentManifestJsonFilePath>
<_MonoRuntimeComponentManifestJsonFilePath
Condition="'$(_MonoRuntimeComponentManifestJsonFilePath)' == '' and '%(ResolvedFrameworkReference.Identity)' == 'Microsoft.NETCore.App'">$([MSBuild]::NormalizePath('%(RuntimePackPath)', 'runtimes', '$(RuntimeIdentifier)', 'build', 'RuntimeComponentManifest.json'))</_MonoRuntimeComponentManifestJsonFilePath>
</PropertyGroup>
steveisok marked this conversation as resolved.
Show resolved Hide resolved

<Error Condition="!Exists('$(_MonoRuntimeComponentManifestJsonFilePath)')"
Text="Unable to read the runtime components manifest as the path does not exist" />
steveisok marked this conversation as resolved.
Show resolved Hide resolved

<MonoRuntimeComponentManifestReadTask JsonFilePath="$(_MonoRuntimeComponentManifestJsonFilePath)">
<Output TaskParameter="_MonoRuntimeComponentSharedLibExt" ItemName="_MonoRuntimeComponentSharedLibExt" />
<Output TaskParameter="_MonoRuntimeComponentStaticLibExt" ItemName="_MonoRuntimeComponentStaticLibExt" />
Expand Down