Open LeonGorbaty1 opened 4 years ago
I've just added a short instruction (see commit above). Could you verify if it works for you @LeonGorbaty1 ?
@manuelsidler it mostly worked THANK YOU !!! I had a few issues, consider adding the following:
I also got a JSException here var autoShowAddIn = await JSRuntime.InvokeAsync<bool?>("window.Office.context.document.settings.get", "Office.AutoShowTaskpaneWithDocument"); but that's ok, the add-in is running and I am able to hit breakpoints and debug in VS ... I can work from here...
THANKS AGAIN !!
Hi, I still experience problem with my Add-in. When I run Word I can't see both host and name - only "Not in Office.". It looks there is a problem with connection between Word and Add-in. When I put a break point in this line "await JSRuntime.InvokeVoidAsync("wordWrapper.saveDocumentMetadata", _documentMetadata);" in OnAfterRenderAsync and turn on Add-in in Word the debugging doesn't stop... I would be grateful for any idea or tip. Many thanks in advance.
Which .NET Core version are you using?
Many thanks for reply. I'm using .Net Core 3.1 I've tried on two machines and unfortunately the same problem. Do you see anything wrong in attached screenshots and manifest? manifest.txt
Regarding to my previous comment. Any idea what can be wrong with my add-in? Thanks in advance for help.
Sorry I haven't been able to take a look into your problem. I'll try to find some time this week.
Do you see any errors in the Edge DevTools console? https://docs.microsoft.com/en-us/office/dev/add-ins/testing/debug-add-ins-using-f12-developer-tools-on-windows-10#debug-using-microsoft-edge-devtools
Hi, apologize for delay. I've been extremely busy for last couple of weeks. So yes I can see an issue during the Office.Initialize and it breaks the app. If you can take a look and let me know if you have any idea I'd be grateful. Thanks in advance.
And exception which I can see in Visual Studio:
{"Could not find 'initialize' in 'window.Office'.\nError: Could not find 'initialize' in 'window.Office'.\n
at https://localhost:44385/_framework/blazor.server.js:8:30944\n
at Array.forEach (
at p (https://localhost:44385/_framework/blazor.server.js:8:30904)\n
at https://localhost:44385/_framework/blazor.server.js:8:31614\n
at new Promise (
at e.beginInvokeJSFromDotNet (https://localhost:44385/_framework/blazor.server.js:8:31587)\n
at https://localhost:44385/_framework/blazor.server.js:1:20052\n at Array.forEach (
at e.invokeClientMethod (https://localhost:44385/_framework/blazor.server.js:1:20022)\n
at e.processIncomingData (https://localhost:44385/_framework/blazor.server.js:1:18006)"}
Based on your screenshot, it seems like you try to run the add-in directly in a browser instead of the office application?
Could you try to sideload your add-in in Office based on the official documentation?
Thanks for reply. Yes, in Visual Studio I click IIS Express and then I can see my add-in in browser, but when I open the Word and open my add-in I can see the proper taskpane...however is not working properly, host and platform are blank and buttons are not working. More over if I insert break points in VS, the code doesn't stop if I click e.g. buttons directly from add-in in Word...but when I click any button in browser breakpoints are working normally.
Maybe I do something wrong...
With Office add-ins, it's not possible to hit F5 and debug straight away. If you want to debug the client-side code, you have to attach the Edge developer tools to your add-in as described here: https://docs.microsoft.com/en-us/office/dev/add-ins/testing/debug-add-ins-using-f12-developer-tools-on-windows-10#debug-using-microsoft-edge-devtools
You can also try to attach Visual Studio directly to your Office add-in as described here: https://docs.microsoft.com/en-us/office/dev/add-ins/testing/attach-debugger-from-task-pane
Ok, I get it it's not straightforward but I think there is a problem with Office.js and I have no idea why. Is not loaded so that's the reason why I can't see the host and platform. But of course I've included Office.js in my _Host.cshtml file: And of course I have "Initialize" and "onready" in my code.
Many thanks for your help.
Ok, I get it it's not straightforward but I think there is a problem with Office.js and I have no idea why. Is not loaded so that's the reason why I can't see the host and platform. But of course I've included Office.js in my _Host.cshtml file: And of course I have "Initialize" and "onready" in my code.
Many thanks for your help.
Did you find a solution? Same problem here...
Please add a readme or some text at the front of the repo with steps to test the add-in in Word?