-
Notifications
You must be signed in to change notification settings - Fork 507
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
TypeLoadException with .NET Core RC4 and malformed stylecop.json #2290
Comments
Sometimes I also see the following error:
|
I am also getting the above error 100% of the time with the RC3 tooling with |
Adding |
This seems to be an issue with Json.NET. I noticed that we are using quite an old version of it as well. Maybe upgrading Json.NET to 9.0.1 will solve this issue. |
@vweijsters I expect you are correct regarding cause and solution. |
I've run into this too and i'm not using a ruleset file. I'm just using the stylecop.json |
I have same issue on Linux as well. |
@fubar-coder 📝 Comments aren't allowed in strict JSON, but the parser we use allows them. |
I get TypeLoadException as well when trying to use stylecop.json. I am using the latest version of the .Net SDK 1.0 that was released with VS2017 |
Same here, failing when using stylecop.json (without comments) and the SDK from VS2017. |
Similar here, getting a buttload of warnings after migrating to new csproj:
|
It would be great if a 1.0.1 release of StyleCop could include the fix for this. |
Getting the same error with a well formed JSON file.
|
Prepared a PR to fix this issue in 1.0.0. |
@vweijsters There doesn't seem to be a due date for 1.0.1 or 1.1.0-beta2. When can we expect it? |
@sharwell Is there anything we can do to help get this fix out the door? We have a linux build server that cannot enforce our rules because of this error |
This should be fixed with 1.0.2. |
I added StyleCop.Analyzers to my project and managed to manually add a ruleset file to the csproj.
Creating the project
The ruleset file
The project file
The stylecop.json file
This file is malformed, because comments aren't allowed in the project.json file.
Commands
Output
Expected output
Either a good error message that the project.json is invalid or accepting the json file and not throwing the
TypeLoadException
Additional information
The error doesn't appear when run from inside VS 2017.
The text was updated successfully, but these errors were encountered: