microsoft / playwright-dotnet

.NET version of the Playwright testing and automation library.
https://playwright.dev/dotnet/
MIT License
2.47k stars 235 forks source link

What versions of .NET does this work with? #1525

Closed JoelEinbinder closed 3 years ago

JoelEinbinder commented 3 years ago

I got asked if this works with 3.1 or 5 or both. It doesn't say anywhere in the docs.

kblok commented 3 years ago

The right answer is that it's netstandard2.0 (https://docs.microsoft.com/en-us/dotnet/standard/net-standard). It will work in 3.1 and 5. The Nunit package is netcoreapp3.1, net5.0, and net48.

alindgren commented 3 years ago

When I ran the install on a machine with .NET 3.1 (dotnet tool install --global Microsoft.Playwright.CLI), I get this error:

image (4)

pavelfeldman commented 3 years ago

Microsoft.Playwright.CLI currently targets only .net5.0. As a workaround do:

dotnet ./bin/Debug/.../Microsoft.Playwright.dll

or

.bin/Debug/.../playwright.ps1

We'll add targets to CLI to work everywhere in 1.0.1