You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug is spit out error when I tried to create project or list all templates
To Reproduce
dotnet new console
or
dotnet new --list
Exceptions (if any)
D:\test_c#>dotnet new --list
Missing or invalid manifest version
at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestReader.ReadWorkloadManifest(String id, String informationalPath, LocalizationCatalog localizationCatalog, Utf8JsonStreamReader& reader)
at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestReader.ReadWorkloadManifest(String manifestId, Stream manifestStream, Stream localizationStream, String informationalPath)
at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.LoadManifestsFromProvider(IWorkloadManifestProvider manifestProvider)
at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.Create(IWorkloadManifestProvider manifestProvider, String dotnetRootPath, String sdkVersion, String userProfileDir)
at Microsoft.DotNet.TemplateLocator.TemplateLocator.GetDotnetSdkTemplatePackages(String sdkVersion, String dotnetRootPath, String userProfileDir)
at Microsoft.DotNet.Tools.New.OptionalWorkloadProvider.GetAllTemplatePackagesAsync(CancellationToken cancellationToken)
at Microsoft.TemplateEngine.Edge.Settings.TemplatePackageManager.<>c__DisplayClass21_0.<EnsureProvidersLoaded>b__2()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__271_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Microsoft.TemplateEngine.Edge.Settings.TemplatePackageManager.GetTemplatePackagesAsync(Boolean force, CancellationToken cancellationToken)
at Microsoft.TemplateEngine.Edge.Settings.TemplatePackageManager.UpdateTemplateCacheAsync(Boolean needsRebuild, CancellationToken cancellationToken)
at Microsoft.TemplateEngine.Edge.Settings.TemplatePackageManager.GetTemplatesAsync(CancellationToken cancellationToken)
at Microsoft.TemplateEngine.Cli.TemplateResolution.BaseTemplateResolver.GetTemplateGroupsAsync(CancellationToken cancellationToken)
at Microsoft.TemplateEngine.Cli.TemplateResolution.ListTemplateResolver.ResolveTemplatesAsync(INewCommandInput commandInput, String defaultLanguage, CancellationToken cancellationToken)
at Microsoft.TemplateEngine.Cli.HelpAndUsage.TemplateInformationCoordinator.DisplayTemplateGroupListAsync(INewCommandInput commandInput, CancellationToken cancellationToken)
at Microsoft.TemplateEngine.Cli.New3Command.EnterMaintenanceFlowAsync(INewCommandInput commandInput)
at Microsoft.TemplateEngine.Cli.New3Command.ExecuteAsync(INewCommandInput commandInput)
at Microsoft.TemplateEngine.Cli.New3Command.ActualRun(String commandName, ITemplateEngineHost host, ITelemetryLogger telemetryLogger, New3Callbacks callbacks, String[] args, String hivePath)
D:\test_c#>dotnet new console
Missing or invalid manifest version
at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestReader.ReadWorkloadManifest(String id, String informationalPath, LocalizationCatalog localizationCatalog, Utf8JsonStreamReader& reader)
at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestReader.ReadWorkloadManifest(String manifestId, Stream manifestStream, Stream localizationStream, String informationalPath)
at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.LoadManifestsFromProvider(IWorkloadManifestProvider manifestProvider)
at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.Create(IWorkloadManifestProvider manifestProvider, String dotnetRootPath, String sdkVersion, String userProfileDir)
at Microsoft.DotNet.TemplateLocator.TemplateLocator.GetDotnetSdkTemplatePackages(String sdkVersion, String dotnetRootPath, String userProfileDir)
at Microsoft.DotNet.Tools.New.OptionalWorkloadProvider.GetAllTemplatePackagesAsync(CancellationToken cancellationToken)
at Microsoft.TemplateEngine.Edge.Settings.TemplatePackageManager.<>c__DisplayClass21_0.<EnsureProvidersLoaded>b__2()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__271_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Microsoft.TemplateEngine.Edge.Settings.TemplatePackageManager.GetTemplatePackagesAsync(Boolean force, CancellationToken cancellationToken)
at Microsoft.TemplateEngine.Edge.Settings.TemplatePackageManager.UpdateTemplateCacheAsync(Boolean needsRebuild, CancellationToken cancellationToken)
at Microsoft.TemplateEngine.Edge.Settings.TemplatePackageManager.GetTemplatesAsync(CancellationToken cancellationToken)
at Microsoft.TemplateEngine.Cli.TemplateResolution.BaseTemplateResolver.GetTemplateGroupsAsync(CancellationToken cancellationToken)
at Microsoft.TemplateEngine.Cli.TemplateResolution.InstantiateTemplateResolver.ResolveTemplatesAsync(INewCommandInput commandInput, String defaultLanguage, CancellationToken cancellationToken)
at Microsoft.TemplateEngine.Cli.TemplateInvocationCoordinator.CoordinateInvocationAsync(INewCommandInput commandInput, CancellationToken cancellationToken)
at Microsoft.TemplateEngine.Cli.New3Command.EnterTemplateManipulationFlowAsync(INewCommandInput commandInput)
at Microsoft.TemplateEngine.Cli.New3Command.ExecuteAsync(INewCommandInput commandInput)
at Microsoft.TemplateEngine.Cli.New3Command.ActualRun(String commandName, ITemplateEngineHost host, ITelemetryLogger telemetryLogger, New3Callbacks callbacks, String[] args, String hivePath)
Further technical details
Include the output of dotnet --info
.NET SDK (reflecting any global.json):
Version: 6.0.100
Commit: 9e8b04bbff
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19044
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.100\
Host (useful for support):
Version: 6.0.0
Commit: 4822e3c3aa
.NET SDKs installed:
6.0.100 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
The IDE (VS / VS Code/ VS4Mac) you're running on, and its version
Hi, I had the same issue and got fixed by remove all the contents inside C:\Program Files\dotnet\sdk-manifests\6.0.100 (or move them to a different folder), then my dotnet CLI became working again. (But I think there should be a better solution.)
Hi, I had the same issue and got fixed by remove all the contents inside C:\Program Files\dotnet\sdk-manifests\6.0.100 (or move them to a different folder), then my dotnet CLI became working again. (But I think there should be a better solution.)
This seems to be caused from the same reason I faced in the issue #23004.
The method String.IndexOf also returns a different result when user's locale is not en-US (which in my case it is Thai).
I have added the argument comparisonType with value System.StringComparison.InvariantCulture to all String.IndexOf calling in the FXVersion.TryParse method in FXVersion.cs.
After rebuilding the SDK, the command dotnet new --list is now working again without removing sdk-manifests folder as previously suggested above.
publicstaticboolTryParse(stringfxVersionString,outFXVersionFXVersion){
...
int majorSeparator=fxVersionString.IndexOf(".",System.StringComparison.InvariantCulture);
...
int minorSeparator=fxVersionString.IndexOf(".",minorStart,System.StringComparison.InvariantCulture);
...
int preSeparator=fxVersionString.IndexOf("+",preStart,System.StringComparison.InvariantCulture);
...}
Describe the bug
The bug is spit out error when I tried to create project or list all templates
To Reproduce
or
Exceptions (if any)
Further technical details
dotnet --info
The text was updated successfully, but these errors were encountered: