overcomer
overcomer

Reputation: 2374

I am not able to add insigths telemetry to new Asp .NET framework project

I want to test the Azure Insights telemetry and for this purpose, I have created a new free Azure account and a new MVC Web App Application (Framework 4.7.2)

enter image description here

The App runs correctly.

After that, I tried to add the telemetry: project -> Add Application Insights telemetry

enter image description here

Following the wizard. I get the following error that I am not able to solve.

System.NotImplementedException: The method or operation is not implemented. at EnvDTE.SourceControl.CheckOutItem(String ItemName) at Microsoft.WebTools.Shared.VS.VisualStudio.Wrappers.VsSourceControlWrapper.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown

I tried to update the NuGet packages too. But nothing to do.

enter image description here

I have followed step by step the official Microsoft docs.

Some details for the installation process:

enter image description here

I'm having problems only with the .NET framework.

With .NET Core, anything works correctly.

Googling I didn't find any solution.

Upvotes: 3

Views: 1291

Answers (5)

Dirk Reuschling
Dirk Reuschling

Reputation: 48

I had the same issue with adding microsoft identity platform in VS 2022:

System.NotImplementedException: The method or operation is not implemented.
   at EnvDTE.SourceControl.CheckOutItem(String ItemName)

When I changed Tools/Options/Source Control from "None" to "git" (also when I am using Git with an external tool, the error was gone.

Upvotes: 2

Bram
Bram

Reputation: 1

I encountered this problem also. The work around that eventually worked for me was to add Application Insights in Visual Studio 2017, instead of in 2019 which I normally use.

Your error looks more of source control rather that the project. If you trying to work in source control and adding insights to already checked-in project, may be try creating a dummy project, and add insights to it. That will give more clarity on error, as well as help to pin-point exact issue.

That does not seem to be the case for me. I completely disabled source control and the problem still persisted. When I got the issue "fixed" by using VS2017 source control was running.

To me it looks just like one of a VS bug on a certain configuration. Try to uninstall whole VS and then install latest version again. Try another PC if you can.

I tried this, did not work for me.

Upvotes: 0

Anshul
Anshul

Reputation: 75

Choose the first option when adding insights, Application Insights SDK. That will install all the necessary packages. Once that's done, you will need to add instrumentation key to the config file. Add that on top.

Your error looks more of source control rather that the project. If you trying to work in source control and adding insights to already checked-in project, may be try creating a dummy project, and add insights to it. That will give more clarity on error, as well as help to pin-point exact issue.

Upvotes: 1

Wolfrevok Cats
Wolfrevok Cats

Reputation: 177

To me it looks just like one of a VS bug on a certain configuration. Try to uninstall whole VS and then install latest version again. Try another PC if you can.

Upvotes: 0

Sajeetharan
Sajeetharan

Reputation: 222582

There are some other dependencies you need to install as well,

Install-Package Microsoft.ApplicationInsights.DependencyCollector -Version 2.6.4
Install-Package Microsoft.ApplicationInsights.PerfCounterCollector -Version 2.6.4
Install-Package Microsoft.ApplicationInsights.Web -Version 2.6.4
Install-Package Microsoft.ApplicationInsights.WindowsServer -Version 2.6.4
Install-Package Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel -Version 2.6.4

Try as mentioned here

Upvotes: 2

Related Questions