Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
andygemis opened this issue Mar 22, 2023 · 0 comments · Fixed by #938
Closed

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

andygemis opened this issue Mar 22, 2023 · 0 comments · Fixed by #938
Labels
bug Something isn't working

Comments

@andygemis
Copy link

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
@andygemis andygemis added the bug Something isn't working label Mar 22, 2023
AArnott added a commit that referenced this issue May 24, 2023
Fixes #896 and brings back VS2019 support.
AArnott added a commit that referenced this issue May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant