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

前端 未结 3 1937
情深已故
情深已故 2021-02-14 18:59

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

相关标签:
3条回答
  • 2021-02-14 19:32

    I figured out how to fix it. I went into the project properties, under Assembly and set the Neutral language - in my case to English - United States.

    Problem solved!

    0 讨论(0)
  • 2021-02-14 19:38

    I could reproduce the error - note: I'm in the UK:

    • Start a new windows forms project.
    • Set the form to localizable True.
    • Set the language to English.
    • Set the form title to English.
    • Set the language to English (United States)
    • Set the form title to English (United States)
    • Set the language to English (United Kingdom)
    • Set the form title to English (United Kingdom)
    • Add a click handler for the form.

    .

    Private Sub Form1_Click(sender As Object, e As EventArgs) Handles Me.Click
       Dim test As DateTime = Now
       Debugger.Break()
    End Sub
    

    Run the project and click the form - the watch window will display the error, and the popup over test will not show the date.

    I've fixed my projects by removing unnecessary localisation. I guess it was adding English and English UK versions of the resources.

    Edit: this worked for the simple cases, but some of the projects I maintain have circular dependencies. Yuck. In this situation, building any of the projects would pull in the unwanted resource dlls from a referenced project. To break the cycle I just deleted the unwanted dlls from the referenced project's bin folder before building, so that they are not copied in. I've 'sent a frown' to microsoft describing this problem. I've spent a day and a half now tidying up the mess...

    0 讨论(0)
  • 2021-02-14 19:49

    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.

    0 讨论(0)
提交回复
热议问题