[Mvc.Testing v5] deps.json files are not being copied
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
### Describe the bug
I'm creating an issue with hope to help someone who'll be stuck with the same problem during migration to `.net 5`.
According to the documentation `Microsoft.AspNetCore.Mvc.Testing` should copy dependencies files (.deps) of every referenced non-lib project to test project's bin directory.
The issue is that `Mvc.Testing v5` does not do that if you have `false` in your test project (we use separate `assemblyinfo.cs` file on our project).
`Mvc.Testing v3` works fine at the same time, so it's breaking change.
The reason most probably is [this](https://github.com/dotnet/aspnetcore/pull/21017/files#diff-f846fdb48bb031c6b6f9cbc442b277ac6f82b35ed5d210c40eca3b2a99df85a6L26) change of `BeforeTargets` attribute.
### To Reproduce
Here is the [repo](https://github.com/Gretam11/mvc-testing-deps-issue) where this issue is reproduced.
I just copied sample integration testing project and updated it to `.net 5`.
And after that I've added `false` to the `*.Test.csproj` and tests started failing because there is no `deps.json` being copied.
Please also try to comment/uncomment `GenerateAssemblyInfo` tag in `*.Test.csproj` with clearing `bin` folder to check that.
### Further technical details
Using CLI to build/test.
.NET SDK (reflecting any global.json):
Version: 5.0.100
Commit: 5044b93829
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19041
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.100\
Host (useful for support):
Version: 5.0.0
Commit: cf258a14b7
Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.