In my cake script, I can't use CompileRenderAsync.
Closed this issue ยท 6 comments
Describe the bug
One or more errors occurred. (Can't load metadata reference from the entry assembly. Make sure PreserveCompilationContext is set to true in *.csproj file
To Reproduce
Use CompileRenderAsync in cake script file.
Expected behavior
Works and create expected result.
Information (please complete the following information):
- OS: macOS Big Sur Version 11.0.1
- Platform NET Core 2.1
- RazorLight version 2.0.0-beta1
- Are you using the OFFICIAL RazorLight package? https://www.nuget.org/packages/razorlight YES
- I use Cake.Core.0.26.0
Where should I add the PreserveCompilationContext file in cake script? By the way I used it for create a csproj file from cshtml template.
Use Cake Frosting. Don't use Cake Script.
Please confirm this works for you.
@stugcearar Happy end of year - any chance you can let me know if using Cake Frosting works?
Hello @jzabroski, I am working on it. I will post the result later today. Thanks!
Please use RazorLight 2.0.0-rc.3 as well. Thank you and I will try to see what you have to say.
Hello, it is working. Thanks ๐๐ป
@stugcearar Thank you! Feel free to publish a gist or pull request to demo it for others. Thanks.