Skip to content

Commit

Permalink
[dotnet] use **FromWorkload** for targeting/runtime pack versions
Browse files Browse the repository at this point in the history
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" />
  • Loading branch information
jonathanpeppers committed Aug 16, 2021
1 parent b4e828c commit bb3bf63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions dotnet/targets/Xamarin.Shared.Sdk.DefaultItems.targets
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@
<KnownFrameworkReference Include="Microsoft.$(_PlatformName)"
TargetFramework="net6.0"
RuntimeFrameworkName="Microsoft.$(_PlatformName)"
DefaultRuntimeFrameworkVersion="$(_ShortPackageVersion)"
LatestRuntimeFrameworkVersion="$(_ShortPackageVersion)"
DefaultRuntimeFrameworkVersion="**FromWorkload**"
LatestRuntimeFrameworkVersion="**FromWorkload**"
TargetingPackName="Microsoft.$(_PlatformName).Ref"
TargetingPackVersion="$(_ShortPackageVersion)"
TargetingPackVersion="**FromWorkload**"
RuntimePackNamePatterns="Microsoft.$(_PlatformName).Runtime.**RID**"
RuntimePackRuntimeIdentifiers="$(_RuntimePackRuntimeIdentifiers)"
Profile="$(_PlatformName)"
Expand Down
1 change: 0 additions & 1 deletion tests/dotnet/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ include $(TOP)/Make.config
# and to put any extracted packages in the 'packages' directory (to not clutter up ~/.nuget/packages)
NuGet.config: $(TOP)/NuGet.config Makefile
$(Q) $(CP) $< $@.tmp
$(Q) nuget sources add -Name local-dotnet-feed -Source $(abspath $(DOTNET_FEED_DIR)) -ConfigFile $@.tmp
ifdef CUSTOM_DOTNET
$(Q) nuget sources add -Name dev-runtime-feed -Source $(abspath $(DOTNET_RUNTIME_PATH)/artifacts/packages/Release/Shipping) -ConfigFile $@.tmp
endif
Expand Down

0 comments on commit bb3bf63

Please sign in to comment.