首页 > 解决方案 > Office JS Addin Project will not start in VS 2019 but works fine in VS 2017

问题描述

I am unable to start a debugging session for the Office project in Visual Studio 2019 but it work fine from the same project in VS 2017. We have the enterprise version for both if that matters. This presents itself with the basic Office Excel Addin project type so is easy to reproduce.

Environment

Steps to Reproduce issue

  1. Start VS 2019
  2. Select Create New Project
  3. Select Excel Web Add-in as the project type
  4. Select Next
  5. Name the solution or leave as default
  6. Select Create
  7. Choose Add new functionalities to Excel
  8. Select Finish
  9. Build the solution
  10. Right-Click on the project file for the addin (the one with the orange office logo) and select Debug -> Start a new Instance

enter image description here

This error message pops up. The Output window shows "Excel exited with code -1" I have added runtime logging to Excel which indicates the addin loaded successfully. My Google-fu has failed me in finding a resolution. Has anyone seen this or have an idea how to get it to work in VS 2019?

标签: visual-studio-2017visual-studio-2019office-jsoffice-addins

解决方案


This is a side effect of the fact that the JavaScript console was removed from VS 2019. You have to debug some other way


推荐阅读