Build fails 'WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets' was not found.
See original GitHub issueDescription
Build of 7472b43265c1f237f3ba0bd23a2b448c7adc7474
using build.cmd
fails out-of-the-box.
Steps to reproduce
Clone repo of the mentioned commit. Try running build.cmd
from shell.
Expected behavior
Builds and tests succeed out-of-the-box.
Actual behavior
Builds fails. Seems to be missing something, but what exactly?
D:\oss\testfx [master ≡]> .\Build.cmd
... Perform-Restore: Started.
... Starting toolset restore...
All packages listed in packages.config are already installed.
D:\oss\testfx\scripts\build\TestFx.targets(4,11): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft
Visual Studio\2017\Professional\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not
found. Also, tried to find "Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" in the fallback searc
h path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Progr
am Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\bin\MSBuild.exe.Config". Confirm that the path in
the <Import> declaration is correct, and that the file exists on disk in one of the search paths. [D:\oss\testfx\src\A
dapter\PlatformServices.Universal\PlatformServices.Universal.csproj]
D:\oss\testfx\scripts\build\TestFx.targets(4,11): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft
Visual Studio\2017\Professional\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not
found. Also, tried to find "Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" in the fallback searc
h path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Progr
am Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\bin\MSBuild.exe.Config". Confirm that the path in
the <Import> declaration is correct, and that the file exists on disk in one of the search paths. [D:\oss\testfx\src\T
estFramework\Extension.UWP\Extension.UWP.csproj]
Environment
Windows 10, Visual Studio 15.4.4 installed. List of components installed attached:
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (10 by maintainers)
Top Results From Across the Web
Microsoft.Windows.UI.Xaml.CSharp.targets not found
I've opened a solution that workes fine with VS2017 in VS2019 preview 1.1 When trying to compile, I get the following exception: Error:...
Read more >Microsoft.Windows.UI.Xaml.CSharp.targets missing on CI ...
To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework...
Read more >MSBuild Error when I create a UWP solution in rider
15:41 MSBuild targets were not found: Make sure that all SDKs required for projects in this solution are installed, or specify a different ......
Read more >Microsoft.CSharp.targets was not found
If you receive the following Visual Studio compiler error: Error MSB4019: The imported project "C:Microsoft.CSharp.targets" was not found.
Read more >C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0 ...
The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@spottedmahn : Raised this PR. After this change, any Windows 10 SDK(10240 to 17134) installed on the machine should work fine.
@jayaranigarg sorry I didn’t reply. Installing the workload you mentioned helped, but I had to install the “Windows 10 SDK (10.0.14393.0)” component too. This is why I asked for list of all individual components needed. When I said I had UWP for C# installed I meant I had the component “Windows 10 SDK (10.0.16299.0) for UWP: C#, VB, JS” installed.
It seems a little weird that perhaps the workload installs something that is not listed as an individual component.
Anyway, I am fine with closing this, but perhaps consider updating documentation with regards to what needs to be installed and test it.