-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Area-dotnet AOTItems that are part of the dotnet CLI AOT-ification effortItems that are part of the dotnet CLI AOT-ification effortuntriagedRequest triage from a team memberRequest triage from a team member
Description
When we look for folders, we can't use assembly location as a root as the assembly doesn't exist in the same way when we're precompiled into a single executable with AOT. For example (BuiltInTemplatePackageProvider.GetTemplateFolders):
#pragma warning disable IL3000 // Avoid accessing Assembly file path when publishing as a single file
var sdkDirectory = Path.GetDirectoryName(typeof(Utils.DotnetFiles).Assembly.Location);
#pragma warning restore IL3000
var dotnetRootPath = Path.GetDirectoryName(Path.GetDirectoryName(sdkDirectory));
// First grab templates from dotnet\templates\M.m folders, in ascending order, up to our version
string templatesRootFolder = Path.GetFullPath(Path.Combine(dotnetRootPath, "templates"));Another in OptionalWorkloadProvider.GetAllTemplatePackagesAsync:
#pragma warning disable IL3000 // Avoid accessing Assembly file path when publishing as a single file
var sdkDirectory = Path.GetDirectoryName(typeof(DotnetFiles).Assembly.Location);
#pragma warning restore IL3000 // Avoid accessing Assembly file path when publishing as a single file
var sdkVersion = Path.GetFileName(sdkDirectory);
var dotnetRootPath = Path.GetDirectoryName(Path.GetDirectoryName(sdkDirectory));
string userProfileDir = CliFolderPathCalculator.DotnetUserProfileFolderPath;
var packages = optionalWorkloadLocator.GetDotnetSdkTemplatePackages(sdkVersion, dotnetRootPath, userProfileDir);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-dotnet AOTItems that are part of the dotnet CLI AOT-ification effortItems that are part of the dotnet CLI AOT-ification effortuntriagedRequest triage from a team memberRequest triage from a team member