ASPNETCOMPILER : error ASPRUNTIME: The application domain in which the thread was running has been unloaded

Template for a good bug report, formatted with Markdown:

  • versions used ( sonarqube-8.9.0.43852 , sonar-scanner-msbuild-4.7.0.2295-net46, sonar-scanner-msbuild-5.3.1.36242-net46 ) tried all last 3 versions of .net scanner
  • error observed
    ASPNETCOMPILER : error ASPRUNTIME: The application domain in which the thread was running has been unloaded.

4 Warning(s)
1 Error(s)

  • steps to reproduce
    Create a project, scan the project and sometimes the build completed with 135 warranings no 0 error, sometimes it gives the error
    ASPNETCOMPILER : error ASPRUNTIME: The application domain in which the thread was running has been unloaded.

but when no erros while we build, and then execute the SonarScanner.MSBuild.exe end command, it fails with the below error…
SonarScanner for MSBuild 4.7
Using the .NET Framework version of the Scanner for MSBuild
Post-processing started.
The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:

  1. The project has not been built - the project must be built in between the begin and end steps
  2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0.25420.1 and higher are supported.
  3. The begin, build and end steps have not all been launched from the same folder
  4. None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln)
    Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
    11:37:54.564 Post-processing failed. Exit code: 1

How do i mention the sln file in the SonarScanner.MSBuild.exe end command.

Hi @manoj.p - welcome to the community.

Apologies for the delay in replying. I’ve added some tags to the thread so that it will be brought to the attention of the appropriate internal team.

Analyzing legacy ASP.NET projects (i.e. those that do not have an MSBuild project file) is not supported. See this thread for more information. If you have other non-ASP.NET projects then they should be analyzable.

I doubt that the intermittent ASPNETCOMPILER error has anything to do with the scanner as it won’t be invoked at all for legacy ASP.NET project types.

This topic was automatically closed after 3 days. New replies are no longer allowed.