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

Support analyzers created using VS2022 #123

Closed
duncanp-lseg opened this issue Jun 4, 2019 · 2 comments
Closed

Support analyzers created using VS2022 #123

duncanp-lseg opened this issue Jun 4, 2019 · 2 comments

Comments

@duncanp-lseg
Copy link

duncanp-lseg commented Jun 4, 2019

Description

It should be possible to run the exe against analyzers created using the default analyzer template in VS2022.

Repro

  1. Unfold a new analyzer template using the latest updated of VS2022
  2. Build the solution
  3. Run the SDK exe against the resulting NuGet package

Expected result

A jar is created successfully

Actual result

The jar is not created. The error log contains the following output:

Loaded assembly: VS2019Analyzer1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
[DEBUG] Attempting to resolve assembly 'Microsoft.CodeAnalysis, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35', requested by '{unknown}'
[DEBUG] Failed to resolve assembly.
[DEBUG] Attempting to resolve assembly 'Microsoft.CodeAnalysis.Workspaces, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35', requested by '{unknown}'
[DEBUG] Failed to resolve assembly.
Could not instantiate analyzers from 'VS2019Analyzer1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

Error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Notes

The current stable version of Roslyn is v3.3.3. However, the analyzer template references Workspace 2.10.

@themightyzek
Copy link

Is this issue being actively worked on? @duncanp-sonar is there a workaround for this? When Microsoft.CodeAnalysis.Workspaces is added to the directory containing the analyzer, it starts asking for other dependencies(System.Memory, System.Threading.Tasks.Extensions)

@hdpham107
Copy link

I'm looking forward to your support create jar in VS2019 16.x with Roslyn 3.x

@duncanp-lseg duncanp-lseg changed the title Support analyzers created using VS2019 Support analyzers created using VS2022 Nov 15, 2021
@duncanp-lseg duncanp-lseg reopened this Nov 15, 2021
duncanp-lseg pushed a commit that referenced this issue Nov 17, 2021
Fixes #123

* removed manual binding redirects file
* added dummy project with conflicting package resfs to force auto-regen of binding directs
* enable end-to-end tests for Roslyn v3 and v4
duncanp-lseg pushed a commit that referenced this issue Nov 17, 2021
Fixes #123

* removed manual binding redirects file
* added dummy project with conflicting package resfs to force auto-regen of binding directs
* enable end-to-end tests for Roslyn v3 and v4
duncanp-lseg pushed a commit that referenced this issue Nov 17, 2021
Fixes #123

* removed manual binding redirects file
* added dummy project with conflicting package resfs to force auto-regen of binding directs
* enable end-to-end tests for Roslyn v3 and v4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants