azure-functions - Visual Studio 2019 无法运行 Azure Function 项目或创建新项目
问题描述
我很幸运,当 Visual Studio with Azure Function 项目打开时,我的电脑突然崩溃了。在那之后,我既不能运行这个项目,也不能创建一个新的 Azure Function 项目,因为同样的错误是“路径中的非法字符”。同时,可以毫无问题地创建和运行其他类型的项目。
我试图重新安装 VS 和所有 .net 包,但没有运气。我能以某种方式定位问题吗?所以我可以替换一些有问题的 DLL 或其他东西,而无需安装新的 Windows。
这是我设法从 VS 日志中检索到的错误文本:
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)
解决方案
也许这是一个已知问题,有一个关于它的博客,你可以试试这个解决方案:blog。
删除此文件夹:%localappdata%/AzureFunctionsTools
。
推荐阅读
- android - 我如何知道应用程序在不同的国家/地区启动/更新
- php - Laravel - 验证数组输入请求数据在数据库中的唯一性
- ruby-on-rails - 确保随机生成的字符串是唯一的
- python-3.x - 为什么类不能充当 Python 中函数的封闭空间
- html - Github org-mode html 导出图片大小调整
- jquery - 如何转换此脚本以加载 ajax 页面而不是模态 div?
- sass - 如何根据角度的某些条件使用 scss 更改我的布局的背景颜色和颜色?
- java - 在 gridView 中加载图像有时会混淆
- javascript - 数组的值在更新属性值时更新
- asynchronous - Flutter:关于期货和异步功能的问题