Asp.net core .cs web host project has a reference to package "ABC", version 1.0.1. If I set the package source to restore ABC directly from the feed and build, run the application it all works fine. Let's say, If I have the code base of ABC (.net standard
assembly) and I want to make some changes and test/debug it locally, this is what I usually does:
I make changes in ABC project, create a local nuget package (.nupkg and .snupkg) with a version greater than or equal to 1.0.1
Set the package source in asp.net core project to restore from the local folder where I have the nuget pkg (or MS VS Offline Pkgs folder) and build, run the project.
Though it restores,builds fine, I am getting a runtime error from the host:
FileLoadException: Could not load file or assembly 'ABC, Version=1.0.1, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
If I follow the same steps and tried to restore/debug local nuget pkg for a .net core console app, it works perfectly fine. This behaviour is happening only in asp.net core web app.
Could you please clarify what “ABC” are you using. Do you get the package form browse or create the package by your self.
Please provide the full package name and version in your test if you get it form browse. could you please provdie the more deatil about the package about the "ABC" if you create it by your self. You can provide the package and I can following your steps
to reproduce the error intrenal. Would you please also tell me your visual studio version?
if you update the version number of the nuget package, you need to update the package reference in the project file to the new version (.net core does not support runtime rebinding).
None
0 Points
1 Post
FileLoadException: During runtime for an assembly "package referenced" (local nuget) from asp.ne...
Dec 24, 2019 12:20 AM|code_explorer|LINK
Here's the situation what I am facing with:
Asp.net core .cs web host project has a reference to package "ABC", version 1.0.1. If I set the package source to restore ABC directly from the feed and build, run the application it all works fine. Let's say, If I have the code base of ABC (.net standard assembly) and I want to make some changes and test/debug it locally, this is what I usually does:
Though it restores,builds fine, I am getting a runtime error from the host:
FileLoadException: Could not load file or assembly 'ABC, Version=1.0.1, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
If I follow the same steps and tried to restore/debug local nuget pkg for a .net core console app, it works perfectly fine. This behaviour is happening only in asp.net core web app.
Appreciate your valuable inputs. Thank you.
Member
70 Points
34 Posts
Re: FileLoadException: During runtime for an assembly "package referenced" (local nuget) from as...
Jan 07, 2020 06:10 AM|DEVSupport_MSFT|LINK
Hi,
Could you please clarify what “ABC” are you using. Do you get the package form browse or create the package by your self.
Please provide the full package name and version in your test if you get it form browse. could you please provdie the more deatil about the package about the "ABC" if you create it by your self. You can provide the package and I can following your steps to reproduce the error intrenal. Would you please also tell me your visual studio version?
Appreciate your communication, Thank you
All-Star
58114 Points
15633 Posts
Re: FileLoadException: During runtime for an assembly "package referenced" (local nuget) from as...
Jan 07, 2020 05:36 PM|bruce (sqlwork.com)|LINK
if you update the version number of the nuget package, you need to update the package reference in the project file to the new version (.net core does not support runtime rebinding).
Member
70 Points
34 Posts
Re: FileLoadException: During runtime for an assembly "package referenced" (local nuget) from as...
Feb 24, 2020 02:37 AM|DEVSupport_MSFT|LINK
Hi,
I can't reproduce your problem internal. Please try the things in following link which provide several resolves.
https://social.technet.microsoft.com/wiki/contents/articles/5017.troubleshooting-the-located-assembly-s-manifest-definition-does-not-match-the-assembly-reference.aspx
Member
70 Points
34 Posts
Re: FileLoadException: During runtime for an assembly "package referenced" (local nuget) from as...
Mar 02, 2020 06:22 AM|DEVSupport_MSFT|LINK
Hi
Thanks you for your patient. Does the steps in the link help you to solve your problems.