首页 文章

在VS 2013中缺少'Add Application Insights Telemetry to Project'选项

提问于
浏览
11

我有一个现有的Web项目 . 我点击了"Add Application Insights Telemetry to Project",并在此过程中的某个时刻发出了错误,如'[...] failed to initialize the powershell host [...]' . 然后我根据谷歌的搜索尝试了一些东西 . 项目中没有ApplicationInsights.config,也没有引用Microsoft.ApplicationInsights.Telemetry.Services .

Now there is no 'Add Application Insights Telemetry to Project' option to be found anywhere. 我甚至尝试重新安装Application Insights扩展程序 .

我试图通过git回滚任何更改,但没有运气 .

非我的队友在VS中看到'Add Application Insights Telemetry to Project'选项 . (我们都使用Visual Studio Ultimate 2013 Update 4)

如果我不能让它工作,有没有办法手动设置它?

2 回答

  • 1

    手动,你可以自己添加nuget包(网络是:http://www.nuget.org/packages/Microsoft.ApplicationInsights.Web

    然后在Azure门户(http://portal.azure.com)上手动创建应用程序洞察资源,然后获取新资源的检测密钥,并将其粘贴到nuget包安装到项目中的ApplicationInsights.config文件中 .

    AI VSIX在这些步骤之上添加了一个GUI . (可以帮助你修复vsix的任何错误,我宁愿你先做这个!)

  • 8

    我发现这与我的csproj文件中缺少ProjectTypeGuids有关 .

    在VS2015中,需要存在以下 ProjectTypeGuids

    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
    

相关问题