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.
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. http://www.dotnet-tricks.com/Tutorial/mvc/0a9M050113-Bundling-and-minification-in-MVC3-and-Asp.Net-4.0.html
I use gedit on linux and the same problem occurs with the .min file.
The reason for the crashing is not the text, but rather your text editor attempting to beautify your code. It gets very confused with the lack of formatting and craps out. Use the regular stylesheet unless .min.css is absolutely necessary.
You should format your css. just find one of the many available css formatter web sites like http://www.cleancss.com/css-beautify/. if you paste to formatted css it will work on vs2010 and vs2015. I solved it couple of times that way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With