question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build fails 'WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets' was not found.

See original GitHub issue

Description

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:

components.txt

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
jayaranigargcommented, Jun 4, 2018

@spottedmahn : Raised this PR. After this change, any Windows 10 SDK(10240 to 17134) installed on the machine should work fine.

1reaction
nietrascommented, Dec 12, 2017

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found