Error with .Net Framework 4.6.2

Hi team,

I have web site built in ASP.Net MVC on .Net Framework 4.6.2. I have installed the latest nuget package of Sentry in the solution as per documentation given on the Sentry site. I have added the “Sentry.Init” call in a function and my solution is compile and build successfully. However when I am opening the WebSite it is throwing the following exception.
Compiler Error Message: CS0012: The type ‘IEnumerable<>’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’.

When i removed the " “Sentry.Init” call, the web site is working fine. I cannot update the framework version of my solution. Please let know the fix for this issue,

Thanks,
Alok…

This seem like a tooling issue. Are you using Visual Studio 2019 to build this?
In this repository we have samples with ASP.NET MVC: https://github.com/getsentry/sentry-dotnet-samples/

We are using Visual Studio 2017 version 15.9.16. I have seen the sentry samples however getting error while calling the “sentry.init” in my code.

I suggest trying VS 2019. I’m unsure of versions of VS 2017 are actually compatible with the new NuGet packages but some upgraded is required.
For example: https://github.com/dotnet/standard/issues/481

Hi Bruno,

Is there any other way to fix i.e. without upgrading Visual Studio?

Thanks,
Alok,…

If you’re on the latest version of VS 2017 might be enough. I suggest reaching out to the .NET team to get the right requirements if it’s not available online.