-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Runtime pack resolution #19596
Runtime pack resolution #19596
Conversation
4de5b38
to
d975185
Compare
{ | ||
yield return TargetingPackRoot; | ||
} | ||
var packRootEnvironmentVariable = Environment.GetEnvironmentVariable("DOTNETSDK_WORKLOAD_PACK_ROOTS"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a central class where we can keep all these environmental variable constants? That way we don't need to worry about typo's in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I think this will save us a lot of potential pain in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added one now (EnvironmentVariableNames
) and added constants for the workload environment variables. There are a bunch of other CLI environment variables which I didn't refactor into this class yet.
|
||
private string GetResolvedPackVersion(string packID, string packVersion) | ||
{ | ||
if (!packVersion.Equals("**FromWorload**", StringComparison.OrdinalIgnoreCase)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be "FromWorkload"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! Thanks for catching that :-)
DefaultRuntimeFrameworkVersion='**FromWorload**' | ||
LatestRuntimeFrameworkVersion='**FromWorload**' | ||
TargetingPackName='Microsoft.NETCore.App.Test.Ref' | ||
TargetingPackVersion='**FromWorload**' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a typo - should be FromWorkload?
I think this looks good. |
@@ -0,0 +1,914 @@ | |||
<?xml version="1.0" encoding="utf-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/Tasks/Common/Resources/xlf/Strings.ja.xlf~RF1ea49cc.TMP looks like a name for a temporary file; did you add this by accident?
There is the older Strings.es.xlf~RF13d378ed.TMP as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this looks like a mistake, filed #19688 to delete them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching that. I've submitted #19694 to fix.
Context: dotnet/sdk#19596 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 Android workload. You can simply do: ~/android-toolchain/dotnet/dotnet new android ~/android-toolchain/dotnet/dotnet build
var packInfo = _workloadResolver.TryGetPackInfo(new WorkloadPackId(packID)); | ||
if (packInfo == null) | ||
{ | ||
Log.LogError("NETSDKZZZZ: Error getting pack version: Pack '{0}' was not present in workload manifests.", packID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Placeholder error code?
…6184) Context: dotnet/sdk#19596 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 Android workload. You can simply do: ~/android-toolchain/dotnet/dotnet new android ~/android-toolchain/dotnet/dotnet build
Context: dotnet/sdk#19596 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 for projects when you have the `maui` workload installed. One caveat for dotnet/maui is we have a `$(MicrosoftMauiSdkVersion)`. We'll need to use `**FromWorkload**` in some places, and the actual number when declaring `@(PackageReference)`.
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" />
Context: dotnet/sdk#19596 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 for projects when you have the `maui` workload installed. One caveat for dotnet/maui is we have a `$(MicrosoftMauiSdkVersion)`. We'll need to use `**FromWorkload**` in some places, and the actual number when declaring `@(PackageReference)`.
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" />
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" />
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" />
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" /> To further clean things up, I removed the need for: * Any NuGet feed named `local-dotnet-feed` * `$(DOTNET_FEED_DIR)` * Generation of `dotnet/Workloads/NuGet.config`
…2122) Context: dotnet/sdk#19596 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 for projects when you have the `maui` workload installed. One caveat for dotnet/maui is we have a `$(MicrosoftMauiSdkVersion)`. We'll need to use `**FromWorkload**` in some places, and the actual number when declaring `@(PackageReference)`.
…2449) 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 xamarin-macios. You will no longer need a feed such as: <add key="local-dotnet-feed" value="~/src/xamarin-macios/_build/nuget-feed" /> To further clean things up, I removed the need for: * Any NuGet feed named `local-dotnet-feed` * `$(DOTNET_FEED_DIR)` * Generation of `dotnet/Workloads/NuGet.config`
…#2122) Context: dotnet/sdk#19596 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 for projects when you have the `maui` workload installed. One caveat for dotnet/maui is we have a `$(MicrosoftMauiSdkVersion)`. We'll need to use `**FromWorkload**` in some places, and the actual number when declaring `@(PackageReference)`.
Fixes #14044
Fixes #18064
packs
subfolder of the directory specified by the environment variableKnownFrameworkReference
orKnownRuntimePack
item should be set to**FromWorkload**