I want to publish my WPF application in Visual Studio 2019 (Version: 16.9.5).
I right-click on the project in the solution explorer, click on Publish
and a new tab opens. The tab should show the settings for publishing, but is loading endlessly.
I tried with a blank/new console application, but I have the same problem.
Steps to publish: Tutorial: Publish a .NET console application using Visual Studio
EDIT: The Visual Studio Log regarding to the publisher:
Microsoft.ServiceHub.Framework.ServiceActivationFailedException: Activating the "Microsoft.Publish.Framework.PublishProfilesService (1.0)" service failed. ---> System.ComponentModel.Composition.ImportCardinalityMismatchException: No exports were found that match the constraint: 
	ContractName	Microsoft.Publish.Framework.Nexus.IPublishProfilesService
	RequiredTypeIdentity	Microsoft.Publish.Framework.Nexus.IPublishProfilesService
 at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
 at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportsCore(Type type, Type metadataViewType, String contractName, ImportCardinality cardinality)
 at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValueCore[T](String contractName, ImportCardinality cardinality)
 at Microsoft.Publish.Framework.Nexus.PublishProfilesService.<CreateAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.Publish.Framework.VisualStudio.PublishPackage.<<InitializeAsync>b__7_1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at System.Threading.Tasks.ValueTask`1.get_Result()
 at Microsoft.VisualStudio.Utilities.ServiceBroker.GlobalBrokeredServiceContainer.ProfferedServiceFactory.<InvokeFactoryAsync>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Utilities.ServiceBroker.GlobalBrokeredServiceContainer.ProfferedServiceFactory.<GetProxyAsync>d__28`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at System.Threading.Tasks.ValueTask`1.get_Result()
 at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()
 at Microsoft.VisualStudio.Utilities.ServiceBroker.GlobalBrokeredServiceContainer.View.<GetProxyAsync>d__19`1.MoveNext()
 --- End of inner exception stack trace ---