Fatal error, cannot continue: The method 'ToStringJS' is not generic

The problem is with CSSLint. You can either download the source code and attempt to fix it, or you can simply disable it.

Go to Tools > Options > Chirpy > CssLint

Uncheck the 'Run CSS Lint' box.

If you encounter the same problem with JS, than disable the JSHint as well


I had this problem, and solved it by fixing some invalid css. in my case the invalid css was (notice the misplaced period?)

#exposeMask{.visibility:hidden;}

After fixing the typo, everything came back to life.


The error you guys are getting comes from Jurassic library which is used by Chirpy Add-In.

I did a short lookup in the Chirpy and Jurassic sources and I found the exact place where the exception is thrown and causes the issue you described.

In the Jurassic sources go to Jurassic\Compiler\Binders directory and open JSBinder.cs file. The problems occurs in the protected override void GenerateStub(ILGenerator generator, int argumentCount) method which itself is used to generate another method... yadayadayada. It's quite complex.

Anyway. Here's the code from that file that's responsible for the errors you're getting:

// Line 156 (Change Set df266524321d)
// Convert to the target type.
EmitTypeConversion(generator, typeof(object), argument.Type);

if (argument.Type != typeof(ObjectInstance) && inheritsFromObjectInstance == true)
{
   // EmitConversionToObjectInstance can emit null if the toType is derived from ObjectInstance.
   // Therefore, if the value emitted is null it means that the "thisObject" is a type derived
   // from ObjectInstance (e.g. FunctionInstance) and the value provided is a different type
   // (e.g. ArrayInstance).  In this case, throw an exception explaining that the function is
   // not generic.
   var endOfThrowLabel = generator.CreateLabel();
   generator.Duplicate();
   generator.BranchIfNotNull(endOfThrowLabel);
   generator.LoadArgument(0);
   EmitHelpers.EmitThrow(generator, "TypeError", string.Format("The method '{0}' is not generic", binderMethod.Name));
   generator.DefineLabelPosition(endOfThrowLabel);
}

If you would like to digg a bit deeper, you might take a look at the Jurassic\Library\Array\ArrayInstance.cs and Jurassic\Library\Object\ObjectInstance.cs where the public static string ToStringJS(ScriptEngine engine, object thisObject) is implemented. Also in the Chirpy lib the CSSLint.cs file contains a bit of interesting code lines (places where Jurassic is used).

I must admit, I don't know exactly why you're getting the "fatal error" or how the problem can be fixed. This would require quite a bit of testing/debuggin effort. Anyone?

Anyway, don't blame Resharper! It's great software ;-)