Alex Rivera | Logout

Opening bootstrap.min.css crashes VS2010

Asked 2013-06-06T12:30:04.667
13

Any idea why opening up a minified version of bootstrap.min.css would crash VS2010? It doesn't happen with non-minified file. I know... I know.. a valid solution might be "don't open up bootstrap.min.css in VS2010"-- which is similar advice I got when I told my doctor that it hurts me "when I do this"-- but seriously folks, is there some known issue with VS2010. I'm thinking maybe it's also got something to do with resharper running- but I have yet to dig that deep.

Edit: Actually found this: http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2422744-when-opening-a-large-minimized-css-file-visual-st

If this is correct, this was fixed in VS2010.

Edit
Report

1 Answer

11

I know where you're coming from, because I've had the same problem.

In the visualstudio uservoice link, Mads K. says, "This is fixed in VS11". So the fix is in Visual Studio 2012, not in VS2010.
https://en.wikipedia.org/wiki/Microsoft_Visual_Studio#Version_history

However, might I suggest another method of attacking the problem?

Completely ignore the .min file.

Completely ignore it, because:
(1) The .min css file, even when we do want to edit it, is a pain to edit. At least that has been my experience.
(2) If you use the Microsoft ASP.NET Web Optimization Framework, you can use bundling and minification, so then there is no need to work with .min files, because the Optimization framework will do the minification for you, even in VS2010 .NET 4.0. Then you can edit the un-minified .css file, and let .NET do the minification for you. It's a win-win from my perspective.

One thing to keep in mind if you should happen to have a bunch of stylesheets with a bunch of rules that you want to bundle into one single .css file are the limitations of Internet Explorer: http://support.microsoft.com/kb/262161.

Some relevant posts:
1. http://kwilson.me.uk/blog/enabling-bundling-and-minification-support-in-a-net-4-application/
2. http://igorzelmanovich.blogspot.com/2012/09/using-aspnet-bundling-and-minification.html
3. answered 2013-06-07T00:35:20.840

Your Answer