0

I have developped a project A in C# with Visual Studio 2013.

For this project A I have no reference to Microsoft.Web.Infrastructure but a reference to another project B that references Microsoft.Web.Infrastructure.

When I compile the solution, which contains both projects A and B, there is no file Microsoft.Web.Infrastructure.dll in project A bin folder (and this is what I want).

I deployed the project A on a server and when I run this Web app on the server, I have a runtime error :

Unable to load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependency. The specified file cannot be found.

I have checked project A csproj file but there is no reference to Microsoft.Web.Infrastructure.

Do you have an idea ?

Thank a lot in advance.

Eric.

eric.bryan
  • 51
  • 1
  • 8
  • If the file is needed by project B, you'll need to add that file as well. You can add the reference to the dll in proj A so that it is there when u compile it – Jawad Jun 10 '21 at 13:15
  • It should be present in B and get copied to A. [Look here](https://stackoverflow.com/questions/41726487/microsoft-web-infrastructure-dll-not-found-visual-studio-2015). – Hans Passant Jun 10 '21 at 13:40
  • Jawad, Hans Passant : thank you for your answers. The fact is that all my projects compile well, the project A compiles without that dll. The project A worked well before, until those runtime issues. If that dll is only needed by B why should I add it to A ? – eric.bryan Jun 15 '21 at 14:24

0 Answers0