question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Instrumenting ASP.NET Core Views.dll takes >20 minutes

See original GitHub issue

On both Azure DevOps and GitHub Actions I am coming across the same issue. Since upgrading to ASP.NET Core 3.1, calling the following code takes over 20 minutes to execute, and will often cause the build to fail due to timeout:

dotnet test --configuration Release /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:Exclude="[ActionsTest.Views.dll]*%2c[xunit.*]*"

The Solution contains one ASP.NET Core 3.1 application, and a number of .Net Standard 2.0 class libraries. By running dotnet test on each project individually, it is only the ASP.Net Core project that takes so long (all the others take a reasonable length of time to complete, a few seconds to 1-2 minutes for a large one).

By setting the verbose flag, I can see that the line that takes to long is the second line (I’ve added the previous line to show the timestamp):

Mon, 16 Mar 2020 15:25:11 GMT
[coverlet] Instrumented module: 'D:\a\ActionsTest\ActionsTest\tests\ActionsTest.Test\bin\Debug\netcoreapp3.1\ActionsTest.dll'
Mon, 16 Mar 2020 15:49:44 GMT
[coverlet] Instrumented module: 'D:\a\ActionsTest\ActionsTest\tests\ActionsTest.Test\bin\Debug\netcoreapp3.1\ActionsTest.Views.dll'

It seems that

  1. the Exclude parameter isn’t excluding the ActionsTest.Views.dll assembly, and
  2. Instrumenting *.Views.dll takes a huge amount of time

Please let me know if you need any more information.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
nheath99commented, Mar 18, 2020
  1. My mistake, it was a typo (I missed the final quote ")
  2. Yes I was aware of this, I was just surprised that the length of time to cover a ASP.Net core 3.1 was significantly higher than before, and other .net core projects - I do not have many loops or particularly slow code, maybe I can have a look at this in the future.
  3. Yes you are right, I get the expected coverage file at the end.

PS thank you for your work on this project, it’s really appreciated 🙂 PPS I hope the current situation in Italy improves soon! 🙏

0reactions
MarcoRossignolicommented, Mar 19, 2020

PS thank you for your work on this project, it’s really appreciated 🙂

Thank’s for patience and for using coverlet

PPS I hope the current situation in Italy improves soon!

Thank’s we’re fighting, we’ll make it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Instrumenting ASP.NET Core Views.dll takes >20 minutes
The Solution contains one ASP.NET Core 3.1 application, and a number of .Net Standard 2.0 class libraries. By running dotnet test on each ......
Read more >
First request slow when importing Razor views from class ...
This solution improves the first request rendering time from ~3 seconds to 1.1 seconds. So much faster, but still a lot slower compared...
Read more >
How to Monitor a .NET Core Application | New Relic
NET Core quickstart to instrument a Docker container running an ASP.NET Core web app. These are the steps you'll complete: Log in to...
Read more >
Razor: Compiler no longer produces a Views assembly
The Razor compiler no longer produces a separate Views.dll file that contains the CSHTML views defined in an application. Version introduced.
Read more >
Quickstart: Installing New Relic on an ASP.NET web app ...
In this article, you'll explore New Relic, one of the leading observability platforms, and learn how to quickly configure it on an ASP.NET...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found