Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kåre Mai 42 posts 280 karma points
    Aug 16, 2024 @ 06:41
    Kåre Mai
    0

    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:

    Intellisense

    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?

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Aug 16, 2024 @ 06:59
    Huw Reddick
    0

    try removing the ; from the end of your @using lines, they shouldn't be there

  • Kåre Mai 42 posts 280 karma points
    Aug 16, 2024 @ 07:13
    Kåre Mai
    0

    Hi 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.

  • Søren Kottal 712 posts 4570 karma points MVP 6x c-trib
    Aug 16, 2024 @ 09:15
    Søren Kottal
    100

    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.

  • Kåre Mai 42 posts 280 karma points
    Aug 16, 2024 @ 09:17
    Kåre Mai
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft