Error when building and debugging project in Visual Studio: Loading this assembly would produce a different grant set from other instances

0

I am working on my project in Visual Studio 2013, and vb.net. Everything is fine until today. My computer auto updated itself yesterday and I got this error when I try to debug my project today.

Error   1   The "ResolveComReference" task could not be instantiated from "Microsoft.    
Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". 
Loading this assembly would produce a different grant set from other instances. (Exception 
from HRESULT: 0x80131401)   Proj1

Does anyone know what is causing this error and how can I fix it?

vb.net
visual-studio-2013
asked on Stack Overflow Jul 15, 2015 by bill • edited Jul 15, 2015 by Thraka

2 Answers

0

Check the project references if all exists for the correct version

answered on Stack Overflow Jul 15, 2015 by Jure Potocnik
0

I was facing the same issue. Following are the steps which sorted my issue:

  1. In Website web config file Changed identity impersonate="true" to identity impersonate="False"
  2. rebuild it & again changed it to identity impersonate="False" to identity impersonate="True"
  3. Closed the application.
  4. Delete temporary Internet files(V4.0.0.0 as I was using VS 2010).
  5. Restarted IIS.
  6. Opened Application & rebuild it.
  7. Build Succeeded.

Hope it helps.

answered on Stack Overflow Sep 14, 2015 by neonil

User contributions licensed under CC BY-SA 3.0