[tests] Update 'KnownFrameworkReference' and 'KnownRuntimePack' to the reference the correct dotnet/runtime version when using a custom dotnet/runtime. (#20838)
This commit is contained in:
Родитель
122ed73df5
Коммит
1520e0ebbc
|
@ -667,6 +667,9 @@ endif
|
|||
ALL_PLATFORMS=iOS tvOS watchOS macOS
|
||||
ALL_DOTNET_PLATFORMS=iOS macOS tvOS MacCatalyst
|
||||
|
||||
# Set this to 1 if the Microsoft.NETCore.App.Ref dependency in eng/Version.Details.xml does *not* specify a CoherentParentDependency on Microsoft.Dotnet.Sdk.Internal.
|
||||
TRACKING_DOTNET_RUNTIME_SEPARATELY=
|
||||
|
||||
-include $(TOP)/dotnet.config
|
||||
$(TOP)/dotnet.config: $(TOP)/eng/Versions.props $(TOP)/Build.props
|
||||
$(Q) grep MicrosoftDotnetSdkInternalPackageVersion $(TOP)/eng/Versions.props | sed -e 's/<*\/*MicrosoftDotnetSdkInternalPackageVersion>//g' -e 's/[ \t]*/DOTNET_VERSION=/' >> $@.tmp
|
||||
|
@ -686,6 +689,7 @@ else ifeq ($(XCODE_IS_STABLE),false)
|
|||
else
|
||||
$(error "The variable XCODE_IS_STABLE is not set!")
|
||||
endif
|
||||
$(Q) printf "\t\t<TRACKING_DOTNET_RUNTIME_SEPARATELY>$(TRACKING_DOTNET_RUNTIME_SEPARATELY)</TRACKING_DOTNET_RUNTIME_SEPARATELY>\n" >> $@.tmp
|
||||
$(Q) printf "\t</PropertyGroup>\n" >> $@.tmp
|
||||
$(Q) printf "</Project>\n" >> $@.tmp
|
||||
$(Q) mv $@.tmp $@
|
||||
|
@ -746,9 +750,6 @@ EMSCRIPTEN_MANIFEST_VERSION_BAND=$(DOTNET_MANIFEST_VERSION_BAND_WITH_PRERELEASE_
|
|||
# It should typically be $(DOTNET_MANIFEST_VERSION_BAND_WITH_PRERELEASE_COMPONENT), unless we decide to hardcode it to something else
|
||||
MACIOS_MANIFEST_VERSION_BAND=$(DOTNET_MANIFEST_VERSION_BAND_WITH_PRERELEASE_COMPONENT)
|
||||
|
||||
# Set this to 1 if the Microsoft.NETCore.App.Ref dependency in eng/Version.Details.xml does *not* specify a CoherentParentDependency on Microsoft.Dotnet.Sdk.Internal.
|
||||
TRACKING_DOTNET_RUNTIME_SEPARATELY=
|
||||
|
||||
# The location of csc changes depending on whether we're using a preview or a stable/service release :/
|
||||
DOTNET_CSC_PATH_PREVIEW=$(DOTNET_DIR)/sdk/$(DOTNET_VERSION)/Roslyn/bincore/csc.dll
|
||||
DOTNET_CSC_PATH_STABLE=$(DOTNET_DIR)/sdk/$(DOTNET_VERSION_BAND)/Roslyn/bincore/csc.dll
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildThisFileDirectory)../Directory.Build.props" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)../eng/Versions.props" />
|
||||
</Project>
|
|
@ -8,4 +8,21 @@
|
|||
<KnownFrameworkReference Update="Microsoft.NETCore.App.Mono" TargetingPackVersion="$(CUSTOM_DOTNET_VERSION)" />
|
||||
<KnownFrameworkReference Update="Microsoft.NETCore.App.Mono" RuntimeFrameworkVersion="$(CUSTOM_DOTNET_VERSION)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TRACKING_DOTNET_RUNTIME_SEPARATELY)' != ''">
|
||||
<KnownFrameworkReference Update="Microsoft.NETCore.App">
|
||||
<RuntimeFrameworkVersion>$(MicrosoftNETCoreAppRefPackageVersion)</RuntimeFrameworkVersion>
|
||||
</KnownFrameworkReference>
|
||||
</ItemGroup>
|
||||
|
||||
<Target
|
||||
Name="UpdateKnownRuntimePackWithCustomRuntime"
|
||||
Condition="'$(TRACKING_DOTNET_RUNTIME_SEPARATELY)' != ''"
|
||||
BeforeTargets="ProcessFrameworkReferences">
|
||||
<ItemGroup>
|
||||
<KnownRuntimePack Update="Microsoft.NETCore.App">
|
||||
<LatestRuntimeFrameworkVersion>$(MicrosoftNETCoreAppRefPackageVersion)</LatestRuntimeFrameworkVersion>
|
||||
</KnownRuntimePack>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
Загрузка…
Ссылка в новой задаче