This is a migrated thread and some comments may be shown as answers.
.NET Framework 4 Client Profile
3 Answers 54 Views
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 2
Joe asked on 11 Jun 2010, 08:27 PM
I was putting a small example program together and noticed that JustMock doesn't work with the .NET Framework 4 Client Profile.  Admittedly, this isn't a real-world scenario, so I don't know how important it is, but thought I would mention it anyway.  Here's the message:

Warning 1 The referenced assembly "Telerik.JustMock" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. MockTest

A second observation from reading the message above; I'm not sure that there should be a dependency on System.Web.  i.e. What if I wasn't building a Web application.

It's just a console app and I had the code in the Main method like this:

using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Text;  
using Telerik.JustMock;  
 
namespace MockTest  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            ICustomer cust = Mock.Create<ICustomer>();  
 
            Order ord = new Order(cust);  
        }  
    }  
}  
 

BTW, I already know how to create a test project and so on, but was just fiddling around and thought this info might be interesting for you.

Joe

3 Answers, 1 is accepted

Sort by
0
Accepted
Ricky
Telerik team
answered on 14 Jun 2010, 11:27 AM
Hi Joseph,

Thanks for the detailed report. Yes, we found  the issue with .net 4.0 client profile selected along with System.Web reference. This will be patched in coming internal build. On the other hand, you can provide me your email so that i can send you a build when its ready.

Regards,
Mehfuz

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Bob
Top achievements
Rank 1
answered on 22 Mar 2012, 10:46 AM
I'm using JustMock 2012.1.229.0 and am getting this error today.

Hasn't this been fixed yet?
0
Ricky
Telerik team
answered on 26 Mar 2012, 10:53 PM
Hi Bob,
Thanks again for reporting the issue to us. However, you need to select .NET Framework 4 as target framework in properties page of the test project which will resolve the error for you.

In addition, you can also send me the test that you are working on and we can investigate further.

Kind Regards
Ricky
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Asked by
Joe
Top achievements
Rank 2
Answers by
Ricky
Telerik team
Bob
Top achievements
Rank 1
Share this question
or