abdes / winui-generic-host

A WinUI 3 visual studio solution for an application that uses Microsoft.Extensions.Hosting.
MIT License
10 stars 0 forks source link

Hosting project missing using references? #1

Open jffaust opened 1 month ago

jffaust commented 1 month ago

Hello,

Thanks for sharing this code, it has been helpful trying to use hosting in a WinUI3 app.

I tried using the hosting project in my code but I was getting errors about missing references. For example: https://github.com/abdes/winui-generic-host/blob/master/Hosting/Desktop/IUserInterfaceThread.cs#L25 There is no reference to System.Threading.Tasks.

However, when I clone this repo and Rebuild the solution, I don't see those errors. I'm not sure why.

abdes commented 1 month ago

It’s probably some issue related to the versions of .net and the WinAppSDK as usual. It’s difficult to say for sure without knowing the full context.

I’ve encountered a fair share of issues myself using nuggets in WinUi apps that I simply reference projects by source most of the time and use a monorepo for my developments now. Take a look at my DroidNet project to see an example of what I’m referring to.