Hi, I have been struggling with your excellent http://wiki.finalbuilder.com/displa...ur+Web+App tutorial, trying to script what I have been doing manually from VS. So when I come the part where you do your VS publishing, our dialogs greatly differ. Mine looks like below and have four different pages, and not the same data on it.
I have been trying to hack me through it, and for a bit the only fix I had to do was add then line
DeployIisAppPath=http:///
to my properties
But at the end of the compilation run, I get the following error lines:
The tutorial is a bit out of date now and uses VS 2010 - we need to update this for later versions of Visual Studio. The Visual Studio 2015 Publish dialog wants you to publish your website to Azure. To publish to a local website, choose the “custom” option and you will get a similar dialog to the one in the tutorial.
The MSBuild error that you are getting implies that the output from the Build stage of the build was not carried over to the Deploy stage. Note that each stage uses a clean agent workspace so you need to ensure that the files you need to keep are included in the workspace rules. By default the workspace rules are set to copy the contents of the Output folder from the agent to the server at the end of each stage and then copy this Output folder to agent the start of the next stage. If you have set a different Output Path in your first MSBuild action, then you will need to add this path to the workspace rules. We advise ticking the “log workspace rules” option while testing your configuration so you can see which files are being copied.
Also note that the DeployIISAppPath property should be set to the name of the website e.g. DeployIISAppPath=”DeployTutorialWebsite”
The tutorial is a bit out of date now and uses VS 2010 - we need to update this for later versions of Visual Studio. The Visual Studio 2015 Publish dialog wants you to publish your website to Azure. To publish to a local website, choose the “custom” option and you will get a similar dialog to the one in the tutorial.
Seems to work ok here, but you have been reminded…
The MSBuild error that you are getting implies that the output from the Build stage of the build was not carried over to the Deploy stage. Note that each stage uses a clean agent workspace so you need to ensure that the files you need to keep are included in the workspace rules. By default the workspace rules are set to copy the contents of the Output folder from the agent to the server at the end of each stage and then copy this Output folder to agent the start of the next stage. If you have set a different Output Path in your first MSBuild action, then you will need to add this path to the workspace rules. We advise ticking the “log workspace rules” option while testing your configuration so you can see which files are being copied.
This is rather confusing, and I am not sure if the real problem is in my lack of understanding MSBuild or understanding Continua. I have tried to do the configuration according to you instructions in two stages: Build and Deploy. It was my understanding that this two-stage setup was done with the reason you wanted to do a complete rebuild of the complete solution first to see that everything (including unit-tests) would work correctly. The second stage would redo the build of the web-application and do the deploying.
The first stage uses Project File $Source.Qualident$\Qualident.sln, sets no Targets and Output is set to $Workspace$\Output\Solution. Workspace Rules are the default /Output** > / and / < /Output**
The second stage uses Project File $Source.Qualident$\Qualident.Web\Qualident.Web.csproj, Targets is set to MSDeployPublish and Output Path is left empty and the Properties are like this: DeployOnBuild=True MsDeployServiceUrl=http:/// DeployIisAppPath=Qualident CreatePackageOnPublish=True AllowUntrustedCertificate=True MSDeployPublishMethod=WMSvc UserName= Password=
After running I can find the missed file in 3 places: Source\Qualident.Web\obj, Output and Output\Solution_PublishedWebsites\Qualident.Web. None of them contains the bin\ directory that the error message mentions.
Yes, you’re right . The second stage MSBuild action does a rebuild before publishing and does not require files from the first stage - sorry for the confusion. Can you send a copy of the build log file and the Qualident.Web.csproj file to support@finalbuilder.com? We’ll then have the right information to investigate what could be causing the error.
Thank you for sending the build log. There are several lines in the MSBuild log which say “Could not resolve this reference. Could not locate the assembly”. Many of these seem to be NuGet packages. If your project has NuGet package dependencies, then you need to run a NuGet Restore action before the MSBuild action, to add these assemblies to the workspace.
MSBuild also has a problem finding ThemeAssembly.dll. In you project file, this has a HintPath “Theme\ThemeAssembly.dll”. You need to ensure that this file is including in your repository, so that it available in this folder, before the MSBuild action is run.
We’re not sure what is happening here. Can you try setting the logging verbosity to “diagnostic”? This will add a lot more detail to the log. Also have a look at the dependant project files, perhaps there is a circular reference to Qualident.Web.dll in one of these?
Does the same MSBuild command line (shown in the log) work if you run it at a command prompt outside of Continua CI?
We use Octopus deploy for the actual deployment. So Continua CI builds the website using Octopack. That result is being uploaded to Octopus Deploy (thanks to the event handlers in Continua CI).
This way you can build a single version of a website, but deploy to both staging and production (deployment from staging => production goes via octopus deploy).