views:

645

answers:

1

I am trying to upgrade the ASP.NET MVC 1.0 application to 2.0 preview 1. I am using the spark as view engine.

issue: Spark used the System.Web.MVC 1.0.0.0 so I got the source code and recompiled using the 2.0.0.0 and used the new assembly. Now I am getting the different error as follows:

Could not load file or assembly 'Microsoft.Web.Mvc' or one of its dependencies. The system cannot find the file specified.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Web.Mvc' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 163: return new ViewEngineResult(searchedLocations); Line 164: Line 165: entry = Engine.CreateEntry(descriptor); Line 166: SetCacheValue(descriptorParams, entry); Line 167: return BuildResult(entry);

Source File: C:\Data\Projects\Samples\spark 1.0 Src\src\Spark.Web.Mvc\SparkViewFactory.cs Line: 165

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Web.Mvc' could not be loaded.

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

+3  A: 

My experience:

  1. Get Spark source from this link: Spark development builds
  2. Replace the file bin\aspnetmvc\System.Web.Mvc.dll with the 2.0 version (from %ProgramFiles%\Microsoft ASP.NET\ASP.NET MVC 2\Assemblies)
  3. Execute the build.cmd script
  4. The updated Spark.dll & Spark.Web.Mvc.dll are available in the build folder

Notes: on the time of writing, the available spark development version is 1.0.39961.0. The build script fails while looking for a jsunit file (I believe) but the DLLs are generated properly before it breaks. Just cancel its execution by hitting Ctrl+C when the error is displayed otherwise it'll retry the operation.

Hope it helps.

Jorge Alves
Thank you for the answer
Bharat