Question

VS2013 Update 2 claims SCSS support, and indeed I get intellisense which is great. However, scss files are not built into either .css or .min.css files. Is there a step I'm missing or something else I need to install?

The project was originally a VS2011 project where I was using VisualWorkbench for SCSS. This is a new VS2013 install and the project has been upgraded, however, the same thing (no output) seems to happen in a file-new-project scenario.

EDIT

I see now that I need to add the webessentials extension to get compilation. However, this now throws an exception on compilation

17/04/2014 10:43:35: SCSS: Compiling beko_v6.scss
17/04/2014 10:43:36: SCSS: beko_v6.scss compiled.
17/04/2014 10:43:42: An exception was thrown when compiling C:\Data\LocalProjects\Beko2011Azure\Beko2011Azure\Website\Content\beko_v6.scss: System.NullReferenceException: Object reference not set to an instance of an object.
   at MadsKristensen.EditorExtensions.CssSourceMap.CorrectionsForScss(String cssFileContents)
   at MadsKristensen.EditorExtensions.CssSourceMap.CollectRules(String targetFileName)
   at MadsKristensen.EditorExtensions.CssSourceMap.PopulateMap(String targetFileName, String mapFileName)
   at MadsKristensen.EditorExtensions.CssSourceMap.Initialize(String targetFileName, String mapFileName, IContentType contentType)
   at MadsKristensen.EditorExtensions.CssCompilerResult..ctor(String sourceFileName, String targetFileName, String mapFileName, Boolean isSuccess, String result, IEnumerable`1 errors)
   at MadsKristensen.EditorExtensions.CompilerResultFactory.GenerateResult(String sourceFileName, String targetFileName, String mapFileName, Boolean isSuccess, String result, IEnumerable`1 errors)
   at MadsKristensen.EditorExtensions.NodeExecutorBase.ProcessResult(Process process, String errorText, String sourceFileName, String targetFileName, String mapFileName)
   at MadsKristensen.EditorExtensions.NodeExecutorBase.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MadsKristensen.EditorExtensions.Compilers.NodeCompilerRunner.d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MadsKristensen.EditorExtensions.Compilers.CompilerRunnerBase.d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MadsKristensen.EditorExtensions.Compilers.EditorCompilerInvoker.d__0.MoveNext()
17/04/2014 10:43:42: An exception was thrown when compiling C:\Data\LocalProjects\Beko2011Azure\Beko2011Azure\Website\Content\beko_v6.scss: System.NullReferenceException: Object reference not set to an instance of an object.
   at MadsKristensen.EditorExtensions.CssSourceMap.CorrectionsForScss(String cssFileContents)
   at MadsKristensen.EditorExtensions.CssSourceMap.CollectRules(String targetFileName)
   at MadsKristensen.EditorExtensions.CssSourceMap.PopulateMap(String targetFileName, String mapFileName)
   at MadsKristensen.EditorExtensions.CssSourceMap.Initialize(String targetFileName, String mapFileName, IContentType contentType)
   at MadsKristensen.EditorExtensions.CssCompilerResult..ctor(String sourceFileName, String targetFileName, String mapFileName, Boolean isSuccess, String result, IEnumerable`1 errors)
   at MadsKristensen.EditorExtensions.CompilerResultFactory.GenerateResult(String sourceFileName, String targetFileName, String mapFileName, Boolean isSuccess, String result, IEnumerable`1 errors)
   at MadsKristensen.EditorExtensions.NodeExecutorBase.ProcessResult(Process process, String errorText, String sourceFileName, String targetFileName, String mapFileName)
   at MadsKristensen.EditorExtensions.NodeExecutorBase.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MadsKristensen.EditorExtensions.Compilers.NodeCompilerRunner.d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MadsKristensen.EditorExtensions.Compilers.CompilerRunnerBase.d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MadsKristensen.EditorExtensions.Compilers.EditorCompilerInvoker.d__0.MoveNext()

Was it helpful?

Solution

@vulcanRaven (and Mads via twitter) are right. The nightly build avoids this. To install

http://vswebessentials.com/download#nightly

As well as those instructions you also have to go back into "Extensions and Updates" then online then install the WebEssentials from the newly created WebEssentials Nightly feed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top