2

I need to validate razor views during application build, so I used the tool described in the following article: http://dotnetthoughts.net/compile-your-aspnet-core-mvc-views/ but postpublish is too late for me, so I moved dotnet razor-precompile into postcompile scripts section of project.json.

The problem is that even when razor-precompile writes some errors on the output, the build is still successful. I need to change this behavior, and I could implement a custom script to do that, but I can't figure out how to manually abort a build.

EDIT: The strange thing is that dotnet razor-precompile status code is 1, and it still doesn't make build unsuccessful.

Tseng
  • 61,549
  • 15
  • 193
  • 205
Dawid
  • 93
  • 4

1 Answers1

0

Yes, it is a known issue.

GitHub Issues 2836,443

As ASP.NET Core is moving from project.json to CSProj, ASP.NET team has closed the issue.

Anuraj
  • 18,859
  • 7
  • 53
  • 79