1

I added a xunit.runner.json file to my xunit unit test project. But I dont see any schema that points to some thing like http://xunit.github.io/schema/v2.1-rc1/xunit.runner.schema.json in the entire schema address bar(press F4) dropdown.

I have already added the necessary packages. See the packages.config below. What am I missing. Please help.

EDIT

See the image below, I scroll fully but I dont see the schema, what am I missing.

  <?xml version="1.0" encoding="utf-8"?>
  <packages>
    <package id="xunit" version="2.1.0" targetFramework="net452" />
    <package id="xunit.abstractions" version="2.0.0" targetFramework="net452" />
    <package id="xunit.assert" version="2.1.0" targetFramework="net452" />
    <package id="xunit.core" version="2.1.0" targetFramework="net452" />
    <package id="xunit.extensibility.core" version="2.1.0" targetFramework="net452" />
    <package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net452" />
    <package id="xunit.runner.visualstudio" version="2.1.0" targetFramework="net452" />
  </packages>

No XUnit Schema

VivekDev
  • 20,868
  • 27
  • 132
  • 202
  • I just wanted the method name instead of long name including namespace and class. So what worked for me is add [app.config](http://stackoverflow.com/a/32402361/1977871). Note that I had to completely delete the xunit.runner.json – VivekDev Aug 15 '16 at 10:43

2 Answers2

2

This is fixed now. The schema for xunit.runner.json was missing from the master JSON schema catalog, which is why Visual Studio wasn't listing it as an option in the drop-down. For future reference, the SchemaStore project on GitHub powers this functionality.

Scott Addie
  • 186
  • 3
  • 5
1

Just paste the schema you would like to use. E.g.: http://xunit.github.io/schema/v2.1-rc1/xunit.runner.schema.json

The next time you would add a xunit.runner.json file VS will remember it.

Net User HH
  • 213
  • 2
  • 10