Skip to content

Source Generator support for WPF project blocked? #3404

@Marv51

Description

@Marv51

Version Used:
dotnet 5 preview 8, visual studio 16.8 preview 2

Steps to Reproduce:
Create fresh WPF project from VS modify project like this:

<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <OutputType>WinExe</OutputType>
        <TargetFramework>net5.0-windows</TargetFramework>
        <UseWPF>true</UseWPF>
        <LangVersion>preview</LangVersion>
    </PropertyGroup>

    <ItemGroup>
	    <ProjectReference Include="..\SourceGenerators\SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
    </ItemGroup>
</Project>

Expected Behavior:
The source generator referenced works for me in a console dotnet core app. I would expect this to work in a WPF project too.

Actual Behavior:
In a freshly created WPF (dotnet core) project from the VS-template, however the generator does not seem to run.

Is this intended behavior?

As the generator is not used at all, I have not included it here. It is a slight variation of the HelloWorld sample.

Metadata

Metadata

Assignees

Labels

BugProduct bug (most likely)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions