dotnet builds fail from the command line when visual studio community is installed
It seems like project files look for sdk's under a visual studio enterprise path. This works find if you have visual studio 2017 enterprise edition installed. This does not work for visual studio 2019 or visual studio community.
Microsoft (R) Build Engine version 16.1.76+g14b0a930a7 for .NET Core Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files\dotnet\sdk\2.2.301\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets(41,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\account\Documents\git\MixedReality-SpectatorView\src\SpectatorView.Unity\Assets\PhotoCapture\Microsoft.MixedReality.PhotoCapture.msb4u.csproj] C:\Program Files\dotnet\sdk\2.2.301\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets(41,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\account\Documents\git\MixedReality-SpectatorView\src\SpectatorView.Unity\Assets\SpatialAlignment\Microsoft.MixedReality.SpatialAlignment.msb4u.csproj] C:\Program Files\dotnet\sdk\2.2.301\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets(41,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\account\Documents\git\MixedReality-SpectatorView\src\SpectatorView.Unity\MSBuild\Projects\Unity.Subsystem.Registration.msb4u.csproj] C:\Program Files\dotnet\sdk\2.2.301\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets(41,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\account\Documents\git\MixedReality-SpectatorView\src\SpectatorView.Unity\Assets\SpectatorView.ExternalDependencies\Microsoft.MixedReality.SpectatorView.ExternalDependencies.msb4u.csproj] C:\Program Files\dotnet\sdk\2.2.301\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets(41,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\account\Documents\git\MixedReality-SpectatorView\src\SpectatorView.Unity\MSBuild\Projects\UnityEngine.UI.msb4u.csproj] C:\Program Files\dotnet\sdk\2.2.301\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets(41,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\account\Documents\git\MixedReality-SpectatorView\src\SpectatorView.Unity\MSBuild\Projects\Unity.XR.ARSubsystems.msb4u.csproj] C:\Program Files\dotnet\sdk\2.2.301\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets(41,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\account\Documents\git\MixedReality-SpectatorView\src\SpectatorView.Unity\MSBuild\Projects\UnityEngine.TestRunner.msb4u.csproj] C:\Program Files\dotnet\sdk\2.2.301\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets(41,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\account\Documents\git\MixedReality-SpectatorView\src\SpectatorView.Unity\MSBuild\Projects\UnityEngine.SpatialTracking.msb4u.csproj] C:\Program Files\dotnet\sdk\2.2.301\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets(41,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\account\Documents\git\MixedReality-SpectatorView\src\SpectatorView.Unity\MSBuild\Projects\Unity.TextMeshPro.msb4u.csproj] C:\Program Files\dotnet\sdk\2.2.301\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets(41,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\account\Documents\git\MixedReality-SpectatorView\src\SpectatorView.Unity\Assets\SpatialAlignment.ASA\Microsoft.MixedReality.SpatialAlignment.ASA.msb4u.csproj] C:\Program Files\dotnet\sdk\2.2.301\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets(41,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\account\Documents\git\MixedReality-SpectatorView\src\SpectatorView.Unity\MSBuild\Projects\Unity.XR.ARFoundation.msb4u.csproj] C:\Program Files\dotnet\sdk\2.2.301\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets(41,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\account\Documents\git\MixedReality-SpectatorView\src\SpectatorView.Unity\Assets\SpectatorView\Microsoft.MixedReality.SpectatorView.msb4u.csproj] C:\Program Files\dotnet\sdk\2.2.301\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets(41,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\account\Documents\git\MixedReality-SpectatorView\src\SpectatorView.Unity\Assets\SpectatorView.Tests\Microsoft.MixedReality.SpectatorView.Tests.msb4u.csproj] C:\Program Files\dotnet\sdk\2.2.301\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets(41,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\account\Documents\git\MixedReality-SpectatorView\src\SpectatorView.Unity\Assets\SpatialAlignment.ASA.Editor\Microsoft.MixedReality.SpatialAlignment.ASA.Editor.msb4u.csproj] C:\Program Files\dotnet\sdk\2.2.301\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets(41,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\account\Documents\git\MixedReality-SpectatorView\src\SpectatorView.Unity\Assets\SpectatorView.Editor\Microsoft.MixedReality.SpectatorView.Editor.msb4u.csproj]