RazorGenerator.MsBuild not PreCompiling Views in Azure DevOps Build
Hello, I'm using the latest RazorGenerator.MsBuild NuGet package and when I compile the MVC solution in Visual Studio I see the obj\CodeGen directory. However, when I run the build in Azure DevOps, which uses MSBUILD, I'm not seeing the obj\CodeGen directory. In the build solution step, I don't see anything in the logs related to "precompile". However, in the publish solution step, I do see this line: "Skipping target "PrecompileRazorFiles" because all output files are up-to-date with respect to the input files." How can I get the publish step to run PrecompileRazorFiles instead of skipping it?
Do you have a <RazorViewsCodeGenDirectory> property in any of your .csproj, .props, or .targets files?
What happens if you do a command-line build (outside of Visual Studio) on your dev machine using the same build commands as Azure DevOps?
@bsulliva One thing to check is that you are doing a nuget restore step in your build script. If not, you will be relying on restore on build, which won't bring in the package early enough for it to work. I think this is why you don't see it in your build step, but do in the publish step.