No way to pass build arguments to WebApplicationFactory as is
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
I try to pass build arguments like `["--flag", "2"]` to my test host but the only result I can get is `--flag=2` or `[["--flag=", "--2="]]`. The reason is this [line](https://github.com/dotnet/aspnetcore/blob/main/src/Mvc/Mvc.Testing/src/DeferredHostBuilder.cs#L46).
### Describe the solution you'd like
Initially I wanted to push just this:

but then I started to think that `--` symbols might make issues too. If you are interested in, I can prepare a better change where you can avoid `--` as well.
### My current workaround
I just copy/paste DeferredHostBuilder.cs, HostFactoryResolver.cs, WebApplicationFactory.cs and WebApplicationFactoryClientOptions.cs and then do changes inside the project which is awful.
Contributor guide
Assessment
This issue has not been assessed yet.