I have a really strange problem. If I create a .NET Core console app and change the target framework to .NET 4.6.2, I get the typical "your breakpoint will not currently be hit" warning, and indeed breakpoints are never hit. So basically:
- Create a Console App (.NET Core) using VS2017.
- Add a breakpoint somewhere.
- Debug it. The breakpoint is hit.
- Change the
<TargetFramework>
fromnetcoreapp2.0
tonet462
in the.csproj
. - Debug it (with breakpoint still there). The breakpoint is not hit.
I can consistently reproduce this on my machine, but a colleague of mine is following the same steps and not getting this on his machine.
I've tried all sorts of suggestions on Stack Overflow for dealing with typical "breakpoint will not be hit" scenarios, restarted VS, re-cloned the repo from scratch, restarted the whole machine, banged my head against the wall, and nothing worked.
So, I seem to have a problem specifically when retargeting an app, but it's strange that it didn't happen on a colleague's machine. Any idea what could be my problem?