Svetlana
Svetlana

Reputation: 193

Visual Studio 2019 can't run Azure Function project or create a new one

I was lucky enough to have my computer suddenly crushed when Visual Studio with Azure Function project was open. And after that, I neither can't run this project and neither create a new Azure Function project due to the same error "Illegal characters in path." Meanwhile, projects of other types can be created and run without any issues.

I tried to reinstall VS and all .net packages but with no luck. Could I somehow localize the problem? So I could replace some troubled DLL or something without a need to install a new Windows.

This is the error text that I managed to retrieve from VS log:

System.ArgumentException: Illegal characters in path.at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)at System.IO.Path.Combine(String path1, String path2)at Microsoft.WebTools.Azure.Client.FunctionsFeed.FeedDataProvider.DemandReleaseDirectory(String releaseName)at Microsoft.WebTools.Azure.Client.FunctionsFeed.FeedDataProvider.TryGetLastKnownGoodToolsetForTag(IFeedTag tag, IToolset& toolset)at Microsoft.WebTools.Azure.Functions.TemplateEngine.UI.FeedHelpers.GetFrameworkForTag(IFeedDataProvider feedDataProvider, IFeedTag tag, IFileSystem fileSystem, Task`1& loadTask)at Microsoft.WebTools.Azure.Functions.TemplateEngine.UI.FeedHelpers.GetRuntimeFrameworks(IFeedDataProvider feedDataProvider, IEnvironment environment, IFileSystem fileSystem, Task`1& loadTask, IEnumerable`1& toolsetLoadTasks)at Microsoft.WebTools.Azure.Functions.TemplateEngine.UI.FunctionProjectViewModel.InitializeRuntimeFrameworkList()at Microsoft.WebTools.Azure.Functions.TemplateEngine.UI.FunctionProjectViewModel..ctor(IThreadSwitcher threadSwitcher, IFileSystem fileSystem, IVsWrappersFactory vsWrappers, IEngineBootstrapper bootstrapper, IProjectCreationMetadata metadata, IFeedDataProvider feedDataProvider, IEnvironment environment, IFunctionsRuntimeManager runtimeManager, IFunctionsProjectSettings settings)at Microsoft.VisualStudio.TemplateEngine.FunctionProjectCreator.ShowTemplateUI(IProjectCreationMetadata metadata, IReadOnlyDictionary`2 passthroughParams)at Microsoft.VisualStudio.TemplateEngine.Wizard.TemplateWizardProjectPipeline.TryInvokeUICore(IProjectCreationMetadata metadata)

Upvotes: 0

Views: 661

Answers (1)

George Chen
George Chen

Reputation: 14334

Maybe this is a known issue, there is a blog about it, you could have a try with this solution: blog.

Delete this folder:%localappdata%/AzureFunctionsTools.

Upvotes: 1

Related Questions