Closed joaomoreno closed 9 years ago
If I replace "xunit.runner.kre": "1.0.0-beta1-*"
with "Xunit.KRunner": "1.0.0-beta1"
and add a specific NuGet.Config
file, then it works.
I figured this out by mimicking what is done in omnisharp-roslyn.
xunit is not on nuget.org yet that's why you are running into this. We should probably disable the unit test template in the generators.
@sayedihashimi: Sorry, your information is incorrect.
xunit.runner.kre
was never an officially supported runner. If you want current instructions on how to use xUnit.net inside ASP.NET v5, please see our documentation: http://xunit.github.io/docs/getting-started-aspnet.html
Also, there is no need to have special NuGet.config files for this process. Everything that's required is on nuget.org.
We have updated the unit test template. This should no longer be an issue, closing.
@sayedihashimi The unit test template simply disappeared. What do you mean by "updated the unit test template"?
We released an update to the generators a few days back, did you update?
@sayedihashimi I think @joaomoreno is correct, we need to take a closer look: https://github.com/OmniSharp/generator-aspnet/blob/master/app/index.js#L44-L47
Sorry about that. We have a PR for the unit test feature open at #78. I just replied there. I tried the template on OSX and received the following errors on kpm build
and k test
Unable to resolve dependency framework/System.XML
Build succeeded.
0 Warnings(s)
0 Error(s)
Time elapsed 00:00:01.0898924
Sayeds-MacBook-Pro:UnitTest sayedhashimi$ k test
System.InvalidOperationException: Failed to resolve the following dependencies for target framework 'Asp.Net,Version=v5.0':
framework/System.XML
Searched Locations:
/Users/sayedhashimi/temp/{name}/project.json
/Users/sayedhashimi/.k/packages/{name}/{version}/{name}.nuspec
/usr/local/Cellar/mono/3.8.0/lib/mono/4.5/{name}.dll
/usr/local/Cellar/mono/3.8.0/lib/mono/4.5/Facades/{name}.dll
Try running 'kpm restore'.
at Microsoft.Framework.Runtime.DefaultHost.GetEntryPoint (System.String applicationName) [0x00000] in <filename unknown>:0
at Microsoft.Framework.ApplicationHost.Program.ExecuteMain (Microsoft.Framework.Runtime.DefaultHost host, System.String applicationName, System.String[] args) [0x00000] in <filename unknown>:0
at Microsoft.Framework.ApplicationHost.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
We will have a new template soon, see #165. I'll close this now.
In the following session, I generate a unit test project and run
kpm restore
. It fails to locatexunit.runner.kre
.