Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 Errors in watches and no value pop-up when I hover over variable. BC32208

I'm having difficulties with serveral of my VB.Net projects that I have upgraded to Visual Studio 2015. These projects have be upgraded over many years from visual studio 2003 to 2005 to 2010 to 2012. The code will compile and run without error. Debug.Print statements correctly write values to the immediate window. However, if I enable a breakpoint and try to look at any value in the watch window then I get an error like this one, reported in the watch window's value column:

error BC32208: Project already has a reference to assembly 'projectname.resources'. A second reference to 'projectname.resources.dll' cannot be added.

Similarly, if I break into the code and hover the mouse over a variable name then I do not get a pop-up containing the variable's current value.

My projects without resources have upgraded without any problems.

Has anyone met this problem? Has the way that resources are stored in a project changed in 2015?

like image 997
jo0ls Avatar asked Jul 27 '15 10:07

jo0ls


People also ask

How do I view errors in Visual Studio?

To display the Error List, choose View > Error List, or press Ctrl+\+E.

How do I get a watch window in Visual Studio?

It's available from Debug | Windows | Watch | Watch 1 or Ctrl + Alt + W + 1. There are 4 watch windows in Visual Studio, which you can use in different contexts (Watch 1, Watch 2, etc.). Any expression can be entered into the watch window.


1 Answers

FYI, I've just committed a fix for this that will ship in VS 2015 Update 2 (see https://github.com/dotnet/roslyn/commit/e683a8438d42d92a3d142ba53f38b33315c7dea2).

Another possible work-around for this issue in the meantime is to strong name sign your app (and the satellite assemblies). The debugger was correctly ignoring the multiple resource dlls in the strong name case but not in the "weak" name case.

like image 167
Kevin Halverson Avatar answered Nov 16 '22 03:11

Kevin Halverson