닷넷관련/ASP.NET MVC 🍕

System.Net.Http.Formatting 5.2.7 에러 대처 방법

재우니 2021. 12. 28. 13:53

 

Could not load file or assembly 'System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

 

System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. 

The system cannot find the file specified. System.Net.Http.Formatting came from Microsoft.AspNet.WebApi.Client (NuGet), and in assembly System.Net.Http.Formatting.dll.

 

 

해결방법

 

NuGet 에서 Microsoft.AspNet.WebApi.Client 를 최신 버전 5.2.7로 System.Net.Http.Formatting 업데이트 하기만 하면 됩니다. VISUAL STUDIO 에서 '솔루션 정리' 하고 '솔루션 다시 빌드' 하세요.

 

 

https://stackoverflow.com/a/65785609

 

Can't load Assembly System.Net.Http.Formatting in .Net Solution

I get the following error when trying to update-package on the NuGet Console: At line:1 char:1 + Update-Package Microsoft.AspNet.WebApi -reinstall + CategoryInfo : InvalidOperation: (:) [...

stackoverflow.com