In our project we use LESS and CSS minification, but we don't want to check the minified CSS files into Subversion since they are easily rebuilt during the build - or so we thought.
The problem is that when Web Essentials is configured to automatically compile LESS files on build, it'll then produce an exception if the minified CSS file doesn't already exist (see below) and a second or two later VS2012 crashes...
System.IO.FileNotFoundException: Could not find file 'C:\Lokale Dateien\eCS\GSIS\eCS.GSIS\Content\Content.min.css'.
File name: 'C:\Lokale Dateien\eCS\GSIS\eCS.GSIS\Content\Content.min.css'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
at System.IO.File.ReadAllText(String path)
at MadsKristensen.EditorExtensions.LessProjectCompiler.MinifyFile(String lessFileName, String source)
at MadsKristensen.EditorExtensions.LessProjectCompiler.Completed(CompilerResult result)
at MadsKristensen.EditorExtensions.LessCompiler.ProcessExited(Object sender, EventArgs e)
at System.Diagnostics.Process.OnExited()
at System.Diagnostics.Process.RaiseOnExited()
at System.Diagnostics.Process.CompletionCallback(Object context, Boolean wasSignaled)
at System.Threading._ThreadPoolWaitOrTimerCallback.WaitOrTimerCallback_Context(Object state, Boolean timedOut)
at System.Threading._ThreadPoolWaitOrTimerCallback.WaitOrTimerCallback_Context_f(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallback(Object state, Boolean timedOut)
If all .min.css files exist (i.e. by opening the LESS file by hand and saving it again) the build finishes without problems and Visual Studio doesn't crash.