dotnet publish view compilation fails

Daniel Thompson's Avatar

Daniel Thompson

26 Apr, 2018 04:17 PM

Hi

I'm trying to get appveyor working on https://github.com/d4software/QueryTree. Checkout the appveyor file here: https://github.com/d4software/QueryTree/blob/master/appveyor.yml.

All I'm doing is a normal dotnet publish, but the build throws out hundreds of errors complaining about things like "Predefined type 'System.Object' is not defined" when trying to compile the views. This does not happen on our dev machines.

I've looked for examples and documentation that might help, but found nothing. What am I doing wrong?

-Dan

  1. Support Staff 1 Posted by Owen McDonnell on 26 Apr, 2018 10:18 PM

    Owen McDonnell's Avatar

    I forked this repo and got it to build successfully by removing the <preserveCompilationContext>false</preserveCompilationContext> line from QueryTree.csproj. I can't say i fully comprehend why but apparently its needed for runtime compilation of razor pages.
    FYI: I also had to modify your after_build script to - cmd: 7z a QueryTree.zip ./web/dist/ to get it to package properly.

  2. 2 Posted by Daniel Thompson on 27 Apr, 2018 08:32 AM

    Daniel Thompson's Avatar

    Awesome, thanks so much!

  3. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:28 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac