Optimizing assemblies for performance failed. You can either exclude the failing assemblies

Posted by Raja under Error and Solution on 5/4/2020 | Points: 10 | Views : 6791 | Status : [Member] | Replies : 0

I was getting below error all of a sudden when trying to publish my .net mvc core 3.x project. The build was working fine, only Publish had a problem.

Severity	Code	Description	Project	File	Line	Suppression State
Error Error: compilation failed for "\packages\microsoft.codeanalysis.visualbasic\1.3.0\lib\netstandard1.3\Microsoft.CodeAnalysis.VisualBasic.dll" (0x80004005)

Severity Code Description Project File Line Suppression State
Error Optimizing assemblies for performance failed. You can either exclude the failing assemblies from being optimized, or set the PublishReadyToRun property to false.

Earlier my project used to be published but this error came just today. After struggling a lot I was able to solve it by following below steps

Step 1: Installing latest version of Microsoft.CodeAnalysis.Common from NuGet packages

Step 2: Installing latest version of Microsoft.CodeAnalysis.VisualBasic from NuGet packages.

Now, I published the application and everything was fine.

Regards,
Raja, USA



Responses

(No response found.)

Login to post response