Issue with C# builds due to msbuild not finding MSTest.TestFramework

Pr Dev's Avatar

Pr Dev

03 Dec, 2020 06:17 PM

I'm getting a host of compilation issues most of them with

error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

From online searches it seems to be an issue due to either not finding that framework, or with version mismatches between the framework and similar things. Appveyor's documentation indicates that the MsTest framework is available for all builds to I'm not sure what I should be adding. I'm using the default settings (Visual Studio 2019) on a public git repo. I've also used other versions of the VS but had the same results.

I had the same issue building the code on my local machine (macos) but I was able to resolve that by opening the project in VS2019, unloading/closing it and reloading it. At that point the build succeeds on both VS and msbuild

  1. Support Staff 1 Posted by Feodor Fitsner on 04 Dec, 2020 03:57 AM

    Feodor Fitsner's Avatar

    Could you share a URL of the project please?

  2. Feodor Fitsner closed this discussion on 03 Feb, 2021 09:03 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM
20 Sep, 2024 05:50 PM