Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

References to windows.foundation, windows.ui and windows.data missing (Visual Studio 2019) #28

Closed
Simzy opened this issue Jun 3, 2019 · 14 comments

Comments

@Simzy
Copy link

Simzy commented Jun 3, 2019

the referenced component windows.foundation could not be found, same goes for windows.ui and windows.data

Am i missing something as i wanted to build a version using different icons for myself but it refuses to compile without those.

@NiyaShy
Copy link
Owner

NiyaShy commented Jun 3, 2019

Hey,
I can't say where exactly those come from, so I can only ask about what you currently have and compare it to what I use.
Are you running on Windows 10 and use Visual Studio (community) 2017? The only workload package that you should need is .NET desktop development.

@Simzy
Copy link
Author

Simzy commented Jun 3, 2019

Windows 10 1903 and VS community 2019, all clean install with .NET desktop development but the notifications are the same

@NiyaShy
Copy link
Owner

NiyaShy commented Jun 3, 2019

That's... weird. Can you cross-check under project -> add reference, there you should have the side bar entry Windows that includes the entries Data, Foundation and UI.

@Simzy
Copy link
Author

Simzy commented Jun 4, 2019

@NiyaShy
Copy link
Owner

NiyaShy commented Jun 4, 2019

OK, I think we're getting there. Can't check the exact name since I'm not on my main machine due to the warm weather, but I guess it might be necessary to install the windows 10 SDK package for the references to become available.

@Simzy
Copy link
Author

Simzy commented Jun 4, 2019

Ive already got all the SDKs which is why its confusing me so much

@NiyaShy
Copy link
Owner

NiyaShy commented Jun 6, 2019

Sorry for the delay, it cooled down a bit today so I'm back on my main machine.
According to the VS installer, the only packages I have are:

  • .NET desktop development
  • C++ desktop development (though that was probably for something else)
    And from the optional packages:
  • dev tools for .NET 4-4.6
  • .NET profile creation tools
  • JIT debugger (for .NET and C++)
  • VC++ tools for CMake (probably for something else)
  • Win10 SDK (10.0.17763.0)

And apparently I also have the Win10 SDK 10.0.14393.33 as a leftover from Visual Studio 2015...

When you have all of them installed, the only real difference would be that you already use VS 2019 while I'm still on 2017.

@Simzy
Copy link
Author

Simzy commented Jun 6, 2019

Same files, even using 2017 is still the same issue. What are the properties for your version of windows.data , here is what mine shows https://puu.sh/DCrHH/59be3043f0.png

@Simzy
Copy link
Author

Simzy commented Jun 6, 2019

Going through the code, its all pointing back to toast notifications, if i remove those lines of code then it compiles fine.

@NiyaShy
Copy link
Owner

NiyaShy commented Jun 6, 2019

https://i.imgur.com/Fh2F1a4.png
The referenced winmd files are all under C:\Windows\System32\WinMetadata.

@Simzy
Copy link
Author

Simzy commented Jun 6, 2019

I have finally figured out what the hell has been going on, there is a bug in 1903 with Visual Studio 2017 (i removed 2019) where it cant actually see the WinMetadata folder, so i copied the contents to a different location (to make things easier i copied them to C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10) and then i add them in as a reference using the browse option and selected them all to help.

@NiyaShy
Copy link
Owner

NiyaShy commented Jun 6, 2019

Good to know and also another reassurance for me that it's a good idea to wait with new Win10 releases for several months (praise be to Win10 pro).
So I guess it finally works now?

@Simzy
Copy link
Author

Simzy commented Jun 6, 2019

yeah i can get it to build, until i start changing namespaces like the localization for the different languages. Wanted to be able to remove the extra languages and the update section to make it easier for my idea on a redesign on the context menu i want to test.

@Simzy Simzy closed this as completed Jun 14, 2019
@NiyaShy
Copy link
Owner

NiyaShy commented Aug 23, 2019

Just wanted to add my 2 cents to this since I ran into the issue myself today after uninstalling VS 2017...

As you said, VS 2019 can't see/access C:\Windows\System32\WinMetadata and due to that the references are missing. This could be a bug, but I also found hints that it might be intended since the WinMetadata folder is apparently meant to be only used by windows itself.

Anyway, copying the folder somewhere else and manually adding references to Foundation, UI and Data fixes it.

@NiyaShy NiyaShy pinned this issue Jan 3, 2020
@NiyaShy NiyaShy changed the title References missing References to windows.foundation, windows.ui and windows.data missing (Visual Studio 2019) Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants