0

Basically this:

  1. I created a fresh project in Visual Studio 2019 using the VSX c# template.
  2. I moved a bunch of files from an older VSX project (for VS 17).
  3. I compiled and ran the project - errors started emerging.
  4. I addressed one error, ran the project - got another error.
  5. I started addressing the second error and in the process of fixing it I noticed that now VS is for some reason compiling an unknown external project whenever I run my project. I realized it because once the program hit the error and instead of jumping into my code and showing me the line, it showed me this message: "The source file is different from when the module was built. Would you like the debugger to use it anyway?" Also whenever I changed something in my code files now - the changes never apply. Moreover, the first error (which I have already fixed) resurfaced again, and when the debugger tried showing me the place of the error - it clearly used the new file, thinking that it's an old one (even if I change the new file to have empty space in the line where the error was, the debugger will still stand on that empty line, talking about the error).
  6. Now whenever I create a new VSX project, even an empty one, and compile/run it - the studio runs that unidentified external project (I have absolutely no clue where that project is, even the files that the debugger uses have no influence on that project.

enter image description here

UPDATE: I deleted Visual Studio cache folders (C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\16.0_xxxx) as well as reset the experimental Visual studio with the start menu prompt "Reset Visual Studio 2019 Experimental Instance". Now, when I compile my VSX projects, a clean and empty Visual Studio instance is launched - my extension code is ignored.

cubrman
  • 884
  • 1
  • 9
  • 22
  • For ' Also whenever I changed something in my code files now - the changes never apply. ', try deleting **all** `Extensions` folders under `%LOCALAPPDATA%\Microsoft\VisualStudio\16.xxx` directory. It can help to delete the cache... – LoLance Oct 24 '19 at 09:34
  • @LanceLi-MSFT see the update. – cubrman Oct 24 '19 at 11:12
  • What's the result if you install the xx.vsix into current VS iDE after successful build? This test can help us to determine whether this issue is from the experimental instance or something else... – LoLance Oct 25 '19 at 11:21
  • To be honest I don't know what you are talking about. I have developed extensions in the past and all I did was create a project from template, write code and run the project (F5) and got the experimental VS running with my code in it. Right now I have tried cleaning cache, rebuilding my project - nothing helps, the code is ignored. – cubrman Oct 25 '19 at 11:37
  • Hi friend, have you tried a VS repair or VS update to check if it makes any difference, I never saw this strange behavior that we can't debug even one new empty vsx project, so I wonder if there's any possibility that something is broken with the IDE.. – LoLance Oct 28 '19 at 11:34
  • Well, that's what I arrived to. I've uninstalled VS19 and work in VS17 now. Once I have the time, I will try reinstalling VS19 again. – cubrman Oct 29 '19 at 13:02
  • Glad to know it works at least in VS2017, if the issue disappears after reinstalling VS2019 someday, please feel free to let us know :) – LoLance Oct 29 '19 at 13:30

0 Answers0