OfficeDev / Office-Add-in-samples

Code samples for Office Add-in development on the Microsoft 365 platform.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Excel does not launch when running the sample

Pete44ADF opened this issue · comments

Note: This repo is only for questions related to its samples. If you have questions about how to use office.js or the Office developer platform, please post your question on https://stackoverflow.com. Tag your question with office-js or outlook-web-addins

Question

I tried to launch the project in Visual Studio 2022 as indicated in the documentation, but Excel never opens.
Is there a config file to edit or something special to set?

Choose Debug > Start Debugging. Or press F5 to start the solution.
When Excel opens, choose Home > Show Taskpane.

Thanks for your help!

Best regards

Pierre

Hi @Pete44ADF, which sample are you trying to run? I'll take a look. thanks!

Hi @Pete44ADF, the Excel Blazor add-in sample opens for me in Excel on Windows. There are a couple things you can try to clear this up.

  1. Clear the Office cache. Could be something is in the developer cache that is confusing Excel.
  2. Debug your add-in with runtime logging

In the second case you can check the log file to see if the add-in is failing to load, and there should be some diagnostic information about what is happening.

Thanks!
David

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

Try the Clear Cache KO
Need to test the Debug

Tried to launch the add-in. It launches an Edge session on https://localhost:7287/
With the text Blazor Office JS API demo + logo and Loading...
In the DOS windows I get an error message "'DotnetDebugger.setDebuggerProperty'" wasn't found

Hello,

I did the following actions:
Try to activate Debug with runtime.
Try to repair and update the VS2022 setup.
Try to change the .NET Target to version 7.0
Still got the "'DotnetDebugger.setDebuggerProperty'" wasn't found error message
Upgrade nugget pacckages
Microsoft.AspNetCore.Components.WebAssembly and Microsoft.JSInterop.WebAssembly to version 7.0 no more error messages
but Excel is still not launched.
Could it be linked to my Office version?
Microsoft 365 Apps for Enterprise

Thanks for your help.

Pierre

I also see the 'DotnetDebugger.setDebuggerProperty' error, so I don't think that is the problem.

Can you make sure both projects are set to start?

  1. Open the solution, then in Solution Explorer, right-click the solution and choose Properties.
  2. In the property pages dialog, under Startup Project, ensure Multiple startup projects is selected. Both excel-blazor-sideloader and BlazorAddIn should be selected.

If that is set properly, another option is to see if you can open Excel yourself.

  1. Run the project from Visual Studio 2022 (and you should see the web page open indicating the project is running.)
  2. Open Excel.
  3. On the Home tab, select Add-ins. You should see the Blazor add-in listed there (if it sideloaded correctly.)

Thanks!
David

The problem was linked to the solution configuration.

  1. Open the solution, then in Solution Explorer, right-click the solution and choose Properties.
  2. In the property pages dialog, under Startup Project, ensure Multiple startup projects is selected. Both excel-blazor-sideloader and BlazorAddIn should be selected.

Thanks a lot @davidchesnut!