Assman precompile configuration not working

Aug 30, 2013 at 5:57 PM
Hey,

I have an issue which I cannot seem to resolve, I have followed your sample MVC project exactly making sure that I am using the Assman.Config correctly and have everything I need in my .csproj file and I seem to be getting an issue with with the ‘css’ parameter being null. Here is the full error code:
The "PreCompileResources" task failed unexpectedly.
System.ArgumentNullException: Value cannot be null.
Parameter name: css
   at Yahoo.Yui.Compressor.YUICompressor.Compress(String css, Int32 columnWidth)
   at Yahoo.Yui.Compressor.CssCompressor.Compress(String css, Int32 columnWidth, CssCompressionType cssCompressionType)
   at Assman.YuiCompressor.YuiCompressorCssContentFilter.FilterContent(String content, ContentFilterContext context)
   at Assman.ContentFiltering.ContentFilterPipeline.FilterContent(String unfilteredContent, ContentFilterContext context)
   at Assman.ResourceCompiler.CompileResource(IResource resource)
   at Assman.ResourceCompiler.CompileUnconsolidatedResources(ResourceType resourceType, Action`1 handleCompiledResource)
   at Assman.ResourceCompiler.CompileAllResourcesOfType(ResourceType resourceType, Action`1 onCompiled)
   at Assman.ResourceCompiler.CompileAll(Action`1 handleConsolidatedResource)
   at Assman.BuildSupport.PreCompileCommand.ConsolidateAll(AssmanConfiguration configSection)
   at Assman.BuildSupport.PreCompileCommand.Execute()
   at Assman.BuildSupport.MSBuild.PreCompileResources.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)
I have played with the idea that this is an issue with CSS files having errors, being empty or not existing and this does not seem to be the problem. I have also played with the settings in my .csproj file to see if that has any affect, which again does not make any difference, here is our .csproj code:
<Import Project="..\packages\Assman.Core.2.1.0\Tools\Assman.MSBuild.tasks" />
  <UsingTask TaskName="PreCompileResources" AssemblyFile="$(WebProjectOutputDir)\bin\Assman.dll" />
  <Target Name="PreCompileResources" AfterTargets="AfterBuild" Condition="$(PreCompileResources)=='true'">
    <PreCompileResources WebRoot="$(WebProjectOutputDir)" />
  </Target>
  <Target Name="CleanPreCompiledResources" AfterTargets="Clean">
    <Delete Files="$(WebProjectOutputDir)\bin\Assman.compiled" />
  </Target>
If you can help us get to the bottom of this issue I will be extremely grateful.