Visual Studio For Mac Stylecop
Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upScreenshot of Visual Studio editing a.ruleset file, disabling StyleCop rules. There are multiple ways to lint C# for code formatting, styling inconsistencies, plus.
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
Comments
commented Aug 15, 2017 •
Environment data
VS Code version: 1.15.0 Steps to reproduceFollow the steps here to enable StyleCop.Analyzers: Expected behavior
Actual behaviorWarnings reported in the 'Problems' tab of VS Code are not changed from the default set (even after restarting OmniSharp), but running |
commented Aug 15, 2017
Thanks for taking the time to report this issue. We're using #43 to track this work for the future. |
Posts
Probably worth posting on the GitHub site for the third party StyleCop addin. Looking at the StyleCop addin I do not think it configures anything to allow running StyleCop when compiling. It adds some menu options so you can run it from Xamarin Studio but does not install anything into Mono the framework.
Looking at your error message it seems to be missing the StyleCop.dll file. It looks like XBuild found the StyleCop.targets file though which is probably referenced by your project. The StyleCop.dll is included with the StyleCop addin. You can probably change the path in the StyleCop.targets file to point to the StyleCop.dll or if you are OK with putting some files in the Mono directory you could copy it there. The other alternative is to not use StyleCop when compiling but run it manually from the Solution window.
On the Xamarin Forms Lab GitHub the project uses the StyleCop.settings file. The path it uses for StyleCop.dll is defined in the StyleCop.settings file. Now the path as it stands will work fine on Windows since the StyleCop installer will add StyleCop.dll to the correct directory. There is no StyleCop installer for Mac. So you will need to make these files available somewhere on your Mac.
Sony walkman nwz-b133f drivers for mac. hi @mattward thanks for your feedback, i thought the StyleCop addin added the dll to mono tac or something, guess not.
will try to a manual copy to see if it works.
- PTInsider, University, Developer Group Leader✭✭
I forgot the fact it use a installed dll, my goal was to add stylecop to the build process without install the stylecop..
- PTInsider, University, Developer Group Leader✭✭
Liked I said, I missed one step, is requeriment to add the stylecop.dll and then change the targets file for the correct path.
But I found a easy solution for it, we only need to install this nuget:
https://www.nuget.org/packages/StyleCop.MSBuild/but... after some tests in Windows and in a Mac I found that there is a issue when I build in MAC
StyleCop.targets: error : Error executing task StyleCopTask: parserType
Parameter name: Must not be nullyou can see this
https://stylecop.codeplex.com/workitem/7274and for this reason we can use until it be fixed!
- PTInsider, University, Developer Group Leader✭✭
I created this issue in stylecop project
https://stylecop.codeplex.com/workitem/7659you can vote!