.NET Framework 4 Client Profile

4 posts, 1 answers
  1. Joe
    Joe avatar
    12 posts
    Member since:
    Apr 2007

    Posted 11 Jun 2010 Link to this post

    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=, 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.

  2. Answer
    Ricky avatar
    467 posts

    Posted 14 Jun 2010 Link to this post

    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.


    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.
  3. DevCraft R3 2016 release webinar banner
  4. Bob
    Bob avatar
    20 posts
    Member since:
    Mar 2012

    Posted 22 Mar 2012 Link to this post

    I'm using JustMock 2012.1.229.0 and am getting this error today.

    Hasn't this been fixed yet?
  5. Ricky
    Ricky avatar
    467 posts

    Posted 26 Mar 2012 Link to this post

    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
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top