简体   繁体   中英

Deploying web site to Azure as well as class library

I am trying to deploy an ASP.NET MVC 4 Website to Azure. In my solution I have two projects: The MVC project which contains folders for views, controllers, jQuery, CSS etc. The other project is a class library which contains all of the models such as data models, viewmodels and migration settings for Entity Framework.

I've published the first project (the MVC website) to Azure with no problems but of course it can't function without the class library. There is no option to publish the class library when I right click on it.

How do I publish the class library as well so the MVC project in Azure has access to it.

Here's an image showing my solution (project name redacted):

If you have the dependencys of the MVC Project right, using VS to deploy (by publish profile) it will automatically upload all the dependent projects of the main project you want to deploy.

It's one of the thinks that you must say that it just works

1.Expand the References

2.Right Click the reference whatever you want

3.select properties on right click

4.In Properties pane Focus on Copy Local

5.set true.

Then Publish Your Solution. that automatically publish your dll

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