reactiveui / Pharmacist

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

Xamarin.Forms Build fails after installing Pharmacist NuGets #180

Closed mwerickson closed 3 years ago

mwerickson commented 3 years ago

Describe the bug Build fails after installing Pharmacist

Steps To Reproduce

  1. Install Phamacist nuget into shared project (.Net Standard 2.0)
    <PackageReference Include="Pharmacist.MsBuild" Version="1.*" PrivateAssets="all" />
    <PackageReference Include="Pharmacist.Common" Version="1.*" />
  2. Try to build application
  3. See screenshot

Expected behavior Build succeeds and all events are available as observables

Screenshots image

Environment

Additional context

Seems to be only with a namespace of Xamarin.MacDev and the Shiny Geofence SetState method override. Do I need to exclude these? Or is there some other way to remove these build issues?

DawidBester commented 3 years ago

Also experiencing the same types of issue after installing Pharmacist 2.0.6 as described, all errors are in a file called Pharmacist.Nuget.g.cs, see screenshots. Any ideas on how to fix?:

image

image

image

image

image

Uninstalling Pharmacist resolves the issue.

glennawatson commented 3 years ago

Can you give me a list of the NuGet packages installed?

Seems just some language features are missing and probably worth updating to support them.

DawidBester commented 3 years ago

PackageReferences for the project as follows:

all runtime; build; native; contentfiles; analyzers; buildtransitive all runtime; build; native; contentfiles; analyzers
glennawatson commented 3 years ago

Thanks, I'll have a look at what SyncFusion is doing special since that is the one that seems to be causing an issue. Won't be til tomorrow.

Also if you're using Pharmacist you won't need ReactiveUI.Events.XamForms but that's not what's causing this issue.

DawidBester commented 3 years ago

Thanks for the assistance and additional information.

glennawatson commented 3 years ago

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

This will handle these cases.

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.