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-sonar opened this issue Jun 4, 2019 · 2 comments
Closed

Support analyzers created using VS2022 #123

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

Comments

@duncanp-sonar
Copy link
Contributor

duncanp-sonar 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.

@duncanp-sonar duncanp-sonar added this to To do in SDK cleanup via automation Jun 10, 2020
@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-sonar duncanp-sonar changed the title Support analyzers created using VS2019 Support analyzers created using VS2022 Nov 15, 2021
@duncanp-sonar duncanp-sonar moved this from To do to In progress in SDK cleanup Nov 15, 2021
SDK cleanup automation moved this from In progress to Done Nov 15, 2021
@duncanp-sonar duncanp-sonar moved this from Done to In progress in SDK cleanup Nov 15, 2021
@duncanp-sonar duncanp-sonar reopened this Nov 15, 2021
duncanp-sonar added 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-sonar added 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
SDK cleanup automation moved this from In progress to Done Nov 17, 2021
duncanp-sonar added 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
No open projects
SDK cleanup
  
Done
Development

No branches or pull requests

3 participants