I've got a C# MsTest project that targets net48. I've change the project it tests to the newer style Microsoft.NET.Sdk csproj format and that went ok. Now I want to convert the unit test project too.
I get errors about namespace Microsoft.VisualStudio.TestTools.UnitTesting cannot be found: error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft'
To solve that, I added the assembly reference to the csproj:
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" />
</ItemGroup>
But I get errors that it can't be found.
warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.QualityTools.UnitTestFramework". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
This was found ok when the old csproj format was used.
How can I get this assembly reference to be found, or what is the preferred way of making this work?