For a production Win2003 web server, I'd like to be able to allways log minidumps whenever the w3wp.exe processes crash...I've read the documentation for ADPLUS, and have xcopy-deployed it to the production web server, and have started adplus.exe from the command line as follows:
adplus.exe -crash -MiniOnSecond -NoDumpOnFirst -pmn w3wp.exe -o C:\Dumps
This does log the "MiniOnSecond," but it is also logging full dumps on first--and I don't want those (they're big fat files, and don't have what I need). Has anyone found a way to get the "-NoDumpOnFirst" flag to actually work? Additionally, I'd like this behavior every time the box is rebooted--How can that be accomplished without running a batch file on-reboot? I've read about Windows Error Reporting (WER), and it is trivial to impliment this behavior on a Win2008R2 server--how to make that work on a 2003 server?
I've read the documentation for both ADPLUS and WER--but I need help with the actually command line and/or registry settings to make capturing minidumps simple on a Win 2003 Server. Thanks for your help!
I played with the configuration file that can be attached with the -c flag...since i'm mostly interested in catching errors in my custom COM components, these settings create minidumps without fulldumps, and ignore CLR crashes, and don't full-dump on IISReset.
To have this run all the time, create a scheduled task. From an admin prompt:
schtasks /create /tn "Crash Dump Monitor w3wp" /tr "\"C:\Program Files\Debugging Tools for Windows (x86)\adplus.exe\" -c \"C:\Program Files\Debugging Tools for Windows (x86)\adplus_w3wp.xml\"" /sc ONSTART
Save this file as C:\Program Files\Debugging Tools for Windows (x86)\adplus_w3wp.xml
:
<ADPlus Version="2">
<!--
PURPOSE: Capture mini crash dumps in IIS 6.0. Do not capture full dumps
INSTRUCTIONS: Save this file in the same location as adplus.exe (usually C:\Program Files\Debugging Tools for Windows (x86))
COMMAND LINE:
"C:\Program Files\Debugging Tools for Windows (x86)\adplus.exe" -iis -c "C:\Program Files\Debugging Tools for Windows (x86)\adplus_w3wp.xml"
-->
<Settings>
<RunMode>Crash</RunMode>
<OutputDir>C:\Dumps</OutputDir>
<ProcessToMonitor>w3wp.exe</ProcessToMonitor>
</Settings>
<Exceptions>
<All>
<Actions1>VOID</Actions1>
<Actions2>VOID</Actions2>
<ReturnAction1>GN</ReturnAction1>
<ReturnAction2>GN</ReturnAction2>
</All>
<Exception Code="av"><!-- Access Violoation -->
<Actions1>Log;Time;Stack;MiniDump;EventLog</Actions1>
<ReturnAction1>GN</ReturnAction1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction2>GN</ReturnAction2>
</Exception>
<Exception Code="ch"><!-- InvalidHandle -->
<Actions1>Log;Time;Stack;MiniDump;EventLog</Actions1>
<ReturnAction1>GN</ReturnAction1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction2>GN</ReturnAction2>
</Exception>
<Exception Code="ii"><!-- Illegal Instruction -->
<Actions1>Log;Time;Stack;MiniDump;EventLog</Actions1>
<ReturnAction1>GN</ReturnAction1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction2>GN</ReturnAction2>
</Exception>
<Exception Code="dz"><!-- IntegerDivide -->
<Actions1>VOID</Actions1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction1>GN</ReturnAction1>
<ReturnAction2>GN</ReturnAction2>
</Exception>
<Exception Code="c000008e"><!-- FloatingDivide -->
<Actions1>VOID</Actions1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction1>GN</ReturnAction1>
<ReturnAction2>GN</ReturnAction2>
</Exception>
<Exception Code="iov"><!-- IntegerOverflow -->
<Actions1>VOID</Actions1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction1>GN</ReturnAction1>
<ReturnAction2>GN</ReturnAction2>
</Exception>
<Exception Code="lsq"><!-- InvalidLockSequence -->
<Actions1>VOID</Actions1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction1>GN</ReturnAction1>
<ReturnAction2>GN</ReturnAction2>
</Exception>
<Exception Code="sov"><!-- StackOverflow -->
<Actions1>VOID</Actions1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction1>GN</ReturnAction1>
<ReturnAction2>GN</ReturnAction2>
</Exception>
<Exception Code="aph"><!-- Application_hang -->
<Actions1>VOID</Actions1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction1>GN</ReturnAction1>
<ReturnAction2>GN</ReturnAction2>
</Exception>
<Exception Code="dm"><!-- Data_misaligned -->
<Actions1>VOID</Actions1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction1>GN</ReturnAction1>
<ReturnAction2>GN</ReturnAction2>
</Exception>
<Exception Code="gp"><!-- Guard_page_violation -->
<Actions1>VOID</Actions1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction1>GN</ReturnAction1>
<ReturnAction2>GN</ReturnAction2>
</Exception>
<Exception Code="ip"><!-- In_page_IO_error -->
<Actions1>VOID</Actions1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction1>GN</ReturnAction1>
<ReturnAction2>GN</ReturnAction2>
</Exception>
<Exception Code="isc"><!-- Invalid_system_call -->
<Actions1>VOID</Actions1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction1>GN</ReturnAction1>
<ReturnAction2>GN</ReturnAction2>
</Exception>
<Exception Code="sbo"><!-- StackOverflow -->
<Actions1>VOID</Actions1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction1>GN</ReturnAction1>
<ReturnAction2>GN</ReturnAction2>
</Exception>
<Exception Code="epr"><!-- Process_Shut_Down -->
<Actions1>Log;Time;</Actions1>
<ReturnAction1>Q</ReturnAction1>
</Exception>
<!--
<Exception Code="clr">
<Actions1>VOID</Actions1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction1>GN</ReturnAction1>
<ReturnAction2>GN</ReturnAction2>
</Exception>
<Exception Code="*">
<Actions1>VOID</Actions1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction1>GN</ReturnAction1>
<ReturnAction2>GN</ReturnAction2>
</Exception>
<Exception Code="clr">
<Actions1>VOID</Actions1>
<Actions2>Log;Time;Stack;MiniDump;EventLog</Actions2>
<ReturnAction1>GN</ReturnAction1>
<ReturnAction2>GN</ReturnAction2>
</Exception>-->
</Exceptions>
</ADPlus>
Can anyone improve on this? Have I missed any important crashing exceptions?
Related
We are trying to deploy an office excel addin for testing purposes on a network share. We tried using the preferred approach of Microsoft Admin Center. It loads the adding successfully for Excel online, but for some reason it does not work for the local installation of office 365 on the user's machine. We quickly discovered that they use a on premise ad server and according to the documentation this is not supported.
We then tried hosting the addin on a network share so we can at least get going while we figure out a way to deploy the addin in a more appropriate fashion. However no matter what we do, the add in does not appear under the shared folder tab.
I am sure it is something simple, but for the life of me I cannot figure it out. We have run npm validate and this has not found any issues. Any thoughts or suggestions would be appreciated.
Here is our XML file (redacted with ----):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
<Id>974191fc-621f-423d-9364-eb9d7b7e3ae8</Id>
<Version>1.2.3.0</Version>
<ProviderName>-----------------------</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="-------------------"/>
<Description DefaultValue="-------------------"/>
<IconUrl DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-64.png"/>
<SupportUrl DefaultValue="https://www.contoso.com/help"/>
<!-- <AppDomains>
<AppDomain>https://www.contoso.com</AppDomain>
</AppDomains> -->
<Hosts>
<Host Name="Workbook"/>
</Hosts>
<Requirements>
<Sets DefaultMinVersion="1.1">
<Set Name="SharedRuntime" MinVersion="1.1"/>
</Sets>
</Requirements>
<DefaultSettings>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/>
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<Hosts>
<Host xsi:type="Workbook">
<Runtimes>
<Runtime resid="Taskpane.Url" lifetime="long" />
</Runtimes>
<AllFormFactors>
<ExtensionPoint xsi:type="CustomFunctions">
<Script>
<SourceLocation resid="Functions.Script.Url"/>
</Script>
<Page>
<SourceLocation resid="Taskpane.Url"/>
</Page>
<Metadata>
<SourceLocation resid="Functions.Metadata.Url"/>
</Metadata>
<Namespace resid="Functions.Namespace"/>
</ExtensionPoint>
</AllFormFactors>
<DesktopFormFactor>
<GetStarted>
<Title resid="GetStarted.Title"/>
<Description resid="GetStarted.Description"/>
<LearnMoreUrl resid="GetStarted.LearnMoreUrl"/>
</GetStarted>
<FunctionFile resid="Taskpane.Url"/>
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<CustomTab id="Navi.Tab">
<Group id="Navi.Tab.Group1">
<Label resid="Group1.Label"/>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Control xsi:type="Button" id="TaskpaneButton">
<Label resid="TaskpaneButton.Label"/>
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Taskpane.Url"/>
</Action>
</Control>
</Group>
<Label resid="CustomTab.Label" />
</CustomTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/logo-full.jpeg"/>
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/logo-full.jpeg"/>
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/logo-full.jpeg"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Functions.Script.Url" DefaultValue="https://localhost:3000/functions.js"/>
<bt:Url id="Functions.Metadata.Url" DefaultValue="https://localhost:3000/functions.json"/>
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812"/>
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="Functions.Namespace" DefaultValue="----"/>
<bt:String id="GetStarted.Title" DefaultValue="---------"/>
<bt:String id="Group1.Label" DefaultValue="System"/>
<bt:String id="CustomTab.Label" DefaultValue="----------"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="------------"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="GetStarted.Description" DefaultValue="-------------"/>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Click to show the taskpane."/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
The output of npm validate:
Validation Information:
Package Type Identified: Package of your add-in was parsed successfully.
Correct Package: Your package matches the submission type.
Valid Manifest Schema: Your manifest does adhere to the current set of XML schema definitions for Add-in manifests.
Manifest Version Correct Structure: The manifest version number has the correct structure for the platform that it supports.
Manifest Version Correct Value: The manifest version number is greater or equal to 1.0.
Manifest ID Valid Prefix: The product ID in the manifest has a valid prefix
- Details: 974191fc-621f-423d-9364-eb9d7b7e3ae8
Manifest ID Correct Structure: The structure of the product ID is correct.
- Details: 974191fc-621f-423d-9364-eb9d7b7e3ae8
Desktop Source Location Present: A desktop or default source location URL is found.
Secure Desktop Source Location: The manifest desktop source location URLs use HTTPS.
The manifest source location URLs are valid.: The manifest source location URLs are valid.
Supported Office Identified: Supported Office products were successfully determined.
Support URL Present: The manifest support URL is present.
- Details: https://www.contoso.com/help
Valid Support URL structure: The manifest support URL has valid structure.
Valid OnlineMeetingCommandSurface ExtensionPoint.: OnlineMeetingCommandSurface ExtensionPoint extracted from manifest is found to be valid.
High Resolution Icon Present: A high resolution icon element was expected and is present.
- Details: https://localhost:3000/assets/icon-64.png
Supported High Resolution Icon URL File Extension: The manifest high resolution icon URL has a valid image file extension.
- Details: png
Secure High Resolution Icon URL: The manifest high resolution icon URL uses HTTPS.
- Details: https://localhost:3000/assets/icon-64.png
Icon Present: A icon element was expected and is present.
- Details: https://localhost:3000/assets/icon-32.png
Supported Icon URL File Extension: The manifest icon URL has a valid image file extension.
- Details: png
The manifest icon URL uses HTTPS.: Secure Icon URL
- Details: https://localhost:3000/assets/icon-32.png
All GetStarted strings are present in Resources: All GetStarted strings are present in Resources
Acceptance Test Completed: Acceptance test service has finished checking provided add-in.
Based on the requirements specified in your manifest, your add-in can run on the following platforms; your add-in will be tested on these platforms when you submit it to the Office Store:
- Excel 2019 or later on Mac
- Excel on Windows (Microsoft 365)
- Excel on the web
- Excel on Mac (Microsoft 365)
Important: This analysis is based on the requirements specified in your manifest and does not account for any runtime JavaScript calls within your add-in. For information about which API sets and features are supported on each platform, see Office Add-in host and platform availability. (https://learn.microsoft.com/office/dev/add-ins/overview/office-add-in-availability).
*This does not include mobile apps. You can opt-in to support mobile apps when you submit your add-in.
The manifest is valid.
The manifest looks good. Just make sure the host application version supports the requirement set specified in the manifest file.
The process of sideloading add-ins from a network share is described in the Sideload Office Add-ins for testing from a network share article. Make sure that you did all the steps.
See Deploy and publish Office Add-ins for all available options.
I am trying to create an add-in in excel with taskpane (in react), custom function and excel custom function. So I have tried to copy key part of manifest of excel custom function to manifest of excel add-in in react. Key part of combined manifest is as follow.
Requirements,
<Requirements>
<Sets DefaultMinVersion="1.1">
<Set Name="ExcelApi" MinVersion="1.1"/>
<Set Name="CustomFunctionsRuntime" MinVersion="1.1"/>
</Sets>
</Requirements>
DefaultSettings
<DefaultSettings>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/>
</DefaultSettings>
Hosts
<Hosts>
<Host xsi:type="Workbook">
<!-- Custom function start -->
<AllFormFactors>
<ExtensionPoint xsi:type="CustomFunctions">
<Page>
<SourceLocation resid="MyCustFunctions.Page.Url"/>
</Page>
<Metadata>
<SourceLocation resid="MyCustFunctions.Metadata.Url"/>
</Metadata>
<Namespace resid="MyCustFunctions.Namespace"/>
</ExtensionPoint>
</AllFormFactors>
<!-- Custom function end -->
<!-- Form factor. Currently only DesktopFormFactor is supported. -->
<DesktopFormFactor>
…………….code for task pane and custom function.
</DesktopFormFactor>
</Host>
</Hosts>
Resources
<Resources>
All resources.
<Resources>
When I try to do
npm run build
for this add-in, there is not files in “dist” folder related to excel custom function (ie .JS, .Html, .Json). basically, I am not able hook function.js saved in src folder with the manifest.
I have tried to review manifest of excel custom function, I could not understand how scr/function/function.html is hooked/connected in manifest.xml
Can anyone advise how can I solve this problem.
So I'm in the process of developing an add-in for excel. I started with the template generated by visual studio (not yeomon, since generating with VS made debugging setup easier). So far I've got some taskpane stuff set up to authenticate with a remote server, but now I've hit a problem trying to get custom functions running. The documentation is focused on yeomon-generated projects, and I've done my best to translate, but I seem to be missing something.
So what I've done so far:
For the sake of proof-of-concepting, I'm sticking with trying to get the samples provided in the OfficeDev repo working (https://github.com/OfficeDev/Excel-Custom-Functions). I've added the functions.ts from the sample (https://github.com/OfficeDev/Excel-Custom-Functions/blob/master/src/functions/functions.ts) to a MyAddInWeb/Custom directory in my project. I manually copied over the Functions.json and the Functions.html file generated by building the sample,and pointed the JSON-URL, JS-URL, and HTML-URL in my manifest to the respective file paths, as well as added an ExtensionPoint xsi:type="CustomFunctions tag and pointed script/page/metadata tags to the same files. The relevant portion of my manifest looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp
xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
xsi:type="TaskPaneApp">
...
<!--Begin TaskPane Mode integration. This section is used if there are no VersionOverrides or if the Office client version does not support add-in commands. -->
<Hosts>
<Host Name="Workbook" />
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="~remoteAppUrl/Home.html" />
</DefaultSettings>
<!-- End TaskPane Mode integration. -->
<Permissions>ReadWriteDocument</Permissions>
<!-- Begin Add-in Commands Mode integration. -->
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<!-- The Hosts node is required. -->
<Hosts>
<!-- Each host can have a different set of commands. -->
<!-- Excel host is Workbook, Word host is Document, and PowerPoint host is Presentation. -->
<!-- Make sure the hosts you override match the hosts declared in the top section of the manifest. -->
<Host xsi:type="Workbook">
<!-- Form factor. Currently only DesktopFormFactor is supported. -->
<AllFormFactors>
<ExtensionPoint xsi:type="CustomFunctions">
<Script>
<SourceLocation resid="Functions.Script.Url"/>
</Script>
<Page>
<SourceLocation resid="Functions.Page.Url"/>
</Page>
<Metadata>
<SourceLocation resid="Functions.Metadata.Url"/>
</Metadata>
<Namespace resid="Functions.Namespace"/>
</ExtensionPoint>
</AllFormFactors>
<DesktopFormFactor>
...
</DesktopFormFactor>
</Host>
</Hosts>
<!-- You can use resources across hosts and form factors. -->
<Resources>
<bt:Images>
<bt:Image id="Contoso.tpicon_16x16" DefaultValue="~remoteAppUrl/Images/Button16x16.png" />
<bt:Image id="Contoso.tpicon_32x32" DefaultValue="~remoteAppUrl/Images/Button32x32.png" />
<bt:Image id="Contoso.tpicon_80x80" DefaultValue="~remoteAppUrl/Images/Button80x80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="JSON-URL" DefaultValue="~remoteAppUrl/Custom/Functions.json"/>
<bt:Url id="JS-URL" DefaultValue="~remoteAppUrl/Custom/Functions.js"/>
<bt:Url id="HTML-URL" DefaultValue="~remoteAppUrl/Custom/Functions.html"/>
<bt:Url id="Functions.Script.Url" DefaultValue="~remoteAppUrl/Custom/Functions.js" />
<bt:Url id="Functions.Metadata.Url" DefaultValue="~remoteAppUrl/Custom/Functions.json" />
<bt:Url id="Functions.Page.Url" DefaultValue="~remoteAppUrl/Custom/Functions.html" />
<bt:Url id="Contoso.DesktopFunctionFile.Url" DefaultValue="~remoteAppUrl/Functions/FunctionFile.html" />
<bt:Url id="Contoso.Taskpane.Url" DefaultValue="~remoteAppUrl/Home.html" />
<bt:Url id="Contoso.Callback.Url" DefaultValue="~remoteAppUrl/callback.html" />
<bt:Url id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
</bt:Urls>
<!-- ShortStrings max characters==125. -->
<bt:ShortStrings>
<bt:String id="Functions.Namespace" DefaultValue="CONTOSO" />
<bt:String id="Contoso.TaskpaneButton.Label" DefaultValue="Show Taskpane" />
<bt:String id="Contoso.Group1Label" DefaultValue="Commands Group" />
<bt:String id="Contoso.GetStarted.Title" DefaultValue="Get started with your sample add-in!" />
</bt:ShortStrings>
<!-- LongStrings max characters==250. -->
<bt:LongStrings>
<bt:String id="Contoso.TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane" />
<bt:String id="Contoso.GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started." />
</bt:LongStrings>
</Resources>
</VersionOverrides>
<!-- End Add-in Commands Mode integration. -->
</OfficeApp>
So here's where I hit the first hurdle. In Functions.ts, I got a typescript error complaining that CustomFunctions namespace is not defined. Not sure where that comes from in the sample. If I removed the type declaration (bad idea, I know), the add-in builds, and the custom functions show up are registered, but attempting to run any of them causes excel to hang on "We're starting the add-ins runtime, just a moment..." for a moment, and then I get an error in the task pane saying the add-in could not be started. Unfortunately, I'm not getting any usable error messages as far as I can see, so I'm not sure where the problem lies. If I had to guess, something isn't hooked up correctly in the manifest, but I'm not sure. Any help would be much appreciated. The documentation so far seems pretty lacking.
I believe I was having the same issue. For me turned out that the CustomFunctions interface was missing (it's automatically added if you select the custom functions template in the yo office-generator, but not if you don't use the Excel custom functions template option).
Comparing the project.json file from the Excel custom function template, I added #types/custom-functions-runtime and custom-functions-metadata-plugin packages which fixed the issues for me.
Can add with the lines below:
npm install --save-dev #types/custom-functions-runtime
npm install --save-dev custom-functions-metadata-plugin
if you're building against Visual Studio, I'd recommended configuring your manifest to use a shared runtime. This will essentially configure your custom functions to run in the same web container as your taskpane, which will allow to you to debug your functions.
You can follow the steps here:
https://learn.microsoft.com/en-us/office/dev/add-ins/excel/configure-your-add-in-to-use-a-shared-runtime
#1: Add a Runtimes element
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<Hosts>
<Host xsi:type="Workbook">
<Runtimes>
<Runtime resid="ContosoAddin.Url" lifetime="long" />
</Runtimes>
<AllFormFactors>
Where the resid points to your taskpane.
#2 Ensure the taskpane html has a reference to your custom functions javascript file as well.
Note: the shared runtime feature just hit general availability and requires manifest schema changes that may not be yet in 2019 so you may get a build error in Visual Studio, but you could at least use the VS Debugger.
I tried my luck with the tutorial regarding SSO in Office Add-Ins:
https://learn.microsoft.com/en-us/office/dev/add-ins/develop/create-sso-office-add-ins-nodejs
Unfortunately, it does not work for me. I assume the source for the error lies in the manifest XML. I run the Node.JS server on Azure with the following URL: https://a8templatedev.azurewebsites.net
I tried the solution with PowerPoint version 1711 (Build 8730.2127 Click-and-run) and PowerPoint Online (Build 16.0.8926.5631).
The add-in loads successfully, but when hitting the "Get my files"-button, it throws an internal error (5001). In addition, I cannot configure my URL a8templatedev.azurewebsites.net as the API in the app registration, as it always tells me the error, that I already own the domain and cannot add it. On the other side, I assume that I have to use this URL in the manifest, because localhost is not working and the resource/API-url should be the same in the manifest and the App registration portal.
Can anyone help me?
<?xml version="1.0" encoding="UTF-8"?>
<!--Created:ce44715c-8c4e-446b-879c-ea9ebe0f09c8-->
<OfficeApp
xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
xsi:type="TaskPaneApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
<!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
<Id>6b8fe481-75b4-461f-a223-9ba65934d444</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>0.0.0.1</Version>
<ProviderName>Myjur Softwareentwicklung</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
<DisplayName DefaultValue="SSO NodeJS Sample" />
<Description DefaultValue="Shows how a node.js-based add-in can use single sign-on and the on-behalf-of flow to get Microsoft Graph data."/>
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<SupportUrl DefaultValue="http://www.contoso.com" />
<!--End Basic Settings. -->
<!--Begin TaskPane Mode integration. This section is used if there are no VersionOverrides or if the Office client version does not support add-in commands. -->
<Hosts>
<Host Name="Presentation" />
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://a8templatedev.azurewebsites.net/index.html" />
</DefaultSettings>
<!-- End TaskPane Mode integration. -->
<Permissions>ReadWriteDocument</Permissions>
<!-- Begin Add-in Commands Mode integration. -->
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<!-- The Hosts node is required. -->
<Hosts>
<!-- Each host can have a different set of commands. -->
<!-- Excel host is Workbook, Word host is Document, and PowerPoint host is Presentation. -->
<!-- Make sure the hosts you override match the hosts declared in the top section of the manifest. -->
<Host xsi:type="Presentation">
<!-- Form factor. Currently only DesktopFormFactor is supported. -->
<DesktopFormFactor>
<!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
<GetStarted>
<!-- Title of the Getting Started callout. The resid attribute points to a ShortString resource -->
<Title resid="Contoso.GetStarted.Title"/>
<!-- Description of the Getting Started callout. resid points to a LongString resource -->
<Description resid="Contoso.GetStarted.Description"/>
<!-- Points to a URL resource which details how the add-in should be used. -->
<LearnMoreUrl resid="Contoso.GetStarted.LearnMoreUrl"/>
</GetStarted>
<!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called.
Think of the FunctionFile as the code behind ExecuteFunction. -->
<FunctionFile resid="Contoso.DesktopFunctionFile.Url" />
<!-- PrimaryCommandSurface is the main Office Ribbon. -->
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
<OfficeTab id="TabHome">
<!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
<Group id="Contoso.Group1">
<!-- Label for your group. resid must point to a ShortString resource. -->
<Label resid="Contoso.Group1Label" />
<!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
<!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
<Icon>
<bt:Image size="16" resid="Contoso.tpicon_16x16" />
<bt:Image size="32" resid="Contoso.tpicon_32x32" />
<bt:Image size="80" resid="Contoso.tpicon_80x80" />
</Icon>
<!-- Control. It can be of type "Button" or "Menu". -->
<Control xsi:type="Button" id="Contoso.TaskpaneButton">
<Label resid="Contoso.TaskpaneButton.Label" />
<Supertip>
<!-- ToolTip title. resid must point to a ShortString resource. -->
<Title resid="Contoso.TaskpaneButton.Label" />
<!-- ToolTip description. resid must point to a LongString resource. -->
<Description resid="Contoso.TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Contoso.tpicon_16x16" />
<bt:Image size="32" resid="Contoso.tpicon_32x32" />
<bt:Image size="80" resid="Contoso.tpicon_80x80" />
</Icon>
<!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<!-- Provide a URL resource id for the location that will be displayed on the task pane. -->
<SourceLocation resid="Contoso.Taskpane.Url" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<!-- You can use resources across hosts and form factors. -->
<Resources>
<bt:Images>
<bt:Image id="Contoso.tpicon_16x16" DefaultValue="https://a8templatedev.azurewebsites.net/Images/Button16x16.png" />
<bt:Image id="Contoso.tpicon_32x32" DefaultValue="https://a8templatedev.azurewebsites.net/Images/Button32x32.png" />
<bt:Image id="Contoso.tpicon_80x80" DefaultValue="https://a8templatedev.azurewebsites.net/Images/Button80x80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="Contoso.DesktopFunctionFile.Url" DefaultValue="https://a8templatedev.azurewebsites.net/Functions/FunctionFile.html" />
<bt:Url id="Contoso.Taskpane.Url" DefaultValue="https://a8templatedev.azurewebsites.net/index.html" />
<bt:Url id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
</bt:Urls>
<!-- ShortStrings max characters==125. -->
<bt:ShortStrings>
<bt:String id="Contoso.TaskpaneButton.Label" DefaultValue="Show Add-in2" />
<bt:String id="Contoso.Group1Label" DefaultValue="SSO NodeJS2" />
<bt:String id="Contoso.GetStarted.Title" DefaultValue="Get started with your sample add-in!" />
</bt:ShortStrings>
<!-- LongStrings max characters==250. -->
<bt:LongStrings>
<bt:String id="Contoso.TaskpaneButton.Tooltip" DefaultValue="Click to show the sample." />
<bt:String id="Contoso.GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Sample' button to get started." />
</bt:LongStrings>
</Resources>
<WebApplicationInfo>
<Id>{APPID}</Id>
<Resource>api://a8templatedev.azurewebsites.net/{APPID}</Resource>
<Scopes>
<Scope>files.read.all</Scope>
<Scope>profile</Scope>
<Scope>openid</Scope>
<Scope>offline_access</Scope>
</Scopes>
</WebApplicationInfo>
</VersionOverrides>
<!-- End Add-in Commands Mode integration. -->
</OfficeApp>
{APPID} is only used as a placeholder here.
A few things:
The "api://... " domain that you use in the app registration must be an exact match for the domain used in the Resource value in the manifest. Your screenshot indicates that it is different. When you are developing, it should be localhost:3000 in both places.
You cannot register an app with an azure.websites.com domain. You must use a domain that you own. The error message is telling you that someone else owns it.
When viewing a slideshow in PowerpointOnline created with add-in, slides containing add-in’s content do not appear to load. Error message
Error
I think this error is a bug of PowerPoint Online.I have created the other apps, that are already in MS Store market. They work without errors in read mode, but bring the same error in full screen mode. Please, look at this screen video:
yadi.sk/d/mtypZZx-wNSst
yadi.sk/i/coV_DWvQwNUTf
I think there is a problem with using sharepoint Add-in files with PowerPoint Online for all webservices in fullscreenmode.
It's really bug or it's my error?
Manifest text:
<?xml version="1.0" encoding="UTF-8"?>
<!--Created:cb85b80c-f585-40ff-8bfc-12ff4d0e34a9-->
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ContentApp">
<Id>9136e827-53ab-4d0c-852a-05e9d3d1bdd1</Id>
<Version>1.0.0.0</Version>
<ProviderName>PROJECT</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="PROJECT" />
<Description DefaultValue="PROJECT DESCRIPTION"/>
<IconUrl DefaultValue="URL" />
<HighResolutionIconUrl DefaultValue="URL" />
<SupportUrl DefaultValue="URL" />
<AppDomains>
<AppDomain>URL</AppDomain>
<AppDomain>URL</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Presentation" />
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="URL" />
<RequestedWidth>1000</RequestedWidth>
<RequestedHeight>600</RequestedHeight>
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
</OfficeApp>