I suddenly started experiencing this error in Visual Studio 2015 and 2017, when trying to move the yellow cursor (next statement) in debugmode.
The code I want to move over is nothing special (i.e does not include any try-catch and/or exception statements) and stepping through the code (F10, F11) works normally.
Here is a code sample:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ddlCountry.SelectedIndex = 0;
ddlCountry.DataSource = new List<string>() {"Germany", "Japan"};
ddlCountry.DataBind();
}
}
The solution contains multiple web projects and console projects, but the error does not occur in the console projects - only in the web projects. I.e in the console projects, I can move the yellow cursor with no problems.
When I try to do the same in any other solution, I have no problems, so it seems to be something related to my current solution.
These are the things I tried so far:
All the suggestions I found on Google have not proved very helpful in solving this issue, so if anyone here can assist, I would be really glad.
I had it on vs2022, Restarting vs2022 solved it, Microsoft should fix it or at least give this solution in the error message at least.
Deleting bin and obj folders from project can fix a lot of issues
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With