dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
6.84k stars 1.13k forks source link

Unable to use Source Generator in VSTO with WPF #9053

Open Snailya opened 3 weeks ago

Snailya commented 3 weeks ago

Description

I want to use ReactiveMarbles.ObservableEvents.SourceGenerator in a VSTO project. The UI in the project is implemented using WPF. As long as a WPF User Control is added to the project, the project fails to build with an error: The type or namespace name 'ReactiveMarbles' could not be found (are you missing a using directive or an assembly reference?)

Reproduction Steps

  1. create an new Visio project with visual stuido
  2. add nuget package ReactiveMarbles.ObservableEvents.SourceGenerator
  3. add reference to presentationcore and presentationframework
  4. create a new window with sample code from https://www.reactiveui.net/docs/handbook/events.html
  5. add a new WPF User Control

Expected behavior

successful build

Actual behavior

The type or namespace name 'ReactiveMarbles' could not be found (are you missing a using directive or an assembly reference?)

Regression?

No response

Known Workarounds

No response

Impact

No response

Configuration

.NET version: .NET framework 4.8

Other information

No response