Click here to Skip to main content
Click here to Skip to main content

ShimNotSupportedException when trying Visual Studio 2012 SharePoint Emulators

, 2 Jan 2013
Rate this:
Please Sign up or sign in to vote.
Creating Unit Tests using the SharePoint Emulators

Introduction

Last week, I downloaded Brian Keller’s Updated Virtual Machine for Visual Studio 2012 Update 1 to start playing with the new features for SharePoint Development, Testing & Production debugging. The new stuff is really cool; now Microsoft Visual Studio Team can claim that they have a complete ALM story for building SharePoint Solutions.

One of the new features is “SharePoint Emulators” which is intended to solve the nightmares of SharePoint Unit Testing by providing a system of Fakes based shims implementing the basic behaviors of the SharePoint 2010 Server Object Model.

Problem

I fired up Visual Studio 2012 and created a couple of Unit Tests that use the SharePoint Emulators but I kept on receiving the “ShimNotSupportedException” Exception when trying to run it from Visual Studio Test Explorer.

Solution

Well, the solution is simple, just run Visual Studio 2012 “As an Administrator” Smile and this by the way applies to any Unit Tests using Microsoft Fakes Framework and not only SharePoint.

Learn More

To learn more about SharePoint Emulators, you can watch this video.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Ayman M. El-Hattab
Architect
Egypt Egypt
Ayman El-Hattab is a Regional Technology Solution Professional focusing on helping software professionals and organizations build better SharePoint Solutions using Microsoft Application Lifecycle Management (ALM) technologies and tools. Ayman has been in this role since 2010 and has presented at many conferences all over the Middle East & Africa about ALM, SharePoint, C#, asp.net and Business Intelligence technologies. Ayman is also a Microsoft Most Valuable Professional [SharePoint MVP] , ALM Ranger, published author and an enthusiastic speaker who enjoys working with the online and offline developer communities all over the world. Ayman is the founder of MEA ALM Community & SharePoint4Arabs, community lead at Egypt SharePoint User Group and an organizer of several SharePoint Saturday events. Outside of work, Ayman can be found watching soccer games, playing xbox or watching documentary movies.
Follow on   Twitter

Comments and Discussions

 
BugIssue PinmemberAbi Bellamkonda29-Apr-14 15:02 
GeneralMy vote of 5 PinmemberLeeJeary14-Feb-13 13:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 2 Jan 2013
Article Copyright 2013 by Ayman M. El-Hattab
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid