Open dominikjeske opened 3 years ago
@dominikjeske thanks for contacting us.
@HaoK is this something that will not apply with the changes we made recently to Mvc.Testing?
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
So maybe some update to doc's of integration test would be nice since the fix will be applied?
It looks like it helps to explicitly include the test host nuGet package, e.g. as,
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="5.0.4" />
Describe the bug
In integration test when project we are testing has AssemblyName attribute we have DirectoryNotFoundException. After investigation it looks like this code https://github.com/dotnet/aspnetcore/blob/c272436a9e5dd42662d5f7eb5451c0eb0fc805c9/src/Mvac/Mvc.Testing/src/WebApplicationFactory.cs#L291 is searching for dependecies by project default names - not respecting that it could be changed by AssemblyName.
To Reproduce
Exceptions (if any)
DirectoryNotFoundException is raised
Further technical details
dotnet --info
.NET SDK (reflecting any global.json): Version: 5.0.102 Commit: 71365b4d42
Runtime Environment: OS Name: Windows OS Version: 10.0.18363 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\5.0.102\
Host (useful for support): Version: 5.0.2 Commit: cb5f173b96
.NET SDKs installed: 5.0.101 [C:\Program Files\dotnet\sdk] 5.0.102 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.All 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
VS 16.8.4