0

I use Visual Studio 2022. In a .NET Standard project, during debugging, I'm trying to edit a simple code (eg. set int a = 1), but it doesn't work and I get an error

Unable to set next statement. The method or operation is not executed

However, in a .NET framework project, I can easily do that.

I wish I could edit the code during debugging without rebuilding the project

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Thofro
  • 1

1 Answers1

0

I can reproduce the situation on my side. This issue may comes from some settings you made before.

1,Reset the entire collection of settings.

enter image description here

enter image description here

enter image description here

enter image description here

And to make sure not effected by the settings of the async user's settings, please turn off the user settings async:

enter image description here7

enter image description here

2,Delete bin and obj folder of your projects.

This step is to make sure all of the previous pdb files have been cleaned.

3,Make sure you are based on Debug not Release.

enter image description here

After the above steps, the hot reload of Net standard class library will work fine on my side.

And also please make sure there is no strange extension be installed, because some extension will also affect on this.

Bowman Zhu-MSFT
  • 4,776
  • 1
  • 9
  • 10