Click here to Skip to main content
16,015,296 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have created a ASP.net vnext class library project in Visual Studio 2015. Now I want to test my project.I am using Xunit for testing. So, I want to use mocking stuffs in my test project. Here is my project.json file

C#
{
    "version": "1.0.0-*",
    "dependencies": {
        "xunit": "2.0.0-rc3-build2880",
        "xunit.runner.aspnet": "2.0.0-rc3-build52",
          "My project name with version",
           "Moq": "4.2.1502.911"     
    },
 
    "commands": { "test": "xunit.runner.aspnet" },
 
    "frameworks": {
        "aspnet50": {
            "dependencies": {             
 
            }
        }
 
    }
    }


But I am getting error :Dependency Moq with the Version 4.2.1502.911 could not be resolved.

I also tried different version of Moq, but results the same: dependency error.
Without Mock I can't move further in testing.

Any help?
Posted
Comments
Richard Deeming 31-Mar-15 15:30pm    
REPOST
You have now posted exactly the same question THREE TIMES:
http://www.codeproject.com/Questions/889687/Mock-or-Fake-Testing-in-xunit-test-for-Asp-net-vne[^]
http://www.codeproject.com/Questions/890381/how-to-perform-mocking-in-test-project-for-ASP-NET[^]

If you want to update the question with the missing information, use the Improve question link. DO NOT re-post the question.
RajKumar Mondal 31-Mar-15 15:37pm    
ah, sorry for that.
If you have any solution to this please help me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900