SquishIt
SquishIt copied to clipboard
Update Nuget version breaks
The following code crashes in visual studio 2017 .net 4.6.1: var cssBundle = new SquishIt.Framework.CSS.CSSBundle();
Error: Object reference not set to an instance of an object.
at SquishIt.Framework.CSS.CSSBundle..ctor() in c:\Users\alexu\git\SquishIt\SquishIt.Framework\CSS\CSSBundle.cs:line 64 at BuildHelper.Program.BuildWebsiteTemplate() in D:\Projects\WebsiteTemplate\BuildHelper\Program.cs:line 38 at BuildHelper.Program.Main(String[] args) in D:\Projects\WebsiteTemplate\BuildHelper\Program.cs:line 14
I replaced that 1 line with the following and it's working now:
Configuration.Instance.Platform = new PlatformConfiguration(); Configuration.Instance.Platform.CacheImplementation = new CacheImplementation(); Configuration.Instance.Platform.DebugStatusReader = new DebugStatusReader(); Configuration.Instance.Platform.TrustLevel = new MyTrustLevel(); Configuration.Instance.Platform.PathTranslator = new PathTranslator();
var cssBundle = Bundle.Css();// new SquishIt.Framework.CSS.CSSBundle();
I'm not fully understanding your reply but in general you want to use those static methods off of Bundle class as the entry point to working with bundles. Are you trying to use SquishIt.Framework directly (without the asp.net integration) in some kind of build utility?
Yes, i am writing my own build utility to minify css
Hmm have not thought about this in a long time (there used to be a command line utility included in this project). Have you had much success?