Archive for category SharePoint
Workaround for unit testing code that reside in the GAC
Posted by Johan Leino in ALM, SharePoint on February 20, 2014
The problem I expressed my frustration the other day on twitter when it comes to unit testing and code that reside in GAC (global assembly cache). This problem may occur more often in frameworks that like to put their code in the GAC, like SharePoint for example. Let’s examine this with an example: Imagine the […]
Are you a SharePoint developer?
Posted by Johan Leino in SharePoint on January 24, 2013
I’ve been working with SharePoint more or less full-time from about 2006/2007 now, as consultant, doing so in a variety of projects and clients. One thing they, the projects and client, all have in common (if I’ll try to look in rear-view mirror) is that I was brought in because I knew a thing or two about SharePoint, I […]
Avoiding serialization issues in SharePoint property bags by using JSON
Posted by Johan Leino in SharePoint on January 24, 2012
Storing application settings in a SharePoint solution can be done in numerous ways. One of the more robust solutions is to use the property bags that exist all throughout the hierarchy of the SharePoint object model. The only real issue that we have in all of these property bags are that we can store any […]
Inconvenient: Files inside mapped folder which links to existing items
Posted by Johan Leino in SharePoint, Visual Studio on January 19, 2012
Problem You’re working on a SharePoint site for company x in Visual Studio 2010. Your boss tells you that company x uses a graphical profile (css + images) and some javascript files that you “must” include in the new site. The boss also informs you that if you make any changes to these files they […]
Getting to know your SharePoint 2010 packaging options
Posted by Johan Leino in SharePoint on January 9, 2012
Have a look at the image above. If you’re familiar with working with SharePoint 2010 projects in VS2010 you should know that when you add a new SPI (SharePoint Project Item), like a module|content type|empty item|etc, it’s by default added to a feature of the “correct” scope. Waldek Mastykarz has more information about this, and […]
Using a different master page for authenticated users in SharePoint
Posted by Johan Leino in SharePoint on October 20, 2011
So, let’s say you’re building a public facing internet site using SharePoint and you want to conditionally hide content from anonymous users viewing your site from the internet. Traditionally, you would use either a SPSecurityTrimmedControl or a LoginView. In this post I’m going to show you yet another way to accomplish sort of the same […]
Using PowerShell to list all features with Title and ID
Posted by Johan Leino in SharePoint on September 19, 2011
Ever wanted to list all the features installed in the farm with their id and Title (not the name of the folder)?? Here’s the PS script to run then: It will sort all the features based on title (remember to add another language if you don’t want 1033 which is US English). Then it will […]
What does SPSolution.ContainsWebApplicationResource really mean?
Posted by Johan Leino in SharePoint on September 16, 2011
If you look at the documentation for this property on MSDN it says “Gets a value indicating whether the solution contains any web application-specific resources to deploy.” So, at least to me, it wasn’t totally super clear what a web application specific resource really resource meant. Let’s see an example to get a better understanding: […]
Notifications not showing when displayed in dialogs
Posted by Johan Leino in SharePoint on May 31, 2011
I love working with the new dialog framework and notifications in SharePoint 2010. The other day though I ran into an issue with the notifications that somehow wouldn’t show up when I tried to use them in an application page I’ve built that was displayed through the dialog framework. In my application page I wanted […]
Simplifying JavaScript for Ribbon extensions
Posted by Johan Leino in SharePoint on May 11, 2011
A ribbon extension in SharePoint is usually a mix of some declarative xml syntax, which sets up the ribbon component (be it a button or what have you), and some JavaScript that actually controls the commands that are triggered when you use the component (e.g. when you click the button and if the button should […]