Skip to content

Commit e36a9c4

Browse files
[dotnet] use **FromWorkload** for targeting/runtime pack versions
Context: dotnet/sdk#19596 Context: dotnet/android#6184 If we use the version number string of `**FromWorkload**`, then our runtime packages don't need to be resolved from a NuGet feed. They can be resolved from the `dotnet/packs` directory. This completely eliminates the need for a `NuGet.config` file when building a .NET 6 app with a local build of the xamarin-macios. You will no longer need a feed such as: <add key="local-dotnet-feed" value="~/src/xamarin-macios/_build/nuget-feed" />
1 parent ef61ab5 commit e36a9c4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

dotnet/targets/Xamarin.Shared.Sdk.DefaultItems.targets

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@
8585
<KnownFrameworkReference Include="Microsoft.$(_PlatformName)"
8686
TargetFramework="net6.0"
8787
RuntimeFrameworkName="Microsoft.$(_PlatformName)"
88-
DefaultRuntimeFrameworkVersion="$(_ShortPackageVersion)"
89-
LatestRuntimeFrameworkVersion="$(_ShortPackageVersion)"
88+
DefaultRuntimeFrameworkVersion="**FromWorkload**"
89+
LatestRuntimeFrameworkVersion="**FromWorkload**"
9090
TargetingPackName="Microsoft.$(_PlatformName).Ref"
91-
TargetingPackVersion="$(_ShortPackageVersion)"
91+
TargetingPackVersion="**FromWorkload**"
9292
RuntimePackNamePatterns="Microsoft.$(_PlatformName).Runtime.**RID**"
9393
RuntimePackRuntimeIdentifiers="$(_RuntimePackRuntimeIdentifiers)"
9494
Profile="$(_PlatformName)"

tests/dotnet/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ include $(TOP)/Make.config
66
# and to put any extracted packages in the 'packages' directory (to not clutter up ~/.nuget/packages)
77
NuGet.config: $(TOP)/NuGet.config Makefile
88
$(Q) $(CP) $< $@.tmp
9-
$(Q) nuget sources add -Name local-dotnet-feed -Source $(abspath $(DOTNET_FEED_DIR)) -ConfigFile $@.tmp
109
ifdef CUSTOM_DOTNET
1110
$(Q) nuget sources add -Name dev-runtime-feed -Source $(abspath $(DOTNET_RUNTIME_PATH)/artifacts/packages/Release/Shipping) -ConfigFile [email protected]
1211
endif

0 commit comments

Comments
 (0)