I have create a list schema definition and list instance in VS2010. I have a feature that deploys both list definition and instance, plus a feature stappler which actives the new feature for each new sub site.
My list definition schema.xml is:
<Fields>
<Field Name="StartDate" Type="DateTime" Required="FALSE" DisplayName="Start Date" StaticName="StartDate" ID="9ea1256f-6b67-43b0-8ab7-1d643bf8a834" SourceID="http://schemas.microsoft.com/sharepoint/v3" ColName="datetime1" RowOrdinal="0" />
<Field Name="EndDate" Type="DateTime" Required="FALSE" DisplayName="End Date" StaticName="EndDate" ID="900503fa-4ab1-4938-be75-b40694ab97b6" SourceID="http://schemas.microsoft.com/sharepoint/v3" ColName="datetime2" RowOrdinal="0" />
I deploy successfully and create a new site using my site definitions, list gets created successfully all things work.
Now i want to add another field to my list, i go back to visual studio 2010 edit list definition schema.xml and add another field in Metadata fields section.
The schema.xml is now:
<Fields>
<Field Name="StartDate" Type="DateTime" Required="FALSE" DisplayName="Start Date" StaticName="StartDate" ID="9ea1256f-6b67-43b0-8ab7-1d643bf8a834" SourceID="http://schemas.microsoft.com/sharepoint/v3" ColName="datetime1" RowOrdinal="0" />
<Field Name="EndDate" Type="DateTime" Required="FALSE" DisplayName="End Date" StaticName="EndDate" ID="900503fa-4ab1-4938-be75-b40694ab97b6" SourceID="http://schemas.microsoft.com/sharepoint/v3" ColName="datetime2" RowOrdinal="0" />
<!-- New Field -->
<Field Name="TestRedeploy" Type="Text" Required="FALSE" DisplayName="TestRedeploy" StaticName="TestRedeploy" RichText="True" Sortable="FALSE" ID="A5656659-CD3E-4C84-AEAC-554DCE25434B" SourceID="http://schemas.microsoft.com/sharepoint/v3" ColName="ntext3" RowOrdinal="0" />
</Fields>
I build and deploy successfully, but when i go in list settings to check if new column was added i find that all columns have been deleted. Can you help me figure out how to deploy new columns with schema.xml ?
You should try to reinstall the feature that deploys your list
Go to sharepoint 2010 management console and write
install-spfeature -path "feature folder name in 14'hive" -force
after this make an IISRESET and reload the page. This should be enough for the field to be visible.
By the way you should never include colname and rowordinal values in your xml. These will be provided automatically by sharepoint when field is deployed. One problem that you might face with current deployment is that there is already a list field mapped to colname="ntext3".
Related
Follow this code example causes problems with MSWord's native document compare functionality when group policy has disabled macros:
https://learn.microsoft.com/en-us/office/dev/add-ins/design/using-office-ui-fabric-react
Why is MSWord identifying a basic office.js add-in as a macro? There are no macros in this helloWorld example code? Security conscious clients will not wish to lower their security policy in-order to use the document compare function. Is there another way to suppress these annoying message boxes, as asking the end-user to click [OK] twenty times on every document compare action is an awful user experience.
Note: The macros settings in the Trust Center do nothing to prevent these message boxes from showing when the group policy is in-place. Its not entirely clear what group policy setting is causing this, but I suspect its setting "Block macros from running in Office files from the Internet".
What is not clear is why the Wikipedia add-in from the app source store does not interfere with the document compare whereas the helloWorld example above does. There must be a way of trusting office.js add-ins to suppress this warning without having to compromise the corporate security strategy?
Environment:
Microsoft Word for Office 365 MSO (16.0.12527.20612) 32 bit
Windows 10 Enterprise, Version 1809
Visual Studio Code version 1.48
Node.js v12.14.1
Repo steps:
Follow the article detailed above for the helloWorld example
Apply a strict macro policy via Group Policy Management (exact policy setting is unknown. I am trying to acquire this from our IT Support to precisely identify which setting is triggering these macro warnings - and 'no' its not the trust center macro settings, as this settings do nothing to reveal/suppress this macro warning)
With MSWord open (irrespective of whether the helloWorld add-in is loaded in the sidebar or not, its mere association to MSWord is enough) attempt to do a document compare operation from the [Review] tab.
Removing the corporate security Group Policy from my laptop fixes the problem. Re-instating the group policy re-creates the problem. It's just not clear which setting in this policy is causing the problem. HOWEVER the Wikipedia add-in from the app source store is somehow trusted regardless of this Group Policy. As a minimum requirement, we need to provide clients with details of what the security constraint/setting is. Ideally, I'd like to know what it is that the wikipedia add-in has done to become trusted in such a way that those warnings are suppress irrespective of the Group Policy setting
Update
Adding the SSL certificates for the add-in to the Trusted Publishers store made no difference.
I tried a number of other apps found in the app source store with mixed results:
AppName (Publisher) : Results
Wikipedia (Microsoft) : Compare works correctly
Pickit (www.pickit.com) : Compare interrupted by 20 macro warning message boxes
ScriptLab (Microsoft) : Compare interrupted by 20 macro warning message boxes
Microsoft Dynamics (Microsoft) : Compare works correctly
The publishing location nor the publisher seems to influence the outcome of the compare functionality
Update
Here is an export of the group policy that relates to MSWord macros:
Interesting Update
It would appear that there is a unexpected interaction between the Group Policy details above, the document compare operation AND the ExtensionPoint xml element in the manifest.xml file. If I remove the extensionPoint element then the macro warning no longer shows during the document compare operation. However, removing this element means that we no longer have an icon to load the application with - forcing the end-user to re-add the add-in for every document, which isn't really a solution. See manifest.xml file below:
<?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 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>69de862e-09ee-4ec4-85a4-f230fa10cbc0</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.0</Version>
<ProviderName>CompanyX AddIn</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="CompanyX AddIn" />
<Description DefaultValue="CompanyX AddIn for Office 365" />
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="https://companyX.com/images/ds_AddIn_80.png" />
<HighResolutionIconUrl DefaultValue="https://companyX.com/images/ds_AddIn_80.png"/>
<!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
<SupportUrl DefaultValue="https://companyX.com/support.html" />
<!--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="Document" />
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://companyX.com/index.html" />
</DefaultSettings>
<!-- End TaskPane Mode integration. -->
<Permissions>ReadWriteDocument</Permissions>
<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="Document">
<!-- 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. resid points to a ShortString resource -->
<Title resid="CompanyX.GetStarted.Title"/>
<!-- Description of the Getting Started callout. resid points to a LongString resource -->
<Description resid="CompanyX.GetStarted.Description"/>
<!-- Point to a url resource which details how the add-in should be used. -->
<LearnMoreUrl resid="CompanyX.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="CompanyX.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="CompanyX.Group1">
<!-- Label for your group. resid must point to a ShortString resource. -->
<Label resid="CompanyX.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="CompanyX.tpicon_16x16" />
<bt:Image size="32" resid="CompanyX.tpicon_32x32" />
<bt:Image size="80" resid="CompanyX.tpicon_80x80" />
</Icon>
<!-- Control. It can be of type "Button" or "Menu". -->
<Control xsi:type="Button" id="CompanyX.TaskpaneButton">
<Label resid="CompanyX.TaskpaneButton.Label" />
<Supertip>
<!-- ToolTip title. resid must point to a ShortString resource. -->
<Title resid="CompanyX.TaskpaneButton.Label" />
<!-- ToolTip description. resid must point to a LongString resource. -->
<Description resid="CompanyX.TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="CompanyX.tpicon_16x16" />
<bt:Image size="32" resid="CompanyX.tpicon_32x32" />
<bt:Image size="80" resid="CompanyX.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="CompanyX.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="CompanyX.tpicon_16x16" DefaultValue="https://companyX.com/images/ds_AddIn_16.png" />
<bt:Image id="CompanyX.tpicon_32x32" DefaultValue="https://companyX.com/images/ds_AddIn_32.png" />
<bt:Image id="CompanyX.tpicon_80x80" DefaultValue="https://companyX.com/images/ds_AddIn_80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="CompanyX.Taskpane.Url" DefaultValue="https://companyX.com/index.html" />
<bt:Url id="CompanyX.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
<bt:Url id="CompanyX.DesktopFunctionFile.Url" DefaultValue="https://companyX.com/function-file/function-file.html" />
</bt:Urls>
<!-- ShortStrings max characters==125. -->
<bt:ShortStrings>
<bt:String id="CompanyX.TaskpaneButton.Label" DefaultValue="CompanyX AddIn" />
<bt:String id="CompanyX.Group1Label" DefaultValue="Contract Review" />
<bt:String id="CompanyX.GetStarted.Title" DefaultValue="CompanyX AddIn for Office 365." />
</bt:ShortStrings>
<!-- LongStrings max characters==250. -->
<bt:LongStrings>
<bt:String id="CompanyX.TaskpaneButton.Tooltip" DefaultValue="Start CompanyX AddIn" />
<bt:String id="CompanyX.GetStarted.Description" DefaultValue="CompanyX AddIn add-in loaded successfully. Go to the HOME tab and click the 'CompanyX AddIn' button to get started." />
</bt:LongStrings>
</Resources>
</VersionOverrides>
<!-- End Add-in Commands Mode integration. -->
</OfficeApp>
After evaluating numerous add-ins downloaded from the app store (from various different publishers, including Microsoft) it is clear that the problem is related to the ribbon.
Add-ins that do not use the ribbon do not present the macro warning. Add-ins that do use the ribbon (custom or home ribbon) that use the security Group Policy setup above are deluged with macro warnings during the document compare operation.
Clients will of-course be unwilling to reduce their security setup to suppress this series of warning message boxes. Therefore the only solution is to alter the add-in's manifest.xml so that it does not use the ribbon.
I am really very sorry for being redundant. I have checked a lot of other posts in this site itself and perhaps some other sites. I am not able to get Major Upgrade working without uninstalling & reinstalling of service. I am changing the Product Code and Version and the UpgradeFileComponent is the component that is part of the Upgrade. All the remaining are the same as in 1.0.0. I am doing a POC and hence would like to make only this small change (not as a patch, but as a major upgrade). Following is my Product.wxs. I am not including the markup for the other things like ServiceAccountDlg, Variables.wxi or en-us.wxl, since it may make it really long. Can anyone please help me? I have already tried WIX_UPGRADE_DETECTED, UPGRADINGPRODUCTCODE and so on, but not able to get it working. Everytime, the service is getting uninstalled and reinstalled. I am verifying this in the following way. Once the service starts, it creates a log file in ProgramData and keeps appending it to every 5 seconds. During uninstallation of the MSI, I am deleting this log file and its folder. After the service gets reinstalled and restarts, the log file gets created again. With this I am able to figure out that the service is getting reinstalled always with the major upgrade. I only want the new file to be deployed without reinstalling the service or any other component being uninstalled. I have heard from some people that the toolset checks for changed files and reinstalls them only if there is a change. But this doesn't seem to be the case. I have tried using the Schedule attribute with various values also, but no luck. Any help will be really great. I have been trying this for so many days without any luck. Please let me know if any more info is required from me.
<?xml version="1.0" encoding="UTF-8"?>
<?include Variables.wxi ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util='http://schemas.microsoft.com/wix/UtilExtension'>
<Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="!(loc.LANG)" Version="$(var.ProductVersion)" Manufacturer=" MyCompany" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Id="*" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<!--<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion OnlyDetect="yes" Minimum="1.0.0" Maximum="2.0.0" IncludeMinimum="yes" IncludeMaximum="yes" Property="NEWERFOUND" />
</Upgrade>-->
<InstallExecuteSequence>
<!--<RemoveExistingProducts After="InstallExecute" />
<DeleteServices>NOT UPGRADINGPRODUCTCODE</DeleteServices>-->
<!--<InstallServices>NOT UPGRADINGPRODUCTCODE,NOT WIX_UPGRADE_DETECTED</InstallServices>-->
<DeleteServices>NOT UPGRADINGPRODUCTCODE</DeleteServices>
</InstallExecuteSequence>
<Condition Message='This application only runs on Windows 7 or higher OS versions.'>
<![CDATA[Installed OR (VersionNT64 >= 601)]]>
</Condition>
<MediaTemplate />
<Property Id="MSIFASTINSTALL" Value="1"/>
<Property Id="MsiLogging" Value="v" />
<Property Id="MSIENFORCEUPGRADECOMPONENTRULES" Value="1" />
<Property Id="INSTALLDIR">
<RegistrySearch Id='MyCompanyMSISampleRegistry' Type='raw' Root='HKLM' Key='SOFTWARE\MyCompany\CustomApp' Name='INSTALLDIR' Win64='yes' />
</Property>
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
<Feature Id='Complete' Title='Foobar 1.0' Description='The complete package.'
Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR' AllowAdvertise='no' InstallDefault='local' Absent='disallow'>
<Feature Id="FileFeature" Title="File Feature" Level="1" AllowAdvertise='no' InstallDefault='local' Absent='disallow' Display='expand'>
<ComponentRef Id="FileComponent"/>
<ComponentRef Id="UpgradeFileComponent"/>
</Feature>
<Feature Id="ServiceFeature" Title="Service Feature" Level="1" AllowAdvertise='no' InstallDefault='local' Absent='disallow' Display='expand'>
<ComponentRef Id="ServiceComponent"/>
<ComponentRef Id="deleteFolder"/>
</Feature>
<Feature Id="RegistryFeature" Title="Registry Feature" Level="1" AllowAdvertise='no' InstallDefault='local' Absent='disallow' Display='expand'>
<ComponentRef Id="RegistryComponent"/>
</Feature>
<Feature Id='Documentation' Title='Description' Description='The instruction manual.' Level='2' AllowAdvertise='no' InstallDefault='followParent' Absent='disallow'>
<ComponentRef Id='Manual' />
</Feature>
</Feature>
<!--<UIRef Id="WixUI_Mondo"/>
<UIRef Id="WixUI_ErrorProgressText" />-->
<UI Id="MyWixUI_Mondo">
<UIRef Id="WixUI_Mondo" />
<DialogRef Id="ServiceAccountDlg" />
<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="ServiceAccountDlg" Order="2">LicenseAccepted = "1"</Publish>
<Publish Dialog="SetupTypeDlg" Control="Back" Event="NewDialog" Value="ServiceAccountDlg">1</Publish>
</UI>
<UIRef Id="WixUI_ErrorProgressText" />
<Icon Id="MyCompanyBanner.ico" SourceFile="Binary\MyCompanyBanner.ico" />
</Product>
<Fragment>
<Component Id='Manual' Guid='7470A2CD-B07C-4AB4-9152-8C6AA53FA0F7' Directory='INSTALLDIR'>
<File Id='Manual' Name='Manual.pdf' DiskId='1' Source='1.0.0\Manual.pdf' KeyPath='yes'>
<Shortcut Id="startmenuManual" Directory="DesktopFolder" Name="Instruction Manual" Advertise="yes" />
</File>
</Component>
</Fragment>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLDIR" Name="$(var.InstallFolderName)" />
</Directory>
<Directory Id="DesktopFolder" Name="Desktop" />
<Directory Id="CommonAppDataFolder">
<Directory Id="MyCompanyTestInstallerLogs" Name="MyCompanyTestInstallerLogs">
<Component Id="deleteFolder" Guid="323549D2-90B7-4D5D-8A36-EEA0ACCCC35E">
<RemoveFile Id="deleteServiceFile" Name="MyCompanyTestWinSvcLog.txt" On="both" Directory="MyCompanyTestInstallerLogs"/>
<RemoveFolder Directory="MyCompanyTestInstallerLogs" Id="MyCompanyTestInstallerLogs" On="both"/>
</Component>
</Directory>
</Directory>
</Directory>
</Fragment>
<Fragment>
<Component Id="FileComponent" Directory="INSTALLDIR" Guid="F143BE3C-48D6-4138-B4E6-5CF44773CBA5" >
<File Id="SampleTextFile.txt" Name="Sample.txt" Source="$(var.Version)\Sample.txt" KeyPath="yes">
<Shortcut Id="startmenuSampleText" Directory="DesktopFolder" Name="MyCompany MSI Sample" WorkingDirectory='INSTALLDIR' Icon='MyCompanyBanner.ico' Advertise='yes' />
</File>
</Component>
</Fragment>
<Fragment>
<Component Id="UpgradeFileComponent" Directory="INSTALLDIR" Guid="4582597C-2CE0-451E-8B89-83BA4ABCE464">
<File Id="SampleXMLFile.xml" Name="Sample.xml" Source="$(var.Version)\Sample.xml" KeyPath="yes" />
</Component>
</Fragment>
<Fragment>
<Component Id='ServiceComponent' Directory="INSTALLDIR" Guid="AEA0E53F-3D70-4010-8592-9A01FE49344D">
<util:User Domain="[DOMAIN]" Id="svcUser" Name="[USER_NAME]" Password="[PASSWORD]" LogonAsService="yes" CreateUser="no"/>
<File Id='MyCompanyTestWinSvc' Name='MyCompanyTestWinSvc.exe' Source='Binary\MyCompanyTestWinSvc.exe' KeyPath='yes' />
<ServiceInstall Id="installMyCompanyTestWinSvc" Name="MyCompanyTestWinSvc" DisplayName="MyCompany Install Test Windows Service" Start="auto" ErrorControl="normal" Type="ownProcess" Account="[DOMAIN]\[USER_NAME]" Password="[PASSWORD]" />
<ServiceControl Id="sc_MyCompanyTestWinSvc" Name="MyCompanyTestWinSvc" Start="install" Stop="both" Remove="uninstall" Wait="yes" />
<ServiceControl Id="stopAndStartIIS" Name="IISADMIN" Start="uninstall" Stop="install" Wait="yes" />
<ServiceControl Id="stopAndStartSQL" Name="MSSQLSERVER" Start="uninstall" Stop="install" Wait="yes" />
</Component>
</Fragment>
<Fragment>
<Component Id="RegistryComponent" Directory="INSTALLDIR" Guid="8D8D93A4-09F5-4511-B291-720A7BC70529">
<RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]' Type='string' Value='' KeyPath='yes' />
</Component>
</Fragment>
</Wix>
Your MajorUpgrade does not specify where it is scheduled. As the docs say, the default is after InstallValidate and "This scheduling removes the installed product entirely before installing the upgrade product. " So your major upgrade will uninstall the older product completely, deleting the service, and then install your upgrade.
So you should start by having your major upgrade scheduled afterInstallExecute, because this will behave like an update on top of the existing installed product and the reference counting should minimize disruption to your service. This means that you must follow component rules, and increment the file versions of versioned files that need replacing.
Having said that, an upgrade is always an uninstall of the older product, so the ServiceControl in that older version will run, and Remove="both" might be the problem, deleting the service during the upgrade. So the original WiX ServiceControl matters.
Also, if the component rules haven't been followed an upgrade afterInstallValidate will work fine because it uninstalls everything then installs the new product. But if the component rules have not been followed in an upgrade afterInstallExecute the service component may be getting uninstalled (because of differing component ids), and there may well be other effects of not following the rules.
And to make it clear, you do not need a condition on delete services in your new install. I would start just by sequencing the major upgrade in a better place. Also, UPGRADINGPRODUCTCODE as a condition in your new upgrade has absolutely no effect. This property is set in the older product if it is being uninstalled with an upgrade. If you want to use this property it should be in the original product that is already installed, so if it's shipped and installed it is too late to alter that code now (without a patch and so on).
A more verbose MSI log would show more detail about what is happening and in what order, specify the string as voicewarmup.
I added this to my <InstallExecuteSequence>
<!-- http://stackoverflow.com/questions/15965539/how-to-only-stop-and-not-uninstall-windows-services-when-major-upgrade-in-wix don't change service config on upgrade -->
<DeleteServices>NOT UPGRADINGPRODUCTCODE</DeleteServices>
<InstallServices>NOT WIX_UPGRADE_DETECTED</InstallServices>
Seemed to work for me but I don't use this anymore due to changes in the product. You have to be sure you won't be changing the configuration of the service between versions since when you do change the configuration you do need to uninstall and install the services during the upgrade.
Services only get deleted on real unininstall (Rob [answerer of commented question] notes you don't need to condition around the Remove state since the install/uninstall state of the services is noted in the components)
And we only install the services on the first install.
I am new to office 365. I have developed one taskpane add in (testaddin) for word 2016 using javacript api. In word 2016, I want to create new tab (testtab) and add a button to it . On clicking that button, i need to display my testaddin in taskpane. I have got sample manifest file here. https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Word. After downloading files where to place the manifest file.
I already have one shared directory which contains my testaddin manifest file and its loading in taskpane.
Any help will be really appreciated.
The manifest you refer from GitHub is a runnable one. We can modify it base on our requirement and deploy it into the share folder too. For example, to create a new tab on the ribbon instead of using the build-in tab, we need to use the “CustomTab” instead of “OfficeTab”.
Here is the detail steps:
Modify the manifeste like below(you need to modify the source
location and images based on your business requirement)
<?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">
<!-- BeginBasicSettings: Add-in metadata, used for all versions of Office unless override provided -->
<!--IMPORTANT! Id must be unique for your add-in, if you clone this manifest ensure that you change this id to your own GUID -->
<Id>651a32a9-ab8a-4579-ac9f-df1a11a64e54</Id>
<!--Version. Updates from the store only get triggered if there is a version change -->
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<!-- The display name of your add-in. Used on the store and various placed of the Office UI such as the add-ins dialog -->
<DisplayName DefaultValue="Citations" />
<Description DefaultValue="Citations Example"/>
<!--Icon for your add-in. Used on installation screens and the add-ins dialog -->
<IconUrl DefaultValue="https://i.imgur.com/LltG56v.png" />
<!--Todo: Add requirement sets and remove commenting of high res icon -->
<!--The HighResolutionIcon element is commented because it is valid only for 1.1 (or above) versions of the manifest.
To use this property, convert this manifest to version 1.1 by adding an API set in the Activation tab of the manifest editor.-->
<!--<HighResolutionIconUrl DefaultValue="https://i.imgur.com/MPuvMiq.png" />-->
<!--Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list -->
<AppDomains>
<AppDomain>AppDomain1</AppDomain>
<AppDomain>AppDomain2</AppDomain>
<AppDomain>AppDomain3</AppDomain>
</AppDomains>
<!--EndBasicSettings-->
<!--BeginTaskpaneMode integration. Office 2013 and any client that doesn't understand commands will use this section.
This section will also be used if there are no VersionOverrides -->
<Hosts>
<Host Name="Document" />
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://addinwithfabric.azurewebsites.net/index.html" />
</DefaultSettings>
<!--EndTaskpaneMode integration -->
<Permissions>ReadWriteDocument</Permissions>
<!--BeginAddinCommandsMode integration-->
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<!-- Optional, override the description of the Add-in -->
<Description resid="residToolTip" />
<!--Required, hosts node. Each host can have a different set of commands -->
<Hosts>
<!--Specific host. Workbook=Excel, Document=Word, Presentation=PowerPoint -->
<Host xsi:type="Document">
<!-- Form factor. Currenly only DesktopFormFactor is supported. We will add TabletFormFactor and PhoneFormFactor in the future-->
<DesktopFormFactor>
<!--GetStarted information used on the callout that appears when installing the add-in.
Ensure you have build 16.0.6769 or above for GetStarted section to work-->
<GetStarted>
<!--Title of the Getting Started callout. resid 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"/>
<!--Not used right now but you need to provide a valid resource. We will add code in the future to consume this URL.
resid points to a Url resource -->
<LearnMoreUrl resid="Contoso.GetStarted.LearnMoreUrl"/>
</GetStarted>
<!--Function file is an html page that includes the javascript where functions for ExecuteAction will be called.
Think of the FunctionFile as the "code behind" ExecuteFunction
This sample doesn't use this file, just adding the element for reference-->
<!--PrimaryCommandSurface==Main Office Ribbon-->
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<!--Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab -->
<!-- Documentation includes all the IDs currently tested to work -->
<CustomTab id="Contoso.Citations">
<!--Group. Ensure you provide a unique id. Recommendation for any IDs is to namespace using your companyname-->
<Group id="Contoso.Citations.Group1Id1">
<!--Label for your group. resid must point to a ShortString resource -->
<Label resid="residLabel4" />
<!--Icons. Required sizes 16,31,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX -->
<!--Use PNG icons and remember that all URLs on the resources section must use HTTPS -->
<Icon>
<bt:Image size="16" resid="icon1_16x16" />
<bt:Image size="32" resid="icon1_32x32" />
<bt:Image size="80" resid="icon1_80x80" />
</Icon>
<!--Control. It can be of type "Button" or "Menu" -->
<Control xsi:type="Button" id="Button3Id1">
<!--Label for your button. resid must point to a ShortString resource -->
<Label resid="residLabel3" />
<Supertip>
<!--ToolTip title. resid must point to a ShortString resource -->
<Title resid="residLabel" />
<!--ToolTip description. resid must point to a LongString resource -->
<Description resid="residToolTip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon1_16x16" />
<bt:Image size="32" resid="icon3_32x32" />
<bt:Image size="80" resid="icon1_80x80" />
</Icon>
<!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
<Action xsi:type="ShowTaskpane">
<!--Provide a url resource id for the location that will be displayed on the taskpane -->
<SourceLocation resid="residUnitConverterUrl" />
</Action>
</Control>
</Group>
<Label resid="residLabel4" />
</CustomTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon1_16x16" DefaultValue="https://i.imgur.com/xV3upTT.png">
<bt:Override Locale="ja-jp" Value="https://i.imgur.com/xV3upTT.png" />
</bt:Image>
<bt:Image id="icon1_32x32" DefaultValue="https://i.imgur.com/kBw0iKX.png">
<bt:Override Locale="ja-jp" Value="https://i.imgur.com/kBw0iKX.png" />
</bt:Image>
<bt:Image id="icon1_80x80" DefaultValue="https://i.imgur.com/xV3upTT.png">
<bt:Override Locale="ja-jp" Value="https://i.imgur.com/xV3upTT.png" />
</bt:Image>
<bt:Image id="icon2_32x32" DefaultValue="https://i.imgur.com/LltG56v.png">
</bt:Image>
<bt:Image id="icon3_32x32" DefaultValue="https://i.imgur.com/6WiJTG0.png">
</bt:Image>
</bt:Images>
<bt:Urls>
<bt:Url id="residUnitConverterUrl" DefaultValue="https://addinwithfabric.azurewebsites.net/index.html">
</bt:Url>
<!--LearnMore URL currently not used -->
<bt:Url id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://odsample.azurewebsites.net/Pages/GetStarted.html">
</bt:Url>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="residLabel" DefaultValue="Get Data">
<bt:Override Locale="ja-jp" Value="JA-JP Multiple Buttons" />
</bt:String>
<bt:String id="residLabel2" DefaultValue="Save Data">
<bt:Override Locale="ja-jp" Value="JA-JP Multiple Buttons" />
</bt:String>
<bt:String id="residLabel3" DefaultValue="Search Citation">
<bt:Override Locale="ja-jp" Value="JA-JP Multiple Buttons" />
</bt:String>
<bt:String id="residLabel4" DefaultValue="Web Citations">
<bt:Override Locale="ja-jp" Value="JA-JP Multiple Buttons" />
</bt:String>
<bt:String id="residLabel5" DefaultValue="Another Command">
<bt:Override Locale="ja-jp" Value="JA-JP Multiple Buttons" />
</bt:String>
<bt:String id="Contoso.GetStarted.Title" DefaultValue="Citation Sample Loaded Successfully">
<bt:Override Locale="ja-jp" Value="JA-JP Get Started Title" />
</bt:String>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="residToolTip" DefaultValue="Multiple Buttons Tooltip">
<bt:Override Locale="ja-jp" Value="JA-JP Multiple Buttons Tooltip" />
</bt:String>
<bt:String id="Contoso.GetStarted.Description" DefaultValue="Get going by opening the REFERENCES tab on the Ribbon then click WEB CITATIONS>SEARCH CITATION button">
<bt:Override Locale="ja-jp" Value="JA-JP Get Started Title" />
</bt:String>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
Copy the manifest to the share folder which you have configure as
“Trusted Catalog” for the Word.
Insert the apps for Office from the share folder, you are able to
see the new tab “Web Citations” on the
ribbon
please make sure to follow the documentation. The manifest you downloaded should not require any changes, just to test it make sure to follow the links below:
Add-In Commands intro http://dev.office.com/docs/add-ins/design/add-in-commands
Check out the samples: https://github.com/OfficeDev/Office-Add-in-Commands-Samples/blob/master/README.md
Test it using a network share: https://dev.office.com/docs/add-ins/publish/create-a-network-shared-folder-catalog-for-task-pane-and-content-add-ins
If you follow these documents you should be able to test. Please let me know if the information on those pages is not useful, or how to improve it!..
thanks!
I have been trying to get Solr DIH working with PostgreSQL for hours now and I cannot find the problem, as the Logger doesn't not tell me anthing helpful.
My aim is as simple as to synchronize the data from the database with Solr (using the DIH).
My setup is as follows:
Jetty, Windows 8
solrconfig.xml (nothing changed except for the following)
[...]
<lib dir="../../../../dist/" regex="solr-dataimporthandler-.*\.jar" />
<lib dir="../../../../dist/" regex="sqljdbc4.*\.jar" />
<lib dir="../../../../dist/" regex="postgresql-.*\.jar" />
[...]
data-config.xml
<dataConfig>
<dataSource type="JdbcDataSource"
driver="org.postgresql.Driver"
url="jdbc:postgresql://localhost:5432/solrdih"
user="solrdih"
password="solrdih"
batchSize="100" />
<document>
<entity name="solrdih"
query="SELECT * FROM myTable">
<field column="id" name="id" />
</entity>
</document>
</dataConfig>
schema.xml (nothing changed except for the following)
[...]
<fields>
<field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
<field name="name" type="text" indexed="true" stored="true"/>
<field name="description" type="text" indexed="true" stored="true"/>
[...]
Calling http://localhost:8983/solr/solr/dataimport, I get the following:
It reads:
ERROR DocBuilder Exception while processing: solrdih document : SolrInputDocument[]:org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: SELECT * FROM myTable Processing Document # 1
ERROR DataImporter Full Import failed:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: SELECT * FROM myTable Processing Document # 1
Could someone please provide hints where to look for the error?
Thanks in advance!
So, this error came from all the way down in Postgres and everything works fine since I made changes to pg_hba.conf
host all all 127.0.0.1/32 md5
to
host all all 127.0.0.1/32 trust
Im working on Open Data Protocol (OData) which is a standardized protocol for creating and consuming data API's.
OData builds on core protocols like HTTP and commonly accepted methodologies like REST .
I have installed, configured and built OData successfully on iOS6
Currently I'm creating a Proxy class to connect to the OData Service using the following commands:
cd /Users/Shamsu/Applications/ODataObjC/ODataSDKV1-1.3/Framework/bin/ODatagenBinary/MacOSX10.7.sdk/Debug
./odatagen /uri=http://35.35.6.4/MyApp.MyApp3D.DataService/MyApp3DDataService.svc/ /out=/Users/Ramshad/Applications/ODataObjC/ODataSDKV1-1.3/Framework/bin/ODatagenBinary/MacOSX10.7.sdk/Debug /u=sa /p=123
However, I'm getting the error: "odatagen: Failed to generate proxy classes. Please verify the metadata"
I can see the "metadata.xml" file is updated as
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
<edmx:DataServices m:DataServiceVersion="1.0" m:MaxDataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<Schema Namespace="MyAppDBModel" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
<EntityType Name="User">
<Key>
<PropertyRef Name="UserID" />
</Key>
<Property Name="UserID" Type="Edm.Guid" Nullable="false" />
<Property Name="UserName" Type="Edm.String" MaxLength="10" FixedLength="true" Unicode="true" />
<Property Name="UserDescription" Type="Edm.String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="Active" Type="Edm.Int64" />
</EntityType>
</Schema>
<Schema Namespace="MyApp.MyApp3D.DataService" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
<EntityContainer Name="MyAppDBEntities" m:IsDefaultEntityContainer="true" p6:LazyLoadingEnabled="true" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation">
<EntitySet Name="User" EntityType="MyAppDBModel.User" />
</EntityContainer>
</Schema>
</edmx:DataServices>
</edmx:Edmx> "
Note: the metadata.xml file is located at out param location (/Users/Ramshad/Applications/ODataObjC/ODataSDKV11.3/Framework/bin/ODatagenBinary/MacOSX10.7.sdk/Debug /metadata.xml)
I'm unable to identify the issue. Any problem with my windows WCF service /ODataService configuration/database configuration ? Permission assigned as * (read,write).
Any help on this issue is appreciated.
Thanks.
I looked a bit closer at the XSLT document I linked to in my original comment, and it seems that the odatagen tool hasn't been updated to work with CSDL v3. The version of CSDL (i.e., the format used to serialize the metadata document) is indicated by the xml namespace of the Schema element. In your metadata, that namespace is http://schemas.microsoft.com/ado/2009/11/edm, which indicates CSDL v3. You can see in the XSLT document here that this namespace isn't recognized by the odatagen tool.
Since the odatagen tool is open source (see the source on github), you can try to tweak the code and XSLT files to make it work for your situation. You could try to just add the v3 namespace to the recognized schema namespaces, and if your metadata doesn't use any v3 features, I would imagine it would just work. Off the top of my head I'm not sure of the exact differences between v2 and v3, so I can't immediately say whether the metadata you've posted above would be valid in CSDL v2.
Alternatively, you could try to generate the $metadata document so that it's using CSDL v2 instead.
Sorry I don't have a better answer for you. Unfortunately, the odatagen tool has fallen a bit behind. But you're more than welcome to contribute to the project :)