VS2013 Update2 RC支持SCSS

时间:2014-04-17 08:56:35

标签: visual-studio sass visual-studio-2013 web-essentials

VS2013 Update 2声称SCSS支持,事实上我得到了智能感知功能。但是,scss文件不会内置到.css或.min.css文件中。是否有一个我缺少的步骤或我需要安装的其他东西?

该项目最初是一个VS2011项目,我使用VisualWorkbench进行SCSS。这是一个新的VS2013安装,项目已经升级,但是,在文件 - 新项目场景中似乎发生了同样的事情(没有输出)。

修改

我现在看到我需要添加webessentials扩展来获取编译。但是,这会在编译时引发异常

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

1 个答案:

答案 0 :(得分:1)

@vulcanRaven(和Mads通过推特)是对的。每晚构建避免这种情况。安装

http://vswebessentials.com/download#nightly

除了这些说明,您还必须回到"扩展和更新"然后在线然后从新创建的WebEssentials Nightly feed安装WebEssentials。