简体   繁体   中英

How to a publish visual studio solution with two dependencies projects to azure?

In Visual studio 2013 I have MVC solution with two projects: project 1 project 2

project 1 depends on project 2

It works fine in my local machine but I get error when I deployed to Azure:

Could not load file or assembly 'MySql.Data, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies.

My question: did I have to deploy both projects separately to azure or just deploy the main project?

It should work automatically but beware of any libraries you have registered in the GAC on your PC since they will automatically link to the GAC version and "Copy Local" in the properties will be set to false. You can change this to true and force it to put a copy in the bin folder so that it copies correctly.

You only need to do this on the project that directly references the file. If project2 references project1, it will copy all output dlls across to bin automatically.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM