Skip to content

Updates NUnit to 3.6.1 - #465

Merged
matthid merged 10 commits into
Antaris:masterfrom
conniey:nunit3
Jun 16, 2017
Merged

matthid merged 10 commits into
Antaris:masterfrom
conniey:nunit3

Conversation

@conniey

@conniey conniey commented May 2, 2017 •

Copy link
Copy Markdown
Contributor
  • Updates project to run tests against NUnit3. NUnit 3 supports .NET Core, so this PR is one of a few to support RazorEngine on .NET Core.

Question
When I first run the project by executing:

  1. .paket\paket.bootstrapper.exe (The version it downloads is Paket 4.8.4)
  2. .paket\paket.exe install

I get:

Paket failed with:

Installation Errors :
Package Microsoft.AspNet.Razor is referenced in different versions in D:\git\conniey\RazorEngine\src\source\RazorEngine.Core\RazorEngine.Core.csproj (2.0.30506 vs 3.2.3), check the lock-file.

Is this error expected?

When I ran paket.exe install after updating the NUnit references, I thought it would modify the test projects with the new dependencies. However, it didn't, so I had to do it by hand so that it worked. Is this the expected behaviour? :/ Am I missing a step?

@matthid

matthid commented May 3, 2017

Copy link
Copy Markdown
Collaborator

Will take a look as soon as I can (to answer your questions).. Thanks for this

@conniey

conniey commented May 12, 2017 •

Copy link
Copy Markdown
Contributor Author

@matthid Hi, any updates on that paket install issue? I am trying to migrate the the solution to .NET Core but I keep running into this problem. I've tried to:

  • Split the projects into different folders and separate csprojs to no avail. :/
  • update the framework conditions in the paket.dependencies to something like: framework: >= net45.

An alternative would be that during the migration to .NET Core, to move back to NuGet v3 where dependencies can be selected based on the TargetFramework or other conditions. https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#adding-a-packagereference-condition

@matthid

matthid commented May 12, 2017

Copy link
Copy Markdown
Collaborator

/cc @forki @cloudRoutine I think its a paket bug in the way we do things in netcore land. Sadly I cannot look into this the next days in particular

@matthid

matthid commented May 13, 2017

Copy link
Copy Markdown
Collaborator

Ok its even worse imho. Its a regular paket bug that got introduced quite some time ago :/

@matthid

matthid commented May 13, 2017

Copy link
Copy Markdown
Collaborator

Related bug: fsprojects/Paket#1458

@agross

agross commented May 14, 2017

Copy link
Copy Markdown

FYI, the the new NUnit version constraint limits you to 3.6.x. Usually you would limit yourself to 3.x with ~> 3.6 in the dependencies file.

@matthid

matthid commented May 14, 2017

Copy link
Copy Markdown
Collaborator

Regarding the paket bug: One "workaround" would be to finally drop net40 support... But let me first try to get the paket fix through the door.

@agross can you comment there and let me know what you think about the warning? (If it's not ok I'd rather remove the warning for now, release the fix and discuss the warning in a separate PR)

@agross

agross commented May 14, 2017

Copy link
Copy Markdown

@matthid I'm OK with the warning message.

The original report (fsprojects/Paket#1458) stemmed from my (mis-)use of groups in Paket. Being a heavy bundler user I thought I could use groups as categorization mechanism without knowing that Paket uses groups as a dependency resolution scope. In bundler, groups are used to e.g. reduce the number of dependencies that are installed in production, where test libraries are most often not required. So, yes, we should discourage this use-case in Paket.

@matthid

matthid commented May 28, 2017

Copy link
Copy Markdown
Collaborator

@conniey Sorry I forgot to notify you but it should work again with latest paket releases (>=5.0.0-beta005).

@conniey

conniey commented Jun 6, 2017

Copy link
Copy Markdown
Contributor Author

Thanks for getting this fixed! I got it to work when I was using 5.0.0-beta010... To fix the CI builds, I had to update the build.cmd/build.sh to set the PAKET_VERSION environment variable. Is this PR okay now?

@matthid
matthid merged commit fc17940 into Antaris:master Jun 16, 2017
@matthid

matthid commented Jun 16, 2017

Copy link
Copy Markdown
Collaborator

Yep looks good, thank you!

@conniey
conniey deleted the nunit3 branch June 26, 2017 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants