Visual Studio 2010 SP1 and Moling the system dll

Personal reminder because I keep forgetting this step…

Context:

  1. Visual studio 2010 SP1
  2. Moles installed
  3. Building SharePoint unit tests using behaviors
  4. Required to create mole assembly based on the systems.dll
  5. receiving lots of built error including: “System.Net.Moles.SFileWebResponse.Dispose(bool)’: no suitable method found to override”

Try updating the System.moles file to use reflection only:

There I fixed it!

Happy SharePoint unit testing :)

More info:

VN:F [1.9.22_1171]
Rating: 9.3/10 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 3 votes)

Moles are dead, long live Fakes

I’m a huge fan of the Microsoft Research Project called Pex and Moles.
Therefor I’ve mentioned them several times on this blog and demonstrated their power on the community day event in 2010.
Especially moles, because they allow us to fake the very closed SharePoint objects in our Test projects and make our lives as SharePoint legends much easier.

There is bad and good news about Moles:

Moles are dead
The Moles project is *not* actively developed anymore…

Long live fakes
The Fakes Framework in Visual Studio 11 is the next generation of Moles & Stubs, and will eventually replace it.

What now?

The Fakes Framework in Visual Studio 11 is the next generation of Moles & Stubs, and will eventually replace it.
Fakes is different from Moles, however, so moving from Moles to Fakes will require some modifications to your code. A guide for this migration will be available at a later date. Until then, please keep sending bug reports to pexbug@microsoft.com, and ask questions on stackoverflow. The Pex and Moles team will release an update of Pex for Visual Studio 11 when the final release becomes available. Moles will not developed further so we recommend to migrate to Fakes.

http://research.microsoft.com/en-us/projects/moles/

VN:F [1.9.22_1171]
Rating: 9.0/10 (2 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Speaking at SharePoint Saturday Belgium

Pleased to announce that I will be presenting at SharePoint Saturday Belgium about Custom Service Applications.

Information about the session below:


Everybody knows the Out-Of-The-Box service applications like Search, Managed Metadata, BCS, Excel services, etc etc…

But how can you reuse this framework in order to provide your own Service Application and gain the built in advantages?

In this session you will learn how to create a custom SharePoint Service Application. They represent a fundamental change to the functional decomposition of services within a farm. However, Service Applications can be quite overwhelming to create.

We will simplify the process, so that everyone is able to implement their own specific Service Application.

 

About SharePoint Saturday BE:
Join SharePoint architects, developers, and other professionals for the first Belgian ‘SharePoint Saturday’ event. SharePoint Saturday is an educational, informative & lively day filled with sessions from respected SharePoint professionals & MVPs, covering a wide variety of SharePoint-orientated topics. SharePoint Saturday is FREE, open to the public and is your local chance to immerse yourself in SharePoint!
http://www.sharepointsaturday.org/belgium/default.aspx 

When and where will this awesome event be held?
Saturday April 28th 2012
Business Faculty Brussel
St. Lendriksborre 6 Font Saint Landry
1120 Brussel (Neder-Over-Heembeek)

Hope to see you there!

Tom

VN:F [1.9.22_1171]
Rating: 9.3/10 (3 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)