nunit / nunit3-vs-adapter

NUnit 3.0 Visual Studio test adapter for use under VS 2012 or later
https://nunit.org
MIT License
203 stars 105 forks source link

Version 5-beta crashes with nullref exception #1170

Closed OsirisTerje closed 5 months ago

OsirisTerje commented 5 months ago

Trying to run the dll directly: image

using dotnet run image

I believe these two have the same root cause, but the message from the latter may be misleading.

Evangelink commented 5 months ago

@OsirisTerje As discussed offline, I'll take this one!

Evangelink commented 5 months ago

Fixed by #1171

Evangelink commented 5 months ago

dotnet run issue is still present but doing dotnet run --project solves the issue. I have reached out to some people to understand why the "default" gesture isn't working.

Evangelink commented 5 months ago

I have talked with the team and checked the docs https://learn.microsoft.com/dotnet/core/tools/dotnet-run and this syntax isn't valid. We should either run dotnet run from a folder, and it would execute only if a single project is found (see https://github.com/dotnet/sdk/blob/171723b0d76e60d147d259140adbfd078aa252a1/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs#L294-L305) or dotnet run --project <path-to-project>.

OsirisTerje commented 5 months ago

Ok, it finds both the sln and the csproj. Normally they are never in the same folder, so this makes sense. I tested by removing the sln file, and then it works. So I'll move the sln to one level up, and use that for both csprojs, for use with VS. Then people can test using simple dotnet run inside each folder