-
I've been using the We have a standard SDK project (Microsoft.NET.Sdk) that contains a base class for setting this up for our use. In my project I also have some sample projects (Microsoft.NET.Sdk.Web). And I have created matching test projects for these. When I try to run the test, I get an error. My output folder contains MyProject.Sample,Tests.deps.json, but not MyProject.Sample.deps.json In another project that contains multiple assemblies in the same solution, I have multiple deps files. What controls which deps.json files get copied? I tried adding the PreserveCompilationContext all over the place, but it didn't seem to make any difference. Is this controlled by SDK project type? some other magical MSBuild properties that should be set/not set? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I managed to resolve this by adding |
Beta Was this translation helpful? Give feedback.
I managed to resolve this by adding
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="3.1.9" />
to the problematic projects. This has MSBuild targets that copies things correctly.
I had the reference in the my common testing project, but this doesn't get applied transitively.