core icon indicating copy to clipboard operation
core copied to clipboard

dotnet build UWP.sln | error MSB4019 Microsoft.Windows.UI.Xaml.CSharp.targets not found

Open boexler opened this issue 5 years ago • 1 comments

I have an uwp project in my solution. I actually get the following error when trying to build it via dotnet build:

D:\MyFooProject.csproj(184,3): error MSB4019: Das importierte Projekt "C:\Program Files\dotnet\sdk\5.0.100-preview.5.20279.10\Microsoft\WindowsXaml\v16.0\Microsoft.Windows.UI.Xaml.CSharp.targets" wurde nicht gefunden. Stellen Sie sicher, dass der Ausdruck in der Import-Deklaration "C:\Program Files\dotnet\sdk\5.0.100-preview.5.20279.10\Microsoft\WindowsXaml\v16.0\Microsoft.Windows.UI.Xaml.CSharp.targets" richtig ist und dass die Datei auf dem Datenträger vorhanden ist.

The csproj entry:

<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />

As already discussed (https://stackoverflow.com/questions/45041972/microsoft-windows-ui-xaml-csharp-targets-missing-on-ci-server), it would be possible to build if I copy C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\WindowsXaml\v16.0\Microsoft.Windows.UI.Xaml.CSharp.Targets on my ci server.

Is there something wrong with my plans or does dotnet currently not support uwp? Because it is not possible to create an uwp project via dotnet new.

boexler avatar Jun 25 '20 12:06 boexler

same problem

Morrigan-Ship avatar Sep 10 '23 16:09 Morrigan-Ship