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

.Net Core 3.0 functionality forces you into desktop #861

Closed
glennawatson opened this issue Jan 13, 2019 · 3 comments
Closed

.Net Core 3.0 functionality forces you into desktop #861

glennawatson opened this issue Jan 13, 2019 · 3 comments

Comments

@glennawatson
Copy link

glennawatson commented Jan 13, 2019

I am adapting ReactiveUI to use netcoreapp3.0

I am noticing that System.Reactive is forcing you to adopt .NET Core WPF/WinForms no matter what.

Eg from System.Reactive.csproj:

  <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
    <UseWPF>true</UseWPF>
    <UseWindowsForms>true</UseWindowsForms>
  </PropertyGroup>

This could issues where the user is trying to target non-desktop/non-windows environments.

In ReactiveUI we have a separate NuGet package for WPF where we enable this sort of thing not sure best solution is here though for System.Reactive where you are trying to only have one include for a project.

@glennawatson
Copy link
Author

glennawatson commented Jan 13, 2019

The issue it is causing is when compiling without those flags enabled I get errors such as

Interactions\Interaction.cs(174,20): error CS0012: The type 'Control' is defined in an assembly that is not referenced.
 You must add a reference to assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561
934e089'. [C:\source\reactiveui\src\ReactiveUI\ReactiveUI.csproj]
Interactions\Interaction.cs(174,20): error CS7069: Reference to type 'Dispatcher' claims it is defined in 'WindowsBase'
, but it could not be found [C:\source\reactiveui\src\ReactiveUI\ReactiveUI.csproj]
Interactions\Interaction.cs(174,20): error CS7069: Reference to type 'DispatcherObject' claims it is defined in 'Window
sBase', but it could not be found [C:\source\reactiveui\src\ReactiveUI\ReactiveUI.csproj]
Interactions\Interaction.cs(178,47): error CS0411: The type arguments for method 'Observable.Defer<TResult>(Func<IObser
vable<TResult>>)' cannot be inferred from the usage. Try specifying the type arguments explicitly. [C:\source\reactiveu
i\src\ReactiveUI\ReactiveUI.csproj]

With those lines of code referencing Subject etc.

@clairernovotny
Copy link
Contributor

clairernovotny commented Jan 13, 2019

This is a point-in-time issue and is expected to be resolved in later previews of .NET Core 3.

/cc @terrajobst who is working on solving this.

@clairernovotny
Copy link
Contributor

See plan in #864

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