Skip to content

Doesn't work with vs2019 (Version 16.11.2) ? #896

@andygemis

Description

@andygemis

Actual behavior

Under vs 2022 - have a sln/csproj and the source generator is working correctly.

Open same sln with 2019 - then get following error

1>CSC : warning CS8785: Generator 'SourceGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'FileNotFoundException' with message 'Could not load file or assembly 'System.Collections.Immutable, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.'

image

Repro steps

  1. NativeMethods.txt content:
SCardEstablishContext
SCardReleaseContext
SCardListReaderGroups
SCardListReaders
SCardGetStatusChange
  1. NativeMethods.json content (if present):
{
  "$schema": "https://aka.ms/CsWin32.schema.json",
  "emitSingleFile": true,
  "public": true
}

Context

  • CsWin32 version: 0.2.206-beta
  • Target Framework: .net framework 4.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions