reactiveui / Pharmacist

Builds observables from events.
MIT License
239 stars 15 forks source link

[BUG] Attempt to generate WinUI event, project compiles but events file not generated #101

Closed harvinders closed 3 years ago

harvinders commented 4 years ago

Describe the bug I am trying to generate events for a WinUI/UWP project. The UWP library project with reference to Pharmacist.MsBuild builds but fails to generate events file

Steps To Reproduce

  1. Open visual studio 2019
  2. Create a UWP C# library project
  3. Add reference to WinUI 2.4 pre-release
  4. Add nuget reference to Pharmacist.MsBuild
  5. Change target to 1903 and min target to 1803
  6. Build the project

repo project is here

Expected behavior Events class/file should have been generated

Screenshots The solution doesn't show the Pharmacist.MsBuild reference for some reason image

Environment

open-collective-bot[bot] commented 4 years ago

Hey @harvinders :wave:,

Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider contributing financially.

https://opencollective.com/reactiveui

PS.: We offer priority support for all financial contributors. Don't forget to add priority label once you start contributing :smile:

ReactiveUI - Open Collective
An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms!
glennawatson commented 4 years ago

Thanks, will take a look tomorrow for you.

harvinders commented 4 years ago

It's it possible to share a minimal reproducible repo. Just want to check how my repo is different from yours, and probably make some changes at my end.

On Tue, 7 Jan 2020, 22:40 Shimmy, notifications@github.com wrote:

In my setup, the events file is generated, but events for many essential packages and namespaces such as Windows.UI.Xaml.Controls.* aren't being generated.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/reactiveui/Pharmacist/issues/101?email_source=notifications&email_token=ACBJD5VLFEBLN6XRYUT7ZLLQ4RS2DA5CNFSM4KCU3UFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIITC3A#issuecomment-571552108, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBJD5RTCC6556HGRPGT4R3Q4RS2DANCNFSM4KCU3UFA .

glennawatson commented 4 years ago

@weitzhandler can you open another issue since it's unrelated to this issue. Also make sure you include all NuGet packages you need to generate. Eg any core packages of Uno etc

harvinders commented 4 years ago

@glennawatson, Obviously you are busy with many other things, I am wondering if I can figure out what is wrong. I am not sure how to debug this, any pointers would be appreciated.

glennawatson commented 4 years ago

Your sample app has issues btw.

You need to copy paste exactly how it is in the readme file on the main page the inclusions for pharmacist. Not sure if that will resolve your issue but worth fixing.

The big one is there isn't the private asset so all your sub projects will be generating pharmacist events.

harvinders commented 4 years ago

@glennawatson The app was created sometime back when just including these PackageReference were giving compilation error. I created another app (blank app template in visual studio 2019) and hand coded these two reference in the csproj. However, when I compile, I see visual studio reporting build successfully, but the visual studio hangs.

The big one is there isn't the private asset so all your sub projects will be generating pharmacist events. With this new blank app, I was hoping it would generate the events for UWP. Could you please explain your comment above. When you say sub projects what do you mean? Do you mean all the included PackageReferences?

glennawatson commented 4 years ago

The hanging bug I'm aware of and fixing at the moment. Should be another release in a day or so.

glennawatson commented 3 years ago

Sorry for the delay

Try https://www.nuget.org/packages/ReactiveMarbles.ObservableEvents.SourceGenerator/ and https://github.com/reactivemarbles/ObservableEventsSourceGenerator

This uses a different way of generating the files.

ReactiveMarbles.ObservableEvents.SourceGenerator 1.0.2
Allows to get an observables for property changed events.
GitHub
reactivemarbles/ObservableEventsSourceGenerator
Contribute to reactivemarbles/ObservableEventsSourceGenerator development by creating an account on GitHub.
github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.