New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It's not possible to rebuild a project with Umbraco Forms and RazorCompileOnBuild set to true #738
Comments
Thanks @Nashuim - this looks like an issue specific to Forms, so I've moved it to the appropriate tracker for the team to pick up soon! Thanks for the report! 👍 |
I couldn't replicate this with the latest release of Forms. We did make some amends to the targets file in that version for another issue, so perhaps it's resolved this too. But let me replay what I've done and if you think I've missed something that will show the issue please can you let me know?
|
This doesn't happen on Build. It's specifically for Rebuild. Try doing a rebuild using Visual Studio or alternatively try |
I'm also experiencing build errors when We're using Umbraco 9.3.1, Umbraco Forms 9.3.0. Errors:
The build fails in the It seems that the views are being deleted in the Forms Because running a clean then a build sequentially works correctly, I suspect that the |
Adding |
Thanks for the clarification and suggestions both. I can replicate with a rebuild as you say, and looks like we can resolve by amending the timing of the "copy views" step. We'll test and get this updated in a future release. |
Which exact Umbraco version are you using? For example: 9.0.1 - don't just write v9
9.3.1
Bug summary
It seems that there's some issues with the Umbraco Forms targets that only appear if you try to rebuild the project. Calling clean and then build work fine.
This happens in both visual studio and msbuild with /t:rebuild and only if you're compiling razor views on build.
Specifics
You get a error similar to this but the file seems to change:
Could not find a part of the path 'C:\play\UmbracoFormsTest\Views\Partials\Forms\Themes\default\Fieldtypes\FieldType.Recaptcha2.cshtml'. at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at Microsoft.AspNetCore.Razor.Language.DefaultRazorProjectItem.Read() at Microsoft.AspNetCore.Razor.Language.RazorSourceDocument.ReadFrom(RazorProjectItem projectItem) at Microsoft.AspNetCore.Razor.Language.DefaultRazorProjectEngine.CreateCodeDocumentCore(RazorProjectItem projectItem, Action1 configureParser, Action1 configureCodeGeneration) at Microsoft.AspNetCore.Razor.Language.DefaultRazorProjectEngine.CreateCodeDocumentCore(RazorProjectItem projectItem) at Microsoft.AspNetCore.Razor.Language.RazorProjectEngine.Process(RazorProjectItem projectItem) at Microsoft.AspNetCore.Razor.Tools.GenerateCommand.<>c__DisplayClass52_0.<GenerateCode>b__0(Int32 i) at System.Threading.Tasks.Parallel.<>c__DisplayClass19_01.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) --- End of stack trace from previous location --- at System.Threading.Tasks.Parallel.<>c__DisplayClass19_01.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica1.ExecuteAction(Boolean& yieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica.Execute()
Steps to reproduce
dotnet new umbraco --name MyProject
RazorCompileOnBuild
to trueExpected result / actual result
No response
The text was updated successfully, but these errors were encountered: