简体   繁体   中英

Could not load file or assembly or one of its dependencies for all packages in project

My pc crashed while my asp.net web application began to run. It did not fully load when this happened. When my pc was restarted, the web application would no longer run. I kept getting 'Could not load file or assembly 'name' or one of its dependencies' for all my packages. First time I got the error for one package so I re-installed it and ran the web application again, then a got the same error with a second package and I did the same. This was a continuous cycle and I could not do this for each package I have installed in the project because there are so many.

I tried many solutions that were posted for a single occurrence of this error such as here , and others but these have not solved my problem.

Does anyone have a solution to this problem? Or know why it has happened?

Sorry my friend... this sounds like corrupted manifest files to me (I recently had the same issue). Unfortunately I could not find an elegant way to fix it, although I do have some tips on how you can fix it (albeit an arduous process):

  1. Make sure all your assembly bindings redirects to the latest versions of all your assemblies. MSDN Article on assembly binding redirect Another MSDN article on assembly binding redirect
  2. Set build output to verbose (In VS2013 > Tools > Options > Projects and Solutions > Build and Run > MSBuild project build output verbosity. You then need to evaluate the build output from your Visual Studio output window during build to determine the causes of assembly conflicts within your solution as well as were you might find the conflicting assemblies within your solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM