Getting Auto Deploy to work with MSBuild on a build server - msbuild

Please pardon a newbie's question about MS TFS and Visual Studio 2012, I hope I'm using the correct vocabulary.
Our shop has recently moved to MS TFS and Visual Studio 2012 to build internal web services for integration. Currently we have a TFS 2010 Server running on Server2008R2 and a Build server on a Windows 7 box, our dev application server is also running Server2008R2. I have been given the job of getting a nightly build and deployment running. I have the build definition working but the deployment portion is not functioning. I have installed Web Deploy on both the dev application server and the build server as per these articles:
http://www.kevingao.net/version-control/how-to-auto-deploy-web-application-with-tfs-build-server.html
and
http://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-web-deploy
We have configured an user, web_deploy_dev in active director and that user is a local admin on the dev app server.
The parameters added to the build definition are:
/p:DeployOnBuild=True
/p:DeployTarget=MsDeployPublish
/p:MSDeployServiceURL="https://PA-APPSRV1-DEV:8172/msdeploy.axd" /* double quotes not in original code */
/p:DeployIISAppPath="DW/DWServices" /* E:\Webroot\DW\DWServices */
/p:CreatePackageOnPublish=True
/p:MsDeployPublishMethod=WMSVC
/p:AllowUntrustedCertificate=True
/p:UserName=migp\web_deploy_dev
/p:Password=******
I suspect that MSBUILD is not even calling msdeploy.exe as I see no errors in the windows event and application logs, but I do not know all the places to look. I can use a web browser and connect to the service on the dev app server as the web_deploy_dev user from the build server, I receive a web page not found error after inputting user name and PW, but I assume that is to be expected.
I am at a loss as to where to look next, I've tried searching the web but nothing I try seems to work.
Thank you in advance for your help and input.
Roy

It sounds like you are experiencing a problem where your build completes and claims success, but you aren't getting any error and nothing is actually deployed. When I've experienced this with my TeamCity build server, the problem was that MSBuild was not set up on the machine that would do the building and deploying. These are my steps to resolve the problem I think you might be having:
Make sure that at least Visual Studio Express is installed. you can tell if a full enough version of Visual Studio is installed by navigating to the
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\ directory. If you see folders like 10.0, 11.0, or '12.0', look inside them and verify that there is a Microsoft.WebApplications.targets file. Note the versions that pass that check.
In your Build Configuration, add a /p:VisualStudioVersion=12.0 or whatever version of Visual Studio is appropriate.
Let me know if this gets you anywhere or not. I'm really curious to hear if you are finding any errors or logs anywhere. Basically, in my experience using Web Deploy and MSBuild with TeamCity, if the machine that is building and deploying doesn't have the MSBuild installed with the Microsoft.WebApplication.targets file, it silently fails.

Related

TFS 2017 MSBuild SingTool not found for Clickonce

I recently moved my TFS to a new server.
After installing everything and setting up a new Agent my builds got the following error:
Error MSB3482: An error occurred while signing: SignTool.exe was not found at path \signtool.exe.
On my other server (Running VS 2015 and TFS 17 RC) everything worked like a charm.
I then made sure Visual studio 2017 also installed the Windows 10 SDK because in the Developer command prompt typing: 'where signtool' didn't work.
But now it does:
My TFS build still gives me this error.
It's weird that the path is to my Application solution folder and not the signtool actual location.
Does anybody have any idea on what this issue might be?
Also make sure you have installed the related .NET Framework. Take a look at this similar question: An error occurred while signing: SignTool.exe not found
Try to build locally in your build agent to see if you still got the same error.
If the build is successful locally, suggest you reconfigure or reinstall the build agents. The build agent will not detect the environment changes after you installed it. It will only detect during the installation. If you are using vNext build agent, also try to manually add some capabilities in Settings- Agent Queues- Agent Pool - Agent- Capabilities. After this trigger the build again.

TFS2010 Xaml Build Controller With TFS 2015

We are attempting to upgrade our rather old TFS environment from TFS2008 to TFS2015. The upgrade of the server and database is not a problem and is fine.
The issue is our build machine. This is still a Windows 2003 Server that is running Visual Studio 2010 and VB6. We still have a need to use this build machine to build legacy VB6 projects. We have installed the TFS2010 XAML build controller on this server and successfully connected it to our test TFS2015 server. However when we try to run a Xaml build, (any Xaml build regardless of whether it builds VB6 or .NET) we get the following error message almost straight away.
TF900560: Could not start build: Cannot set unknown member 'Microsoft.TeamFoundation.Build.Workflow.Activities.TfsBuild.TargetsNotLogged'.
The XAML build are using the 'UpgradeTemplate.xaml' template and using the TFSBuild.proj we used under Visual Studio 2010.
We have a also set up a TFS2015 build controller on another (Server 2012) machine and that successfully starts the build process. However, our VB6 projects use a lot of third party components that will not install on Server 2012 so we can't use that.
Has anyone ever set up this kind of arrangement before? Is there anything we are missing or are doomed in this scenario? Obviously, we'd like to move away from VB6 apps, but that is not possible in the medium term.

Continous integration of a Windows application using Jenkins

I am having a Windows application which was created on VB.Net and Visual Studio 2008, The application is somewhat big and is around 10 years old. The repository we are using is TFS. I am having a task to create an automatic build for this Windows application and I choose the Jenkins CI for it.
My plan is to build the project solution using MS Build plugin and then publish it and deploy the solution to IIS path.
I have given the below MS Build query to build using Jenkins and get the solution code from TFS and the output was successful:
/t:AppProcSolution /p:Configuration=Release /maxcpucount
But I need publish the same AppProcSolution. Could I do it by passing any other parameters to the above script or should I need to use MS deploy etc. I am totally new to automatic integration. Is it possible for me get the published solution to a particular folder? Almost all the .Net integration using Jenkins tutorial available on the Internet is for deployment to GitHub etc. So if someone has any guidelines to help please provide me a solution.
MSDeploy is good for server application deployments like web applications/sites, SQL server databases or Windows Services.
When you say "Windows application" I assume you mean a WinForm or desktop client application. The best tool for this, in my opinion, is ClickOnce:
https://msdn.microsoft.com/en-us/library/142dbbz4(v=vs.90).aspx
You could also use a Setup project in VS:
https://msdn.microsoft.com/en-us/library/ms235317(v=vs.90).aspx

Team Foundation Server 2015 Builds will not start

I am having trouble getting my builds to run when using MSBuild in Team Foundation Server 2015. We are hosting the application on an internal server. I have configured the Controller and Agent, which seems to be okay. The "Visual Studio Team Foundation Build Service Host 2015" service is running.
When I try to queue the build, I get the following message, even though I am not using Visual Studio Online:
When I ckick OK, the build seems to be queued, but I see the following message forever:
Can anyone tell me what I am missing?
It looks like you are attempting to build a Vnext build and not a Xaml type build. You will need to set up the Vnext agent in order to get that to work. I personally use both Xaml and Vnext builds
Hope this helps!
Your build agent service is not start. Click Properties under your agent.Mark the "Build agent service is enabled"
The normal state of build control and build agent should look like as below:

Web Deploy Failing After Upgrade to VS 2012

I have a project, for which the publish (web deploy) to localhost was working under VS 2010. I made no changes to the project, other than opening it in VS 2012 RC.
The publish from VS 2012 RC failed when I attempted it, with message saying that the service does not exist, even though the site exists in IIS and can be posted to.
Now when I open the project in VS 2010 and attempt to publish, the publish fails with the same issue. Other projects where I have not attempted a publish in VS 2012 RC still have working publish profiles.
Has anyone else run into this issue, and if so, what have you done to correct it? I have looked into all the usual issues as to why a publish might fail, but publishes of other projects to IIS as local host on the same machine are working, so I think that rules out any failing services.
Your question is quite old. I propose installing not RC, but final VS and to the newest update - ms guys fixed a bunch of problems.