Hi @Erum Mirza ,
It appears that Microsoft.Web.Infrastructure.dll is not being installed in the GAC, even if .net (4.0 or 4.5 or other) are installed successfully on Windows Server. On localhost (typically Windows client), it seems like it is being in the GAC when the tools/platform (Visual Studio etc.) are installed.
As one possible fix, please try the following:
- Run the following command in the Package Manager Console. (If you are using Visual Studio, this can be reached via menu options "Tools --> Library Package Manager --> Package Manager Console:)
PM> Install-Package Microsoft.Web.Infrastructure
You will see the following messages if it is successfully installed.Successfully installed 'Microsoft.Web.Infrastructure 1.0.0.0.
Successfully added 'Microsoft.Web.Infrastructure 1.0.0.0' to Web.
- You will notice that Microsoft.Web.Infrastructure.dll has now been added as a Reference (can be seen in the references folder of your project in in Solution Explorer)
- If you look at the properties of this reference you will notice that "Copy Local" has been set to "True" by default.
- Now when you "Publish " your project, Microsoft.Web.Infrastructure.dll will be deployed.
Best regards,
Yijing Sun
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.