Monday, 15 March 2010

asp.net mvc 4 - Running System.Web.Razor 1.0 and 2.0 side by side? -



asp.net mvc 4 - Running System.Web.Razor 1.0 and 2.0 side by side? -

i'm trying deploy site hosting provider , maintain receiving next error:

could not load file or assembly 'system.web.razor' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040)

[fileloadexception: not load file or assembly 'system.web.razor' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040)]

[fileloadexception: not load file or assembly 'system.web.razor, version=2.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040)]

...

[configurationerrorsexception: not load file or assembly 'system.web.razor, version=2.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040)]

...

[httpexception (0x80004005): not load file or assembly 'system.web.razor, version=2.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040)]

...

the site built using asp.net 4 , mvc 4. works fine on development machine running windows 8. i've copied system.web.razor.dll bin folder on server doesn't create difference, though appears v1.0 versioned assembly (~260k).

i've looked in c:\windows\assembly , don't see in there system.web.razor. however, have next 2 files:

c:\windows\assembly\nativeimages_v4.0.30319_64\system.web.razor\04eb82505c0086e8eb097d1408183aa0\system.web.razor.ni.dll (776k, file version: 1.0.20105.407)

c:\windows\assembly\nativeimages_v4.0.30319_64\system.web.razor\ab032b45c588b488ebca535054d827bc\system.web.razor.ni.dll (1823k, file version: 2.0.20715.0)

however, copying v2 assembly here didn't work, though don't think right file anyway v1 assembly file sizes don't match either.

any ideas on going on here?

i'm guessing hosting provider doesn't have installed (as maintain telling me set in bin folder), i'm curious why can't find system.web.razor v2 dll anywhere.

to debug, uploaded empty website basic template worked fine. interestingly, when added reference postal , deployed again, got error - when reverted files back, error persisted! why happen?

any help appreciated. starting sense little out of ideas.

edit 1

created new empty project, added razor 2 nuget, set system.web.razor.dll re-create local (2.0.20715.0, 260k), published, grabbed file , uploaded it, , still same error? seems dll won't picked up.

edit 2

eventually gave trying utilize hosting provider in question. didn't have asp.net mvc 4 installed on server, think problem. tried different host have installed , works fine.

razor asp.net-mvc-4 hosting razor-2

No comments:

Post a Comment