Last post Jul 26, 2017 02:53 AM by Jean Sun
Jul 25, 2017 03:59 AM|DarrenLC|LINK
I have installed all SPA Services at the command line using this in the command line:
dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
I have installed the Angular template into my project with:
dotnet new angular -all
I have restored packages from package.json.
I can see the Microsoft.AspNetCore.SpaServices reference in the nuget dependencies in solution explorer.
I have built the solution.
The targeted framework is .NetCoreApp 1.1
However, in the Startup.cs file, I am getting the error shown in the Header of this post. Also, when I open Object Browser, I can see many Microsoft.AspNetCore entries, but there is no Microsoft.AspNetCore.SpaServices.
Jul 26, 2017 02:53 AM|Jean Sun|LINK
Try adding "preserveCompilationContext": true in your project.json or csproj
preserveCompilationContext is required when you are using Razor or any other type of runtime compiling. Without it, runtime compilation will fail.