0

We have an application built with .net 6.0 and released for users (say version 5.0). Recently we are coming up with a hotfix/patch for the existing 5.0 users (calling this version 5.1). However, due to some reasons, we will not be giving the entire build of 5.1, instead we will only provide the affected dlls to the users.

After copying the affected files from v5.1 into v5.0, the application will not launch with an error saying "System.IO.FileLoadException: Could not load file or assembly 'MyApplication.Tools, Version=1.21005.8444.21489, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)"

Is there specific property that I can set for this kind of hotfix patch to work? I tried setting below but no luck. I couldn't find 'SpecificVersion' property as we have in .net framework.

<PropertyGroup> 
<DisableTransitiveProjectReferences>true</DisableTransitiveProjectReferences>
</PropertyGroup>

Previously we were on .net framework 4.6.x and this hotfix patch method works flawlessly.

Athena_92
  • 29
  • 5
  • You might need to add or update some assembly binding redirects. I have not used .Net 6 yet, so I'm not sure exactly how it's done there. – JonasH Feb 14 '23 at 07:53

0 Answers0