chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
I have a Sharepoint/Typemock demo system that has been working in the past. I have upgraded to to VS2010RC and Isolator 6.0.1.0 (saw the same problem with 6.0.0.0) and am seeing some problems.


When I try to call the following line from inside a ASPX page Load event

protected void Page_Load(object sender, EventArgs e)
{
SPSite fakeSite = Isolate.Fake.Instance<SPSite>();
}

If running VS2010 as Admin get the error

"Could not load file or assembly 'TypeMock, Version=0.12900.25133.13153, Culture=neutral, PublicKeyToken=37342d316331342d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"TypeMock, Version=0.12900.25133.13153, Culture=neutral, PublicKeyToken=37342d316331342d"}"

If runniung as a non admin I get the error
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

If I make the same SPSite call in a standard test all is OK.

With the 6x series do I need to reference something other than typemock.dll and typemockactAssertarrange.dll

Now as I said this has been working with 5.4x and VS2010Beta2, as I use the style to allow a SharePoint web part to be run inside a ASP.NET web harness.
I wil check with other versions of VS, but wondered about Typemock API changes
asked by rfennell (6.8k points)

3 Answers

0 votes
Bit more info, I down graded my solution to VS2008, but left Isolator at 6.0.1.0 and my test work again.

Look like there might be a loader intercept issue in 2010RC (or it's version of the the Cassini Development WebServer) It does not appear to be due to .NET 4 as if I downgrade the test web site in 2010 to 3.5 I still get the same error
answered by rfennell (6.8k points)
0 votes
Hi Richard,

The reason for the exception is that in VS 2010 the server process name changed.
I'm sending you a patch please try it and let me know if solves the problem.
answered by ohad (35.4k points)
0 votes
See http://blogs.blackmarble.co.uk/blogs/rf ... -net4.aspx for some details on the fix provided by Typemock Support
answered by rfennell (6.8k points)
...