Closed cberane closed 8 months ago
Here the example for an excel addin:
PS C:\WINDOWS\system32> cd C:\temp\
PS C:\temp> yo office
_-----_ ╭──────────────────────────╮
| | │ Welcome to the Office │
|--(o)--| │ Add-in generator, by │
`---------´ │ @OfficeDev! Let's create │
( _´U`_ ) │ a project together! │
/___A___\ /╰──────────────────────────╯
| ~ |
__'.___.'__
´ ` |° ´ Y `
? Choose a project type: Office Add-in Task Pane project
? Choose a script type: (Use arrow keys)
? Choose a script type: JavaScript
? What do you want to name your add-in? excel-test
? Which Office client application would you like to support? Excel
----------------------------------------------------------------------------------
Creating excel-test add-in for Excel using JavaScript and Taskpane at C:\temp\excel-test
----------------------------------------------------------------------------------
I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.
No change to package.json was detected. No package manager install will be executed.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN deprecated debuglog@1.0.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated readdir-scoped-modules@1.1.0: This functionality has been moved to @npmcli/fs
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm WARN deprecated @azure/msal-node@1.18.4: A newer major version of this library is available. Please upgrade to the latest available version.
npm WARN deprecated @azure/msal-browser@2.38.3: A newer major version of this library is available. Please upgrade to the latest available version.
added 1354 packages, and audited 1355 packages in 22s
180 packages are looking for funding
run `npm fund` for details
10 moderate severity vulnerabilities
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
----------------------------------------------------------------------------------------------------------
Congratulations! Your add-in has been created! Your next steps:
1. Go the directory where your project was created:
cd C:\temp\excel-test
2. Start the local web server and sideload the add-in:
npm start
3. Open the project in VS Code:
code .
For more information, visit http://code.visualstudio.com.
Please visit https://learn.microsoft.com/office/dev/add-ins for more information about Office Add-ins.
----------------------------------------------------------------------------------------------------------
PS C:\temp> cd .\excel-test\
PS C:\temp\excel-test> npm start
> office-addin-taskpane-js@0.0.1 start
> office-addin-debugging start manifest.xml
Debugging is being started...
App type: desktop
Enabled debugging for add-in 4d844fa2-7d23-4a18-a362-10081b3118e7.
The dev server is already running on port 3000.
Sideloading the Office Add-in...
Launching excel via C:\Users\.....\AppData\Local\Temp\Excel add-in 4d844fa2-7d23-4a18-a362-10081b3118e7.xlsx
Debugging started.
Fun fact:
The script seems to miss to add quotation marks to get a valid --xml-path
to load the manifest.xml
C:\temp\my-office-addin>npm run start
> office-addin-taskpane-js@0.0.1 start
> office-addin-debugging start manifest.xml
Debugging is being started...
App type: desktop
Enabled debugging for add-in a8c09b41-7889-4b9f-8867-ff20045d72d2.
The dev server is already running on port 3000.
Sideloading the Office Add-in...
running: npx -p @microsoft/teamsfx-cli@2.0.3-alpha.e5db52f29.0 teamsfx m365 sideloading --xml-path C:\temp\my-office-addin\manifest.xml
Warning: We are planning to depreate 'teamsfx' as command signagure and move to 'teamsapp' instead in the next major version of Teams Toolkit CLI.
This command is in preview.
Using account xxx@xxx
TitleId: U_ac8fcbc8-cdd8-541d-050d-0555c497236c
AppId: a8c09b41-7889-4b9f-8867-ff20045d72d2
Sideloading done.
Successfully registered package! (U_ac8fcbc8-cdd8-541d-050d-0555c497236c)
STDERR:
Launching outlook via C:\Program Files\Microsoft Office\Root\Office16\OUTLOOK.EXE
Debugging started.
Thanks for pointing that out. The Outlook sideload method was recently updated and it looks like that was missed. Will fix that quickly.
That should be fixed in the most recent version of the tooling. Make sure your project is installing the latest office-addin-debugging package and it should be correct.
Prerequisites
Expected behavior
The new add-in should be sideloaded as expected. If I remember correctly, this worked 2 weeks ago. Current tests led to the error described below.
Current behavior
Steps to Reproduce
My powershell input to create the new project:
Then in an administrative powershell:
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
yo
(4.3.1) +generator-office
(1.9.7)Failure Logs
Included in the logs and screenshot above.