Could not load file or assembly - Added computer name

0

I have an MVC site on C# which I develop on several machines and use a share for syncing the code. After some iterations I am not able to start it through Visual Studio and I get:

Could not load file or assembly 'Site-MyComputer' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

The "-MyComputer" part was added by the studio and even after I searched for MyComputer in the solution files I was not able to locate where it was referred from. My log says:

=== Pre-bind state information ===
LOG: DisplayName = Site-MyComputer
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Site-MyComputer | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:<file path>/Site/
LOG: Initial PrivatePath = <file path>\Site\bin
Calling assembly : (Unknown).
===
c#
model-view-controller
.net-assembly
asked on Stack Overflow Jul 31, 2019 by Satory • edited Jul 31, 2019 by Ped7g

1 Answer

0

After a lot of digging I have found the solution - in the bin folder in the solution, which is hidden by default in the Solution explorer there was the file with the wrong name in addition to the normal one. After I deleted it from the Solution explorer everything is working!

answered on Stack Overflow Aug 1, 2019 by Satory

User contributions licensed under CC BY-SA 3.0