Skip to content

Patching Visual Studio

Andrew Wang edited this page Sep 4, 2020 · 6 revisions

Patching an experimental VS instance with a new version of the MIEngine is super easy - just hit F5 in the MIEngine solution. But after you think your changes are ready, you might want to patch the regular (non-experimental) VS instance. This page provides instructions on how to do this.

Important notes

  • The open source MI Engine project is not an official Microsoft product and therefore is not officially supported by Microsoft. Though you can certainly open issues in this repo if you encounter problems.
  • This is not an appropriate mechanism to broadly distribute an updated MIEngine. This is meant for development and testing purposes only.
  • To avoid getting your Visual Studio instance in an inconsistent state, please restore back to an official version before installing Visual Studio updates (see last step of instructions).
  • This will break parts of Visual Studio that depend on MIEngine. Currently this is Android Java debugging.
  • If you are only interested in doing a quick one-time test, you can just F5 the MIEngine solution instead. This will launch an 'Experimental' instance of VS. See the tutuorial for more information.

Instructions

  1. If you haven't already, clone this project. To clone from the Microsoft fork: git clone https://github.com/Microsoft/MIEngine.git

  2. Follow the instructions to build the project. For daily usage of MIEngine, you may want the Release configuration rather than Debug. The rest of the instructions in this page will use Release.

  3. Choose the instructions in the next step based on the version of Visual Studio you are using.


Visual Studio 2019

Option 1: F5

You can F5 the solution and it will start an experimental instance of Visual Studio with the MIEngine bits patched.

Option 2: Manually patch the files.

You can open the solution file MIDebugEngine.sln located under src and change the configuration and build. You will want to look in the bin\Debug folder for the compiled bits. Copy these files to <Visual Studio Root>\Common7\IDE\CommonExtensions\Microsoft\MDD\Debugger

  • Microsoft.MICore.dll
  • Microsoft.MICore.XmlSerializers.dll
  • Microsoft.MIDebugEngine.dll
  • vscode\OpenDebugAD7.exe
  • vscode\Microsoft.DebugEngineHost.dll
  • vscode\Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.dll

Visual Studio 2017 and 2015

  1. Run C:\proj\MIEngine\bin\Release\drop\Install.cmd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise" Where C:\proj\MIEngine should be replaced with whatever the root of your MIEngine repository is and "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise" should be replaced with the root of a VS 2015 or VS 2017 install. See Install.cmd /? for more information.
  2. When you are done with your private version of the MIEngine, restore back by running C:\proj\MIEngine\bin\Release\drop\Install.cmd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise" /restore.