Following PowerShell Scripts are used often to install and deinstall SharePoint WSP Package (Farm Solution) without Visual Studio.
Add-SPSolution -LiteralPath “C:\temp\MySolution.wsp”
- Install solution in GAC with the given WebApplication:
Install-SPSolution –Identity MySolution.wsp –WebApplication http://mywebapplication –GACDeployment
(If solution is only needed to be updated, the command “Update-SPSolution” should be executed, e.g.
Update-SPSolution –Identity Solution.wsp –LiteralPath “C:\temp\MySolution.wsp” –GacDeployment )
- Uninstall and remove in the certain WebApplication:
Uninstall-SPSolution –Identity MySolution.wsp –WebApplication http://mywebapplication
Remove-SPSolution –Identity MySolution.wsp
Sometimes, Farm Feature should be enabled and disabled by PS.
Enable-SPFeature –Identity “MyFeatureName(or GUID)” –URL http://mywebapplication -Force
Disable-SPFeature –Identity “MyFeatureName(or GUID)” –URL http://mywebapplication
Parameters “-URL” and “-Force” are optional.
More details are included in TechNet site:
Correlation Id as follows is not the useful debug information for developer.
It is possible to use ULS Viewer to trace the log file in the background. (ULS View Download:http://www.microsoft.com/en-us/download/details.aspx?id=44020 )
In order to display the call stack of the web part, we should change the configuration in “web.config” file of the application directory ,e.g. “C:\inetpub\wwwroot\wss\VirtualDirectories\80”.
Set the attribute “CallStack” in Element “SafeMode” to “true”,
Set the attribute “mode” in Element “customErrors” to “Off”.
The better error message will be shown.
I totally agree with “Thinking SharePoint as Service”. Pesonal opinion, this is one of the best article to describe that the “gold time” of SharePoint is gone.
It doesn’t mean that SharePoint will not be used in the future but only just be considered as a service. For example, it may be integrated with MVC just because Workflow is required. “Injecting things in the host web or customizing master page is just like cat & mouse game”.
So for developer, it can not be to write some just running code. Just like Andrew Connell said in his blog, “I think that if you’ve hired me to do some work for you, you didn’t hire someone to bang away at a keyboard and give you some running bits in a few days / weeks / months. I think you hired me for my experience.”
Standard SharePoint 2013 Icon
- Find the Element “SharePoint:SPShortcutIcon” in the MasterPage;
- Change the URL, e.g.
<SharePoint:SPShortcutIcon runat="server" IconUrl="/_layouts/15/images/myProject/myicon.ico"/>
Attention: be sure, Browser Cache is refreshed and IIS is reset.
The icon is changed as follows.
It is convenient to edit a PDF in SharePoint 2013. The following steps are not to edit PDF file in the browser directly by configuring Office Web Apps. It is the Out-of-Box behavior in SharePoint 2013 and will be configured with following steps.
- Add items in “\Web Server Extensions\15\Template\XML\DOCICON.xml”:
<Mapping Key=”pdf” Value=”icpdf.gif” OpenControl=”AdobeAcrobat.OpenDocuments”/>
Now, the “Edit Document” in SharePoint 2013 is enabled and PDF file can be edited as follows:
Open and Checkout with Adobe Acrobat Reader DC:
After editing, Checkin and add comment, just like editing a word document with desktop application.
There are more details to control PDF file behavior in SharePoint in the article of the following link:
There is no default action to sign in as a different user in SharePoint 2013. So a module must be added as follows:
Title=”Sign in as a different User”>
The button appears again.
More about default Custom Action ID: https://msdn.microsoft.com/en-us/library/bb802730%28v=office.15%29.aspx
Ein kleiner Unterschied zwischen SharePoint 2010 und SharePoint 2013 ist der Pfad von “ScriptSrc”. In SharePoint 2010 muss folgendes sein.