Andy Green
asked on
Could not load file or assembly 'Microsoft.Web.Infrastructure
Hi
We have a web site that we have just converted to a web app, so we can use TFS (Git) source control and have automated builds from TFS.
The code from TFS builds and runs OK on the production server, and it runs OK on my colleagues dev machine - it was he that did this work.
If I take a branch from the server and run, it downloads all the missing Nuget packages OK, but the website errors with:
Could not load file or assembly 'Microsoft.Web.Infrastruct ure
I'm using IIS.
Lower down in the stack trace we also have :
The pre-application start initialization method Start on type System.Web.Optimization.Pr eApplicati onStartCod e threw an exception with the following error message: Could not load file or assembly 'Microsoft.Web.Infrastruct ure.
Neither of us can see any reason why, we have compared installs, and version and paths.
Has anyone see the like before.
Andy
We have a web site that we have just converted to a web app, so we can use TFS (Git) source control and have automated builds from TFS.
The code from TFS builds and runs OK on the production server, and it runs OK on my colleagues dev machine - it was he that did this work.
If I take a branch from the server and run, it downloads all the missing Nuget packages OK, but the website errors with:
Could not load file or assembly 'Microsoft.Web.Infrastruct
I'm using IIS.
Lower down in the stack trace we also have :
The pre-application start initialization method Start on type System.Web.Optimization.Pr
Neither of us can see any reason why, we have compared installs, and version and paths.
Has anyone see the like before.
Andy
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad the issue has been resolved.
Dan
Dan
ASKER
Thanks Dan
ASKER
I have got this working as you say the reference was missing, and if I add it manually it works, however.....
We don't explicitly reference this dll, we reference system.web.optimisation, and its this that has web.infrastructure as a dependency.
Looks likes the NuGet manager isn't making this connection between the 2.
Andy