Missing 'Add Application Insights Telemetry to Project' option in VS 2013

核能气质少年 提交于 2019-12-10 00:56:33

问题


I have an existing Web Project. I clicked "Add Application Insights Telemetry to Project" and at one point in the process it threw an error like '[...] failed to initialize the powershell host [...]'. Then I tried a few things according to Google searches. There is no ApplicationInsights.config in the project, nor is the Microsoft.ApplicationInsights.Telemetry.Services referenced.

Now there is no 'Add Application Insights Telemetry to Project' option to be found anywhere. I even tried to re-install the Application Insights extension.

I tried to roll back any changes via git, but without luck.

Non of my teammates see the 'Add Application Insights Telemetry to Project' option in VS. (We're all using Visual Studio Ultimate 2013 Update 4)

In case I can't get this to work, is there a way to manually set this up?


回答1:


Manually, you can add the nuget package yourself (the web one is: http://www.nuget.org/packages/Microsoft.ApplicationInsights.Web)

and then manually create an application insights resource on the Azure portal (http://portal.azure.com), and then take the instrumentation key for your new resource, and paste it into the ApplicationInsights.config file that the nuget package installed into your project.

The AI VSIX adds a GUI on top of those steps. (can help you fix whatever's wrong with the vsix i'd rather have you do that first, though!)




回答2:


I found that this was related to the ProjectTypeGuids being missing from my csproj files.

In VS2015 the following ProjectTypeGuids needed to be present:

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


来源:https://stackoverflow.com/questions/29403005/missing-add-application-insights-telemetry-to-project-option-in-vs-2013

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!