Skip to content
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

Update Nuget version breaks #345

Open
quintonn opened this issue Dec 24, 2017 · 4 comments
Open

Update Nuget version breaks #345

quintonn opened this issue Dec 24, 2017 · 4 comments

Comments

@quintonn
Copy link

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

@quintonn
Copy link
Author

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();

@AlexCuse
Copy link
Collaborator

AlexCuse commented Jan 2, 2018

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?

@quintonn
Copy link
Author

quintonn commented Jan 3, 2018

Yes, i am writing my own build utility to minify css

@AlexCuse
Copy link
Collaborator

AlexCuse commented Jan 3, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants