0

i'm trying to use SquishIt in my Asp.net pages, but i'm receiving this error bellow

enter image description here

My code : <%@ Import Namespace="SquishIt.Framework" %>

Web config : debug false

Jon P
  • 19,442
  • 8
  • 49
  • 72
Leogreen
  • 701
  • 1
  • 6
  • 20
  • Are you using VB or C#? The code looks like C#, but the error implies that the compiler thinks it should be VB. If you're using VB, a carriage return is a meaningful part of the language. These lines of code would need to be on the same line, or separated with a `_` maybe? – David Apr 08 '15 at 01:02
  • ok now is working , it's good , one last doubt: i can add all my css files? it's a good pratice? – Leogreen Apr 08 '15 at 01:05
  • Well, you can add any CSS files you want. It's not good practice to send anything to the client that the client won't need, since that's just wasted resources. But if there's no noticeable difference then you can always defer that cleanup to a later time. – David Apr 08 '15 at 01:07

1 Answers1

1

This has nothing to do with whatever SquishIt is.

In VB a carriage return is part of the syntax. (Unlike C# which treats a carriage return as meaningless whitespace.) So this code is invalid:

Bundle.Css()
  .Add("something")
  ' and so on

In VB you'd either need to have it on one line:

Bundle.Css().Add("something") ' and so on

or explicitly separate the lines:

Bundle.Css() _
  .Add("something") _
  ' and so on
David
  • 208,112
  • 36
  • 198
  • 279