Skip to content

No code generation when building with .NET 6 SDK #1635

@Y-YoL

Description

@Y-YoL

Bug description

Title only

Repro steps

Run Build.ps1 of this MR
Y-YoL/messagepack-test#2

Expected behavior

Build succeeded.

Actual behavior

I get warning CS8784 and error CS0103

CSC : warning CS8784: Generator 'MessagePackGenerator' failed to initialize. It will not contribute to the output and c
ompilation errors may occur as a result. Exception was of type 'FileNotFoundException' with message 'Could not load fil
e or assembly 'System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. 指定さ
れたファイルが見つかりません。'

error CS0103: The name 'GeneratedMessagePackResolver' does not exist in the current context 
  • Version used: v2.6.100-alpha
  • Runtime: (e.g. .NET Framework, .NET Core, Unity, mono, etc.)
.NET SDK (reflecting any global.json):
 Version:   6.0.408
 Commit:    0c3669d367

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22621
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.408\

Host:
  Version:      7.0.5
  Architecture: x64
  Commit:       8042d61b17

Additional context

I didn't have the issue when building using the .NET 7 SDK

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions