Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve rzc generate exited code 1 error

When i pulled code from team explorer in visual studio code . Rzc generate exited code 1 error occured. I am unable to build project.how to solve this error? Target framework .net core 3.1

like image 353
Sonakshi Avatar asked Oct 21 '25 07:10

Sonakshi


2 Answers

Open the Project in visual studio-> check in views folder for any files having X - red color symbol then remove that file from visual studio.

Previously you deleted the files from folder - that is the issue.

ie, Razor Engine trying to render those files, but the engine could not find the physical location of that file, that is the problem. Always delete the unwanted files using the visual studio or any project editor. That is the best practice.

like image 129
Mahesan Rv Avatar answered Oct 23 '25 22:10

Mahesan Rv


I solved rzc generate exited with code 1 microsoft.net.sdk.razor.codegeneration.targets by undoing the changes that deleted a project from the folder in file explorer instead of visual studio.

like image 37
komoy Haye Avatar answered Oct 23 '25 22:10

komoy Haye