Skip to content

Source generators fail on nested/generic types with Roslyn 4.0.1 #605

Closed

Description

@Sergio0694

Describe the bug

Roslyn 4.0.1 doesn't accept special characters in filename hints, and cause generators to fail with nested/generic types.

Steps to reproduce

using System.ComponentModel;
using CommunityToolkit.Mvvm.ComponentModel;

#nullable enable

namespace MyApp;

partial class Foo
{
    partial class MyViewModel<T> : ObservableObject
    {
        [ObservableProperty]
        private string? a;
    }
}

Expected behavior

Should work fine.

IDE and version

VS 2022, VS 2022 Preview

Nuget packages

  • CommunityToolkit.Common
  • CommunityToolkit.Diagnostics
  • CommunityToolkit.HighPerformance
  • CommunityToolkit.Mvvm (aka MVVM Toolkit)

Nuget package version(s)

8.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛An unexpected issue that highlights incorrect behaviormvvm-toolkit 🧰Issues/PRs for the MVVM Toolkit

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions