5

I currently work on an ASP.NET application that contains 2 projects in its solution: a Web Application and a WebAPI. (let’s call them “projectWeb” and “projectAPI” )

I‘ve tried to include a reference to “projectWeb” into “projectAPI”.

When I build “projectAPI” the browser displays this message :

Compilation Error

Description: An error occurred during the compilation of a resource required to >service this request. Please review the following specific error details and >modify your source code appropriately.

Compiler Error Message: The compiler failed with error code -532462766.

When I delete the reference there is no error anymore.

What can I do?

Thank you all

Laurent

laurentmasset
  • 51
  • 1
  • 1
  • 2
  • I don't know for what reason you need add web project reference to webapi project but this is weird. You shouldn't be adding web project's reference to web api. If required refactor dependencies into separate library project. – Pankaj Kapare Mar 17 '16 at 13:58
  • Does this answer your question? [Compiler Error Message: The compiler failed with error code -532462766](https://stackoverflow.com/questions/43328087/compiler-error-message-the-compiler-failed-with-error-code-532462766) – Alex Apr 12 '20 at 09:17

1 Answers1

10

Realize this is an old question but wanted to share some info that helped me resolve this same error. I couldn't narrow down the issue to which .dll was causing the problem but everything resolved once the nuget packages were removed. Something was causing the error so removing and re-adding packages did the trick. Spent countless hours on this error so hope this helps someone else who runs across it.

DannyC
  • 401
  • 4
  • 15
  • 8
    I can confirm this did the trick. I used the solution provided in this answer [https://stackoverflow.com/questions/6876732...](https://stackoverflow.com/questions/6876732/how-do-i-get-nuget-to-install-update-all-the-packages-in-the-packages-config): `Update-Package -reinstall`. Just wait for a couple minutes and then re-publish everything and it will start working. – tfrascaroli May 25 '17 at 15:09
  • I also lost hours on this too. In my experience I found it was VBCSCompiler.exe in the `bin\rolysn` folder that was getting locked as I'd updated Microsoft.NET.Compilers and was jumping between that commit and a previous one (trying to troubleshoot something else). – Braydie Jun 01 '20 at 18:58
  • I restarted my computer and the issue went away. Probably due to the locking issue mentioned in the previous comment. I was working on a blazor project and got this error when I ran dotnet watch. – Jason Gallavin Oct 11 '21 at 15:24