We're running our page with InMemoryAuto and know the limitations in regards to Intellisense in VS. But now a new problem has occurred with this.
Before, we would just get a warning about the missing model name but still get valid intellisense in the razor file for the rest of the code. But now suddenly everything is red lined and shows this missing model name making intellisense completely broken:
So if i mouse over any line in the file, all i will get is the message with the missing model in namespace.
I am not sure when this changed exactly, but before i wouldn't get this red lining through out the whole file.
Anyone who knows how to prevent this without changing away from InMemoryAuto?
I always just left the ; there as it is added by default when Umbraco creates a new template. It doesn't seem to matter if the using statements end with the ; or not.
I regards to the intellisense problem, i think a solution that would work for us might be to run our dev. environment with SourceCodeManual and our live environment with InMemoryAuto and make sure not to use the strongly typed model when developing.
Curious to why you want to run with InMemoryAuto in your live environment if you have no problems using SourceCodeManual in development?
Usually we use SourceCodeManual in development, and Nothing in production. This ensures, that the live site doesn't waste ressources trying to generate models, in stead it just uses the one we manualle generate in development.
If you combine it with InMemoryAuto, you could end up having conflicting models.
Intellisense problem with InMemoryAuto
Hi,
We're running our page with InMemoryAuto and know the limitations in regards to Intellisense in VS. But now a new problem has occurred with this.
Before, we would just get a warning about the missing model name but still get valid intellisense in the razor file for the rest of the code. But now suddenly everything is red lined and shows this missing model name making intellisense completely broken:
So if i mouse over any line in the file, all i will get is the message with the missing model in namespace.
I am not sure when this changed exactly, but before i wouldn't get this red lining through out the whole file.
Anyone who knows how to prevent this without changing away from InMemoryAuto?
try removing the
;
from the end of your@using
lines, they shouldn't be thereHi Huw,
It does no fix the problem sadly.
I always just left the ; there as it is added by default when Umbraco creates a new template. It doesn't seem to matter if the using statements end with the ; or not.
I regards to the intellisense problem, i think a solution that would work for us might be to run our dev. environment with SourceCodeManual and our live environment with InMemoryAuto and make sure not to use the strongly typed model when developing.
Curious to why you want to run with InMemoryAuto in your live environment if you have no problems using SourceCodeManual in development?
Usually we use SourceCodeManual in development, and Nothing in production. This ensures, that the live site doesn't waste ressources trying to generate models, in stead it just uses the one we manualle generate in development.
If you combine it with InMemoryAuto, you could end up having conflicting models.
Yeah you're right, i have been thinking about this too after i tried switching to sourceManual now.
We never change the model in our live environment for the same reasons. So it makes sense to set it to nothing for live.
is working on a reply...