Visual Studio IntelliSense: ASP.NET runtime error Loading this assembly would produce a different grant set from other instances

0

I am getting a strange error in Visual Studio 2015. My project is an ASP.NET C# Web Forms project, and I have recently migrated from .NET 4.5 to .NET 4.6.1

When building and executing the project, I have no problems. But IntelliSense is doing strange things. In every .aspx file, I get the error:

ASP.NET runtime error: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)

In addition, when I try to do Ctrl+K, Ctrl+D to format the code, IntelliSense starts logging several validation errors, like:

Unrecognized tag prefix or device filter 'telerik'.

I have tried to removed the .suo file, to delete reflected schemas, and to cancel and reinstall referenced dlls using NuGet. Nothing changes.

There are no problems with .cs files, only with .aspx and only inside Visual Studio (I can compile, debug, and execute without any problems).

Any idea?

c#
asp.net
visual-studio
intellisense
asked on Stack Overflow Jun 9, 2018 by Faber • edited Jun 9, 2018 by player0

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0