创建vnext Test项目时出错

时间:2014-11-30 17:05:22

标签: c# asp.net-core visual-studio-2015

使用VS2015预览我试图创建一个测试项目(vnext库(dll))。使用here

中的示例
//Test Class
    using System;
    using Xunit;
    namespace testproject.Tests
    {

        public class Class1
        {
            [Fact]
            public void TrueisTrue()
            {
                Assert.True(true);
            }
            [Fact]
            public void OnePlusOneIsTwo()
            {
                Assert.Equal(2, 1 + 1);
            }
        }
    }

// project.json

        {
        "version": "1.0.0-*",
        "dependencies": {
            "Xunit.KRunner": "1.0.0-beta1"
        },
        "commands": {
            "test": "Xunit.KRunner"
        },
        "frameworks": {
            "aspnet50": {
                "dependencies": {
                    "System.Runtime": "4.0.20-beta-22231"
                }
            },
            "aspnetcore50": {
                "dependencies": {
                    "System.Runtime": "4.0.20-beta-22231"
                }
            },
            "k10": {
                "dependencies": {
                    "System.Runtime": "4.0.20-beta-22231"
                }
            }

        }
    }

我在错误窗口中收到这些错误,但测试确实运行正常。这是测试版中的错误,还是我在配置中遗漏了什么?

Error List

1 个答案:

答案 0 :(得分:1)

  • {@ 1}}部分已弃用,不应位于k10
  • project.json不需要aspnet50