-
Notifications
You must be signed in to change notification settings - Fork 22
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
Hosting Startup is not working in dotnet core 3.0 Azure App Service (System.MissingMethodException: Method not found) #52
Comments
@valeriob, Thanks for your report. Hosting startup is not supported in 2.0.0-beta1. Please follow the example of Quick Start to enable Profiler. Also, could you please tell us what is the reason for you to choose to use hosting startup? It will help us decide what's the next priority. Thanks! |
I like it because it's automatically enabled via env variable on production environment, so it will not run during development, and it's non invasive, can be enabled/disabled in prod without code deploy. |
Thanks @valeriob for your feedback. Just in case you don't know, this environment variable can be used as a kill switch of the profiler:
Check out the documentation: Configuration References. |
I'm trying 2.0.0-beta2, but it does not work with dotnet core 3.0, i get this error during startup : System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Diagnostics.PerformanceCounter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.' |
@valeriob That is interesting. Let's troubleshoot. |
Hi, dotnet --info : Runtime Environment: Host (useful for support): .NET Core SDKs installed: .NET Core runtimes installed: |
Yes, i never run as admin. |
By 'vs', I think you mean Visual Studio? Could you please share the version number for VS? To sort out visual studio magics, in the project folder, run:
Does it work? Also, could you please paste your project file(*.csproj), just want to see project references and that may help us repro the issue here. |
Yes, visual studio 16.3.6, and it does not work with dot net run eather. |
@valeriob I tried the same steps in VS 16.3.6 and it worked for me. There must be something I missed. Let me share my project and you can compare it with yours. At the same time, if you will to, share the project with me and I can take a look at it for you as well. |
Hi xiaomi, I suggest to upgrade the nuget package to reflect the real version dependency. |
@valeriob Oh~ that is why. That makes sense. I'll look into how to get that fixed. |
Hey @valeriob, just FYI, the hosting startup for .NET Core 3.x is coming soon in version 2.1.0-*. |
Thanks! i'll keep an eye on that ! |
Hi,
i'm using the Microsoft.ApplicationInsights.Profiler.AspNetCore 2.0.0-beta1 in azure App Service with configured runtime netcore 3.0 and the following environment variable
ASPNETCORE_HOSTINGSTARTUPASSEMBLIES=Microsoft.ApplicationInsights.Profiler.AspNetCore
It fails with this exception :
Everything works fine if i disable it (by removing the env variable above).
Thanks
The text was updated successfully, but these errors were encountered: