Archive for category SharePoint

Workaround for unit testing code that reside in the GAC

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 […]

, ,

3 Comments

Are you a SharePoint developer?

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 […]

3 Comments

Avoiding serialization issues in SharePoint property bags by using JSON

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 […]

, , , , , , , ,

5 Comments

Inconvenient: Files inside mapped folder which links to existing items

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 […]

, , ,

4 Comments

Getting to know your SharePoint 2010 packaging options

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 […]

, ,

Leave a comment

Using a different master page for authenticated users in SharePoint

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 […]

, , , ,

3 Comments

Using PowerShell to list all features with Title and ID

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 […]

, ,

1 Comment

What does SPSolution.ContainsWebApplicationResource really mean?

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: […]

,

Leave a comment

Notifications not showing when displayed in dialogs

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 […]

, , ,

2 Comments

Simplifying JavaScript for Ribbon extensions

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 […]

, , , ,

Leave a comment