Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

320
Visualizações
Cannot install playwright: Couldn't find project using Playwright. Ensure a project or a solution exists in

I'm trying to install playwright on my deployment target machine in order to run UI tests.

# Install the CLI once.
dotnet tool install --global Microsoft.Playwright.CLI

playwright install

however when using the playwright CLI including playwright install I get:

Couldn't find project using Playwright. Ensure a project or a solution exists in C:\users\myuser, or provide another path using -p.

How do I install playwright on a vm?

EDIT:

Unfortunately, the .NET nuget packages for playwright are not very well designed. While the API is wonderful, the deployment is nightmare.

Not only you are not able to install browsers using CLI on deployment server, but the package adds 3x NodeJS runtime (200MB) to your project, and all projects that reference it.

It is untrivial to prevent those files from being published and your build artifacts can easily grow to 1GB for each build!

You are not able to configure path to NodeJS, or to the playwright itself.

You can vote for fixing this here: https://github.com/microsoft/playwright-dotnet/issues/1850

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You need to execute playwright install in the folder that contains the csproj or use -p to specify the project file

# Create project
dotnet new console -n PlaywrightDemo
cd PlaywrightDemo

# Install dependencies, build project and download necessary browsers.
dotnet add package Microsoft.Playwright
dotnet build
playwright install

See the documentation for more details: https://playwright.dev/dotnet/docs/intro#first-project

You can also install the browser from the code using:

using Microsoft.Playwright;

var exitCode = Microsoft.Playwright.Program.Main(new[] { "install" });

More details: https://www.meziantou.net/distributing-applications-that-depend-on-microsoft-playwright.htm

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda