asp.net mvc - Revert reference to System.Web.Mvc back to version 3.0.0.0 -
i received asp.net mvc application needs modified uses system.web.mvc version 3.0.0.0. when copied files on dev machine, noticed reference system.web.mvc broken. first instinct delete reference , add back, worked fine. application compiles. noticed after change references version 3.0.0.1.
here's problem: client's production server has version 3.0.0.0 when deploy on server error saying cannot find 3.0.0.1.
how can change development machine use system.web.mvc version 3.0.0.0 when deploy production, don't issue.
microsoft released microsoft security bulletin ms14-059, security issue critical broke backward compatibility previous versions of mvc 3 , 4. , issue critical, there no way revert machine 3.0.0.0.
however, makes project works mvc 3.0.0.1 not compile on machine mvc 3.0.0.0 installed. remove mvc 3.0.0.0 installed global assembly cache.
mvc 3.0.0.1 on other hand deployed via nuget, , need add reference , recompile in order patch work (if haven't done already).
best solution
the correct solution install the patch on target machine.
a possible alternative
however, if machine (or build server) out of control, following hack make project compile on machines both have patch , don't.
- right-click on project node in solution explorer (the 1 references mvc 3), , click "unload project".
- right-click on again , choose "edit ".
- locate reference
system.web.mvc
, replace elements below. - save project file.
- right-click on project node again , click "reload project".
<!-- due windows update ms14-059, need hack ensure can build mvc3 both on machines have update , don't --> <reference condition=" exists('$(windir)\microsoft.net\assembly\gac_msil\system.web.mvc\v4.0_3.0.0.0__31bf3856ad364e35\system.web.mvc.dll') " include="system.web.mvc, version=3.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35, processorarchitecture=msil" /> <reference condition=" !exists('$(windir)\microsoft.net\assembly\gac_msil\system.web.mvc\v4.0_3.0.0.0__31bf3856ad364e35\system.web.mvc.dll') " include="system.web.mvc, version=3.0.0.1, culture=neutral, publickeytoken=31bf3856ad364e35, processorarchitecture=msil"> <private>true</private> <hintpath>..\packages\microsoft.aspnet.mvc.3.0.20105.1\lib\net40\system.web.mvc.dll</hintpath> </reference>
note need have mvc nuget package installed version 3.0.20105.1 above work, or need adjust version number appropriate match version have.
Comments
Post a Comment