U4-10780 - System.InvalidOperationException: The view found at '~/Views/....cshtml' was not created

Created by Stephan 21 Dec 2017, 09:28:17 Updated by Sebastiaan Janssen 08 Jan 2018, 11:40:26

Subtask of: U4-9609

This exception has been reported from time to time though hard to repro.

See https://our.umbraco.org/forum/templates-partial-views-and-macros/84476-exception-views-was-not-created

Comments

Stephan 21 Dec 2017, 09:30:23

Root cause of the issue has (hopefully) been identified. Is linked to the fact that when models compilation fails for some reason, ASP.NET deletes the existing models DLL at some point, but we did not force views to recompile, so they would use reference a (now) non-existing DLL.


Stephan 21 Dec 2017, 09:32:29

PR https://github.com/zpqrtbnk/Zbu.ModelsBuilder/pull/161


Stephan 21 Dec 2017, 09:34:16

review: since the issue is pretty hard to repro, review should be a code review really


Stephan 07 Jan 2018, 17:38:56

PR has been updated (a few times) - issue was in the way we re-used an already compiled DLL when restarting a site (to avoid losing time recompiling) - on some occasions, and especially with IIS Express, the site temporary codegen directory changes, meaning the already compiled DLL is ''outside'' that directory. And then instanciating views (which depend on it) fails.

Have added more securities around re-using DLLs so that various situations such as IIS Express migrating the site to a different temp. codegen directory, or some models files being corrupted, etc - are all better handled.

Now works according to tests.


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 7.6.13, 7.7.8

Sprint: Sprint 75

Story Points: 2

Cycle: