-
Notifications
You must be signed in to change notification settings - Fork 2
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
Views and partials not transferred from repository to live/wwwroot #457
Comments
You have cut off the most interesting part of the screenshots 😅 .... can you post two things to help me check what is going on
|
@sitereactor the location of Views/Partials folders in Kudo is this: Repository wwwroot The project structure locally is like this: The UmbracoProject.csproj file:
ModelsBuilder mode is set to
|
@sitereactor okay, so I just changed this part in UmbracoProject.csproj so
I deployed this change and now the template views and partial views are copied to I guess only |
@bjarnef @sitereactor This is a duplicate of my issue #455. Pasting that here as this one got the attention: On the v9 launch event one of the speakers said view compilation is disabled by default, but you recommend enabling it for production, so I went looking... In the default csproj file you get with a v9 project on Cloud you get this: <!-- Set this to true if ModelsBuilder mode is not InMemoryAuto-->
<PropertyGroup>
<RazorCompileOnBuild>false</RazorCompileOnBuild>
<RazorCompileOnPublish>false</RazorCompileOnPublish>
</PropertyGroup> I don't want
All of that makes sense from a pure ASP.NET point of view, but when you try to transfer content from your local environment to live using Umbraco Deploy, it checks that the *.cshtml files are the same in both environments. If they're missing on Cloud you get an error and Deploy doesn't work, so you can't use compiled views and the advice in the csproj file is leading to an error. Either Deploy needs to be updated to be aware of this, or the *.cshtml files need to always be copied. The latter seems like a better solution since the check by Deploy that the files are up-to-date is a useful one. |
Looks like we need to have this in the csproj file
|
Howdy there 🤠 Looks like a lot of water has flowed under the bridge since the last update on this issue. From what I can tell, we took a suggestion from @bergmania and added it to the template. I’m going to assume this ticket has been solved. If not, please feel free to reopen it 👍 Kind regards, |
Issue description
I am migrating a project from Umbraco v8 to v9 and almost got it working.
I have deployed revisions which are extracted on live/remote environment on Umbraco 9.
I have also deployed existing template views and partials to remote environment, which end up just fine in
/site/repositiory
when looking in Kudo. The templates are also moved to/site/wwwroot
, but these are empty and the partials are not transferred./site/repository
/site/wwwroot
So it looks like this in backoffice:
The text was updated successfully, but these errors were encountered: