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

An instance of analyzer Microsoft.CodeQuality.Analyzers.QualityGuidelines.AvoidDuplicateElementInitialization cannot be created from... #3346

Closed
osudude opened this issue Mar 5, 2020 · 3 comments

Comments

@osudude
Copy link

osudude commented Mar 5, 2020

Analyzer package

Microsoft.CodeAnalysis.FxCopAnalyzers

Package Version

v2.9.6

Repro steps

Turned on code analyzer in visual studio for C# project : Microsoft.CodeAnalysis.FxCopAnalyzers 2.9.6
Turned off Binary analyzers.

Expected behavior

Works fine in VS2019.
Encounters errors on TFS 2017 build server. What version of TFS is required for Microsoft.CodeAnalysis.FxCopAnalyzers support?

Actual behavior

TFS Build error
CSC (0, 0)
CSC(0,0): Warning CS8032: An instance of analyzer Microsoft.CodeQuality.Analyzers.QualityGuidelines.AvoidDuplicateElementInitialization cannot be created from C:\TFS2017BuildAgent_work\232\s\packages\Microsoft.CodeQuality.Analyzers.2.9.6\analyzers\dotnet\cs\Microsoft.CodeQuality.Analyzers.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=2.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..

@mavasani
Copy link
Contributor

mavasani commented Mar 5, 2020

You need at least VS2017 15.9

@osudude
Copy link
Author

osudude commented Mar 5, 2020

Just checked and we are currently running TFS Version 15.117.27414.0

@mavasani
Copy link
Contributor

mavasani commented May 5, 2020

Thanks for confirming. Closing this as by design. Please move to version 15.9 at least

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

2 participants