I want to add MVC futures to my project and make the assembly available in my spark views however it's not accepting it whatsoever.
I can use Microsoft.Web.Mvc fine from my classes (controllers/models etc) but they're just not showing up in .spark files.
I cannot use <use assembly""/>
since that kills my intellisense. And
if i try to add <use namespace='Microsoft.Web.Mvc" />
its not
finding .Web
.
I also cant add assemblies in the web.config
spark section as that kills
intellisense too.
This:
public void RegisterViewEngines(ViewEngineCollection engines)
{
if (engines == null) throw new ArgumentNullException("engines");
var settings = new SparkSettings();
settings.SetAutomaticEncoding(true);
settings
.AddNamespace("System")
.AddNamespace("System.Collections.Generic")
.AddNamespace("System.Linq")
.AddNamespace("System.Web.Mvc")
.AddNamespace("System.Web.Mvc.Html")
.AddNamespace("Microsoft.Web.Mvc");
settings
.AddAssembly("Microsoft.Web.Mvc")
.AddAssembly("Spark.Web.Mvc")
.AddAssembly("System.Web.Mvc, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35")
.AddAssembly("System.Web.Routing, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35");
engines.Add(new SparkViewFactory(settings));
}
Throws no errors and doesn't kill my intellisense in spark files but it also doesnt seem to want to import the assembly even still.
The Microsoft.Web.Mvc.dll is set to Copy Local to the running bin too.
What am i overlooking any help would be much appreciated.