Using TypeMock 5.1 with Gallio

28 views
Skip to first unread message

Mads Nissen

unread,
Dec 15, 2008, 9:55:49 AM12/15/08
to gallio-dev
Hi!
Just posted a comment to http://blog.bits-in-motion.com/2008/03/announcing-gallio-v30-alpha-2.html
regarding using Gallio with the latest version of TypeMock.

I guess my question is how to upgrade the TypeMock version used with
Gallio. I’ve tried updating the TypeMock.Integration.dll component in
the Gallio TypeMock directory with no luck. My current scenario is
that the TypeMock tests run fine within Visual Studio locally, but
they fail on the commandline with MSBuild running a Gallio task with
RunnerType=”TypeMock”. The failure is a unit test exception where it
seems like TypeMock is not in the right version (not able to
successfully create RecursiveFakes):

at System.Uri..ctor(String uriString)
at Microsoft.SharePoint.SPSite..ctor(String requestUrl)
at TypeMock.MockManager.a(Type A_0, Object[] A_1)
at TypeMock.MockManager.MockObject(Type type, Constructor
mockConstructors, Object[] args)
at TypeMock.MockManager.a(Type A_0, BindingFlags A_1)
at TypeMock.MockManager.CreateRecursiveFake[T](BindingFlags flags)
at cc.Instance[T](Members behavior)
at
Pzl.Framework.Sharepoint.Test.ListControllerUnitTest.GetTitleForFirstAnnouncementsItem
() in

Any suggestions on how to make sure Gallio is running the latest
TypeMock 5.1 stuff in the runner?

puzzlepart as

Mads Nissen
Founder

email/im: mads....@puzzlepart.com (windowslive)
smail: p.o. box 157, 0323 Oslo, Norway
web: www.puzzlepart.com
weblog: weblogs.asp.net/mnissen
twitter: www.twitter.com/madsnissen

Mads Nissen

unread,
Dec 16, 2008, 11:08:17 AM12/16/08
to gallio-dev
I got some help form Ohad from the TypeMock team and we found the
source of the problem. This error is related to Gallio using the 4.0
version of the typemock.integration.dll. This does not support reading
the typemock install dir on x64 installs. Any chance this could be
updated to use the 5.0 version of this dll distributed with the 5.1
version of typemock?

The temporary workaround is to create a registry key "SOFTWARE\TypeMock
\TypeMock.NET\InstallDir" (string) and copy the value from "SOFTWARE
\Wow6432Node\TypeMock\TypeMock.NET\InstallDir" into it.



On Dec 15, 3:55 pm, Mads Nissen <mads.nis...@gmail.com> wrote:
> Hi!
> Just posted a comment tohttp://blog.bits-in-motion.com/2008/03/announcing-gallio-v30-alpha-2....
> email/im: mads.nis...@puzzlepart.com (windowslive)

Mads Nissen

unread,
Dec 16, 2008, 12:04:02 PM12/16/08
to gallio-dev

Jeff Brown

unread,
Dec 16, 2008, 2:51:59 PM12/16/08
to galli...@googlegroups.com
Sure, I'll make an item for the v3.0.6 release to update to TypeMock 5.1.  Do you need an updated copy right now?

Jeff.
Reply all
Reply to author
Forward
0 new messages