-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NetCore 3.1 incompatibility with SDK dependencies? #1699
Comments
This is the full verbose log: System.Data.SqlClient
System.Diagnostics.PerformanceCounter
System.IO.FileSystem.AccessControl
|
This is super confusing. I'm trying to make sense of the verbose log. I have this test app:
Microsoft.ApplicationInsights.AspNetCore depends on Microsoft.ApplicationInsights.DependencyCollector depends on Microsoft.Data.SqlClient (v4.3.1).
So I tested a local build using SqlClient package version v4.7.0.
Also worth noting, when I downgrade my test app from netcoreapp3.1 to netcoreapp3.0, this problem goes away. Open Questions
|
Reaching out to dotnet runtime for help... @joperezr do you have any thoughts? |
|
I had a bit more time to look at this today. The problem in here seems to be different than #1707. To start, the first problem here is that you shouldn't be setting the property Secondly, the reason why you won't be able to repro this on 2.x but you are able to do it when targeting netcoreapp 3.x is because we actually made a change on 3.x that changed the way we build our .NET Framework compatibility shims and introduced one regression which I explain in more detail here but basically it kind of makes you have to reference the packages that we ship with 3.x so that everything works smoothly. It would be really rare to hit issues, but if you do, they would happen only in the case that your netcoreapp3.x app is also using a .NET Framework library which relied on using our compatibility shims to run, which isn't super common. Thirdly (and kind of an extension to the second point), the App Insights package hits this because it references very old versions of System.Data.SqlClient (4.3.1, new package version is 4.8.1), System.Diagnostics.PerformanceCounter(4.5.0, new package version is 4.7.0), and System.IO.FileSystem.AccessControl (4.5.0, new package version is 4.7.0). This means that in order to fix this issue, and also to follow the .NET recommendations of always trying to reference the latest package versions (which most of the times contain fixes and improvements), App Insight's packages should reference these new versions:
Making the above suggestions will fix the potential runtime issues and ensure that the appInsights packages will work fine in netcoreapp3.1, and as an aside recomendation @SamShekhovtsov should remove the |
I merged a fix for this. |
@ericstj just as FYI, App Insights team have fixed the issue with referencing old OOB packages that we were talking about. |
@TimothyMothra still getting this error on Azure App Service with a 3.1 app using 2.14 package. What do I do? |
@georgiosd can you please share your logs? |
Not sure what you mean. There's nothing at compile time. Then after it's been deployed to Azure App Service:
I have set the app service config (from portal) to 64-bit and installed the 64-bit 3.1 runtime extension. I have also tried tried specifying EDIT: the only way I could make it work was by completely disabling APM with App Insights from the App Service control. It's very frustrating to be using the latest and greatest, on the native hosting environment and have it not work... |
This issue was originally reported on Azure docs
@SamShekhovtsov reported an issue:
I was unable to reproduce this in a new web application with default settings.
@GoguX was able to reproduce this:
The text was updated successfully, but these errors were encountered: