[Bug]: Setup will not work with .NET 4.8
See original GitHub issuePlaywright version
1.14
Operating system
Windows
What browsers are you seeing the problem on?
Chromium
Other information
No response
What happened? / Describe the bug
Running the program gave this error
Driver not found: C:\Users\user\Source\Repos\PlaywriteTest.playwright\node\win32_x64\playwright.cmd’
Code snippet to reproduce your bug
1. dotnet tool install --global Microsoft.Playwright.CLI
2. Create .NET 4.8 console app with the following code
using Microsoft.Playwright;
using System.Threading.Tasks;
namespace PlaywriteTest
{
class Program
{
static async Task Main(string[] args)
{
await Go().ConfigureAwait(false);
}
public static async Task Go()
{
using (var playwright = await Playwright.CreateAsync())
{
var browser = await playwright.Chromium.LaunchAsync();
var page = await browser.NewPageAsync();
await page.GotoAsync("https://playwright.dev/dotnet");
await page.ScreenshotAsync(new PageScreenshotOptions { Path = "screenshot.png" });
await browser.DisposeAsync();
}
}
}
}
When I tried the same steps except using .NET Core 3.1 everything worked fine.
Relevant log output
If I try to run playwright install (for the 4.8 project) in the Package Manager Console, I get...
PM> playwright install
playwright : Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0,
Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
At line:1 char:1
+ playwright install
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Unhandled excep...file specified.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
File name: 'Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at Microsoft.Playwright.CLI.Program.Main(String[] args) in /_/src/Playwright.CLI/Program.cs:line 75
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Troubleshoot blocked .NET Framework installations and ...
Troubleshoot issues you encounter that prevent installation of the .NET Framework. Consult status messages for information to resolve ...
Read more >.Net 4.8 fails to install
The GM setup asks if I want to install GM, click Yes or No to continue. .Net 4.8 Error from Logs. OS Version...
Read more >Installing .Net 4.8 Error Cannot Find Object or property. ...
Solution: if you look at the path provided and the file does exist then there is a good chance you already have .net...
Read more >Cannot get .Net Framework 4.8 to install on Windows ...
I am currently running .Net Framework 4.7.03062 on my Windows 2012 Server. I ran the Offline installation of Version 4.8.
Read more >Force Install .NET 4.8.1 on Server 2016
The reason .NET Framework 4.8.1 even support(s) the versions of Windows it supports, is because its built-into those versions, Windows Server ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Things should work on latest Playwright.
That would usually imply a missing installation… did you run
playwright install
?The 4.8 issue where
.playwright
isn’t copied correctly is definitely a bug. Working to fix it.