본문 바로가기
ASP.NET4/MVC

Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from ..

by Jundol 2019. 3. 15.

서버 환경 

windows 7 professional K

IIS 7.5 

ASP.NET framework 4 설치완료인 상태에서 


MVC5 로 제작된 사이트를 구동하려 올렸으나 제목과 같은

Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


Razor version2.0.0.0 의 dll 파일을 로딩하지 못한듯한 에러를 뿜어냈다.


https://stackoverflow.com/questions/19963307/how-to-install-asp-net-mvc-5-on-a-server


스택오버 플로우를 뒤져봤지만 별도로 MVC 를 설치하는게 아니라는 답변만 달려있었다.

이건 나도 알고있다. MVC는 설치하는게 아니라는걸.

근데 왜 안될까 더 검색해보니

https://stackoverflow.com/questions/11246861/could-not-load-file-or-assembly-system-web-webpages

[ install the Web Pages Version 2 on the server. ]

Web Pages Version 2 를 서버에 install 하라는 말이 있어 얼른 설치해봤다.


install 파일 다운로드 페이지

https://www.microsoft.com/ko-KR/download/details.aspx?id=34600


설치하고 iis 다시시작하니 정상적으로 로딩!


아마 낮은 버전의 iis에서는 별도로 install 해줘야 하는것같다.


파일명: AspNetWebPages2Setup.exe

첨부된 파일은 위변조되지않은 정상적인 MS사에서 제공하는 파일입니다.

의심되시면 위 URL insatll 다운로드 페이지에서 다운받아 설치하세요~

AspNetWebPages2Setup.exe



'ASP.NET4 > MVC' 카테고리의 다른 글

MvcBuildViews. 뷰의 오류를 빌드하면서 잡아내자.  (0) 2017.03.23

댓글