lijunle / Vsxmd

VS XML documentation -> Markdown syntax.
MIT License
215 stars 51 forks source link

Getting `command exited with code -2147450726` for `Vsxmd.exe` #92

Closed astrohart closed 2 years ago

astrohart commented 2 years ago

I am writing an application that is targeting .NET Framework 4.8 -- and the following is a compiler error I am receiving on each of the supporting class libraries (this is just from one of them):

The command ""C:\Users\Administrator\source\repos\MyRepo\MySolution\packages\Vsxmd.1.4.5\build\/../tools/win-x64/Vsxmd.exe" "bin\Debug\MyClassLibrary.xml" "" """ exited with code -2147450726.     

What could be causing this?

I've made sure to have the latest .NET Framework, .NET Core runtimes installed and I also used the Visual Studio Installer to make sure

I've deleted the packages folder and done Update-Package -Reinstall in Package Manager Console, to no avail. The solution contains 60+ projects, so I am not willing to convert them to PackageReference since there is no functionality in Visual Studio to do a mass conversion of all projects that need it; you have to do them one by one, by hand.

Any thoughts?

Brian Hart

astrohart commented 2 years ago

To make the errors go away, I did the following:

  1. Exit all currently-open instances of Visual Studio.
  2. Click the Start menu, and then type cmd.
  3. Right-click the Command Prompt icon that appears in the search, and then click Run as Administrator.
  4. In the Command Prompt window, type:
    C:\>RD /S /Q "%TEMP%"
  5. Press the ENTER key on the keyboard.
  6. Repeat steps 4 and 5.
  7. Relaunch Visual Studio, and open the Solution you were building when the errors first appeared.
  8. Build or Rebuild (as applicable) the Solution.
  9. There should be no more errors.
Elanis commented 9 months ago

Opening a Command Prompt window 'as administrator', with VS2019 open, and doing:

C:\>RD /S /Q "%TEMP%"

and pressing ENTER, made the error messages go away.

Note: you don't need to remove the whole temp directory, but only the .net/Vsxmd subdirectory

astrohart commented 9 months ago

Opening a Command Prompt window 'as administrator', with VS2019 open, and doing:


C:\>RD /S /Q "%TEMP%"

and pressing ENTER, made the error messages go away.

Note: you don't need to remove the whole temp directory, but only the .net/Vsxmd subdirectory

Good point.

However, I have found that this command usually is quicker to run.

Also, any files that are still in use by other applications will not be removed.

Furthermore, in my post above, I forgot to add that it helps to exit out of all open Visual Studio instances first --- before running the command.