问题
I have a solution structured like this
Proj.Soln
Proj.Api.csproj
Proj.Web.csproj
I have configured microsoft azure with bitbucket.org. When I commit through git to bitbucket, azure will pick this up and deploy my application. How do I specify that I want Proj.Web.csproj deployed and not Proj.Api.csproj?
回答1:
I am not sure whether there is another method to chose the project, but are some steps to help you achieve your goal (note: this is tested and confirmed to be working):
- Configure the Continuous Deployment for your WebSite to your Git repository (BitBucket)
- Make initial commit to make sure the configuration is fine and working
- Connect to your site via FTP (if unsure how, here is tutorial)
- Navigate to the following folder in FTP:
/site/deployments/tools
- note that this folder might be hidden. If so, just type it in your FTP client software - In that folder you will see
deploy.cmd
file - download that file (
deploy.cmd
) - open the file to edit it with your favorite text edit tool
- there are two lines with
msbuild.exe
that instruct which project to be build (MyProjectfolder\MyProject.csproj
) - change the correct path for your other project, and do not forget that the other project is also in another folder (i.e.
MyOtherProjectFolder\MyOtherProject.csproj
) - save the
deploy.cmd
- upload the edited
deploy.cmd
and overwrite the old one under/site/deployments/tools
- commit a new change to your original source code repository on BitBucket
- have a cup of coffee and enjoy the result!
来源:https://stackoverflow.com/questions/24947317/two-web-project-in-my-solution-which-one-to-deploy