this project of mine is very old and when I opened it, I saw that the contents of the design section were not displayed.
enter image description here
This code is related to the theme:
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">?attr/colorPrimary</item>
<item name="colorPrimaryDark">?attr/colorPrimaryDark</item>
<item name="colorAccent">?attr/colorAccent</item>
<item name="android:windowContentOverlay">#null</item>
Related
I've been trying to develop and deploy an Excel Office Addin and I've run into a few issues.
I've created an office addin by following the tutorials posted on your site. I've confirmed that I can run the addin in debugging (from my Visual studio code). So the next step is hosting and deploying the addin.
I first followed the instructions here: https://learn.microsoft.com/en-us/office/dev/add-ins/publish/publish-add-in-vs-code
I was able to publish it on an Azure static website and when I browse there, I can see it say "Please sideload your add-in to see app body." So far so good.
Next, I followed the steps here : https://learn.microsoft.com/en-us/office/dev/add-ins/testing/create-a-network-shared-folder-catalog-for-task-pane-and-content-add-ins
I was able to create a shared folder and add it as a trusted catalog in Excel. When I open up Excel, I can see my Addin in the shared folder section of "My Addins". I can click on it.
However, as soon as I click on it to load it in Excel, the status bar in my Excel says "Error loading add-ins" and there's not much else to do. It doesn't provide me anymore logs to work off of. The very last step of loading the office addin fails.
I believe that I've followed all the instructions in the tutorial correctly, including changing references in my manifest.xml file from localhost to the static website's url.
I have a few questions...
Was I correct to follow those two tutorials above in that order? In other words, has there been an issue with my process?
One of the steps mentioned copy/pasting the manifest file into the shared folder I created. Am I pasting the manifest.xml? Or the manifest.prod.xml from my dist folder? In both cases I run into the same error of not being able to load it properly in Excel.
It mentions to replace all references of localhost to the static website's URL in the manifest.xml file. I noticed that there is also a file called webpack.config.js in the root folder of the excel addin project that has a constant called urlProd with a comment telling us to change it to the production deployment location. The tutorials make no mention of this. I did change this to point to the static website I created to host the addin. Is this necessary?
EDIT:
My manifest, where I've replaced localhost with the url of my azure static website:
<?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>5a711560-c5ed-4c07-8020-39460e56846b</Id>
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="MyCustomFunctions"/>
<Description DefaultValue="Write your own Excel functions in TypeScript."/>
<IconUrl DefaultValue="https://[static.website.url.on.azure]/assets/icon-32.png"/>
<HighResolutionIconUrl DefaultValue="https://[static.website.url.on.azure]/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://[static.website.url.on.azure]/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">
<OfficeTab id="TabHome">
<Group id="CommandsGroup">
<Label resid="CommandsGroup.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>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://[static.website.url.on.azure]/assets/icon-16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://[static.website.url.on.azure]/assets/icon-32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://[static.website.url.on.azure]/assets/icon-80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Functions.Script.Url" DefaultValue="https://[static.website.url.on.azure]/dist/functions.js"/>
<bt:Url id="Functions.Metadata.Url" DefaultValue="https://[static.website.url.on.azure]/dist/functions.json"/>
<bt:Url id="Functions.Page.Url" DefaultValue="https://[static.website.url.on.azure]/dist/functions.html"/>
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812"/>
<bt:Url id="Commands.Url" DefaultValue="https://[static.website.url.on.azure]/commands.html"/>
<bt:Url id="Taskpane.Url" DefaultValue="https://[static.website.url.on.azure]/taskpane.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="Functions.Namespace" DefaultValue="CONTOSO"/>
<bt:String id="GetStarted.Title" DefaultValue="Get started with your sample add-in!"/>
<bt:String id="CommandsGroup.Label" DefaultValue="Commands Group"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started."/>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
Was I correct to follow those two tutorials above in that order? In other words, has there been an issue with my process?
It depends... The Sideload Office Add-ins for testing from a network share article states the following:
Deployment by network share is not supported for production add-ins.
And also you can meet the following statement:
This deployment option is intended to be used when you have completed development and testing on a localhost and want to test the add-in from a non-local server or cloud account.
So, it is possible to use shared folders for sideloading add-ins on Windows.
But it seems you have already published the manifest file to the static storage in Azure. So, you can use it for sideloading the add-in in Excel - just use the manifest's URL for adding the add-in in Excel.
One of the steps mentioned copy/pasting the manifest file into the shared folder I created. Am I pasting the manifest.xml? Or the manifest.prod.xml from my dist folder? In both cases I run into the same error of not being able to load it properly in Excel.
The manifest.prod.xml from your dist folder is uploaded to the static storage in Azure, so you can refer to it instead of using shared folders. It is up to you which way is to choose - use the shared folder or hosted file on the server. However, you need to pay attention to the URLs used in the manifest file - they should point to the add-in's files.
It mentions to replace all references of localhost to the static website's URL in the manifest.xml file. I noticed that there is also a file called webpack.config.js in the root folder of the excel addin project that has a constant called urlProd with a comment telling us to change it to the production deployment location. The tutorials make no mention of this. I did change this to point to the static website I created to host the addin. Is this necessary?
Tutorials can be a bit old and may not reflect all information available to developers. Project skeletons created with Yeoman generator are updated from time to time and you may get new features implemented out of the box.
If you set the urlProd constant to a valid URL then you can get the URLs set correctly in the manifest.prod.xml file from your dist folder after the project is built (in the production mode).
The manifest file is uploaded to the Azure static web site along with other add-in files. To install the add-in by using that manifest file it should point to the production URL. It is up to you to change the URLs manually or automatically (by using webpack).
Also, the AppDomain element specifies an additional domain that Office should trust, in addition to the one specified in the SourceLocation element.
I have created an Excel add-in following the instructions from https://dev.office.com/docs/add-ins/excel/build-your-first-excel-add-in. Everything went fine following along with the instructions and then I copied the solution out to a network share and then copied the manifest file to a different network share.
Then I tried following the instructions in the "Try it out" section of the page with adding the network location of the manifest file to into the Trusted Add-On Catalogs. Then after restarting Excel and going into the My Add-Ins button I see the Shared Folder tab on the screen, but I do not see the custom add-in, so I can't select it. Does anyone know what I'm missing.
My manifest file looks like this
<?xml version="1.0" encoding="UTF-8"?>
<!--Created:cb85b80c-f585-40ff-8bfc-12ff4d0e34a9-->
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TaskPaneApp">
<Id>D38C7DFE-AC71-4C20-B477-BD8508058D95</Id>
<Version>1.0.0.0</Version>
<ProviderName>Microsoft</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Sample Excel Add-In" />
<Description DefaultValue="Sample Excel Add-In"/>
<Capabilities>
<Capability Name="Workbook" />
</Capabilities>
<DefaultSettings>
<SourceLocation DefaultValue="\\pathtowheresolutionwas copied\ExcelAddInTest\Home.html" />
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
</OfficeApp>
The problem here was I followed along with the instructions in the document, but there is one part that is not really correct. It has you copy the Website out to a network share, but that can't be copied out to a network share it needs to be published to a website that is running https.
I have created my own theme in android studio and want to apply this theme but i cannot view my custom theme in list (like other available theme) and therefore unable to apply.
Please see image which shows "Theme is not used anywhere."
Please anyone guide how can i apply my new custom created theme in android studio. Following is my resource file and image:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
</style>
<style name="RaufTheme" parent="AppTheme" />
</resources>
I know its possible to create a wiki page in a sandbox solution with this:
SPUtility.CreateNewWikiPage(list, "{mysiteurl}/CodeGeneratedPage.aspx");
But how can I (if possible) create a webpart page with included webpart in my document library? Because all I can find (like this) is only working in farm solutions. Is there a workaround somehow?
Notice: I post this question here because there are way more people here as on the Sharepoint site.
Good find. You cannot use the SPLimitedWebPartManager in sandboxed code and hence can't use it to put WebParts on pages.
The only way to provision WebParts to pages is the declarative way (i.e. XML), so you will have to do something like this in an elements.xml file:
<AllUsersWebPart WebPartZoneID="MainWebPartZone" WebPartOrder="1">
<![CDATA[
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="MyComp.WebParts.SampleWebPart, MyComp.WebParts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9f4da00116c38ec5" />
<importErrorMessage>Cannot import this Web Part.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="Title" type="string">Sample WebPart</property>
</properties>
</data>
</webPart>
</webParts>
]]>
</AllUsersWebPart>
These links will help you along your way:
How to provision a Sandboxed Web Part through a custom module feature
Declarative Fun: Provisioning Web Part Connections in sandboxed solutions
and some more:
Inconvenient provisioning Web Parts to Wiki Pages in Sandboxed Solutions
Provision publishing page with webpart in sandboxed solution
I am trying to figure out how to use a custom Infopath form with a Sharepoint 2010 workflow. I have read about a million tutorials on how to do this, but I always end up receiving a "The workflow template has specified no FormURN for this page." error.
I use a Visual Studio project to deploy the solution. I have a Module containing the .XSN form in a "Forms" folder and of course the Workflow itself.
After tons of googling I think these settings should be correct:
My Form Module def:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="OPF" Url="FormServerTemplates" RootWebOnly="TRUE" xmlns="http://schemas.microsoft.com/sharepoint/">
<File Path="Travel.xsn" Url="Travel.xsn" Type="GhostableInLibrary" />
</Module>
</Elements>
My Workflow def:
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Workflow
Name="Godkjenning av timelister"
Description="My SharePoint Workflow"
Id="d92ce465-4fbd-46ee-9e44-ff0320d2bb75"
TaskListContentTypeId="0x01080100C9C9515DE4E24001905074F980F93160"
CodeBesideClass="OPFWorkflowTest2.Godkjenning_av_timelister.Godkjenning_av_timelister"
InstantiationUrl="_layouts/IniWrkflIP.aspx"
CodeBesideAssembly="$assemblyname$">
<Categories/>
<MetaData>
<AssociationCategories>List</AssociationCategories>
<MetaData>
<Instantiation_FormURN>urn:schemas-microsoft-com:office:infopath:Travel:-myXSD-2005-10-21T21-12-27</Instantiation_FormURN>
</MetaData>
<StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>
</MetaData>
</Workflow>
</Elements>
My Feature def:
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/"
ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver">
<Properties>
<Property Key="GloballyAvailable" Value="true" />
<Property Key="RegisterForms" Value="Forms\*.xsn" />
</Properties>
</Feature>
I have published the form from Infopath as an "Administrator approved form template". After I deploy the Visual Studio Solution the form is displayed in the "Central Administration -> Manage Form Templates" list and is marked as "Workflow Enabled=Yes". I get the No FormURN error no matter how I use the form in the workflow. For instance if I try to use it with a task.
Additional things I have tried:
- Used both Infopath 2007 and 2010
- Security on Infopath form is "Domain"
- The alternate access path is left empty when publishing the form
- Used two completely separate environments
- Endless combinations of different settings in the XML files
It seems like some people have managed to get this to work, but no matter what I do it doesn't work for me.
Here is a link that discuss this problem with various solutions (that doesnt work for me):
http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010programming/thread/fac26787-1729-46c8-9021-80652b3734c8
Can only list 1 link on Stack Overflow... first post. Typical...
So if there is any Sharepoint experts out there, please help me resolve this problem! This is the kind of thing that makes me question the whole product!
I'm able to see the InfoPath form after associating with VS 2010 workflow, please find below article on my blog to verify publishing InfoPath form and let me know if you need any help to resolve above issue.
http://sumansharepoint.blogspot.com/2008/05/points-to-remenber-when-designing.html
these steps are same for both InfoPath 2007 and 2010 forms.
Please find below my feature.xml and elements.xml files
Workflow.xml
Name="MyWorkflow" -->
List
<Task0_FormURN>urn:schemas-microsoft-com:office:infopath:ApprovalForm:-myXSD-2011-01-13T09-41-32</Task0_FormURN>
<StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>
</MetaData>
Feature.xml
I did not see element manifest entry on your feature.xml code, please verify that.