I'm trying to setup a continuous deployment scenario where the assemblies will be built and tested on the build server (team city). The assemblies are then saved to a folder. That folder location is then passed to another Team City task that does the deployment.
But MSDeploy wants to build the assemblies again. But MSDeploy is trying to build the assemblies again. How do I tell MSDeploy to not build?
Here's part of the log:
[13:33:35][build.proj.teamcity] StagingDeploy (2s)
[13:33:35][StagingDeploy] Deploying to staging build 1.1.2.123
[13:33:35][StagingDeploy] MSBuild (2s)
[13:33:35][MSBuild] MyProject.csproj: Build target: MSDeployPublish (2s)
[13:33:35][MyProject.csproj] GenerateGlobalPublishSetting
[13:33:35][MyProject.csproj] _CleanWPPIfNeedTo
[13:33:35][MyProject.csproj] GetReferenceAssemblyPaths
[13:33:35][MyProject.csproj] ResolveProjectReferences
[13:33:35][MyProject.csproj] ResolveAssemblyReferences (1s)
[13:33:37][MyProject.csproj] CoreCompile
[13:33:37][CoreCompile] Csc
[13:33:37][Csc] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:C:\TeamCity\buildAgent\work\d42c6aa1cfb811ce\bin\Antlr3.Runtime.dll /reference:C:\TeamCity\buildAgent\work\d42c6aa1cfb811ce\bin\AutoMapper.dll /reference:C:\TeamCity\buildAgent\work\d42c6aa1cfb811ce\bin\AutoMapper.Net4.dll /reference:C:\TeamCity\buildAgent\work\d42c6aa1cfb811ce\bin\Elmah.dll /reference:C:\TeamCity\buildAgent\work\d42c6aa1cfb811ce\bin\EntityFramework.dll /reference:C:\TeamCity\buildAgent\work\d42c6aa1cfb811ce\bin\EntityFramework.SqlServer.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll /reference:"C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v2.0\Assemblies\Microsoft.Web.Infrastructure.dll" /reference:C:\Windows\Microsoft.NET\Framework\v4.0.30319\\mscorlib.dll /reference:C:\TeamCity\buildAgent\work\d42c6aa1cfb811ce\bin\Newtonsoft.Json.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll /reference:"C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies\System.Net.Http.dll" /reference:"C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies\System.Net.Http.WebRequest.dll" /reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Abstractions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Abstractions.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Entity\v4.0_4.0.0.0__b77a5c561934e089\System.Web.Entity.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll /reference:C:\TeamCity\buildAgent\work\d42c6aa1cfb811ce\bin\System.Web.Helpers.dll /reference:C:\TeamCity\buildAgent\work\d42c6aa1cfb811ce\bin\System.Web.Mvc.dll /reference:C:\TeamCity\buildAgent\work\d42c6aa1cfb811ce\bin\System.Web.Optimization.dll /reference:C:\TeamCity\buildAgent\work\d42c6aa1cfb811ce\bin\System.Web.Razor.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Routing\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Routing.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll /reference:C:\TeamCity\buildAgent\work\d42c6aa1cfb811ce\bin\System.Web.WebPages.Deployment.dll /reference:C:\TeamCity\buildAgent\work\d42c6aa1cfb811ce\bin\System.Web.WebPages.dll /reference:C:\TeamCity\buildAgent\work\d42c6aa1cfb811ce\bin\System.Web.WebPages.Razor.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll /reference:C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll /reference:C:\TeamCity\buildAgent\work\d42c6aa1cfb811ce\bin\WebGrease.dll /debug+ /debug:full /optimize- /out:obj\Debug\MyProject.dll /subsystemversion:6.00 /target:library /utf8output App_Start\BundleConfig.cs App_Start\FilterConfig.cs App_Start\RouteConfig.cs Controllers\CommentController.cs Controllers\HomeController.cs Controllers\ProductController.cs Controllers\ProfileController.cs Controllers\TreatmentController.cs Controllers\WorkerController.cs Global.asax.cs Properties\AssemblyInfo.cs ViewModels\CommentListViewModel.cs ViewModels\TreatmentEditViewModel.cs ViewModels\EndAgeViewModel.cs ViewModels\EndQuenchViewModel.cs ViewModels\BeginQuenchViewModel.cs ViewModels\BeginAgeViewModel.cs ViewModels\ListCurrentViewModel.cs ViewModels\FurnaceViewModel.cs ViewModels\HomeListViewModel.cs ViewModels\ListRecentViewModel.cs ViewModels\CommentViewModel.cs ViewModels\StudyViewModel.cs ViewModels\FurnaceCompleteViewModel.cs ViewModels\TreatmentDisplayViewModel.cs "C:\TeamCity\buildAgent\temp\buildTmp\.NETFramework,Version=v4.5.1.AssemblyAttributes.cs"
[13:33:37][Csc] CSC error CS2001: Source file 'App_Start\BundleConfig.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'App_Start\FilterConfig.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'App_Start\RouteConfig.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'Controllers\CommentController.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'Controllers\HomeController.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'Controllers\ProductController.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'Controllers\ProfileController.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'Controllers\TreatmentController.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'Controllers\WorkerController.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'Global.asax.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'Properties\AssemblyInfo.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'ViewModels\CommentListViewModel.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'ViewModels\TreatmentEditViewModel.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'ViewModels\EndAgeViewModel.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'ViewModels\EndQuenchViewModel.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'ViewModels\BeginQuenchViewModel.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'ViewModels\BeginAgeViewModel.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'ViewModels\ListCurrentViewModel.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'ViewModels\FurnaceViewModel.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'ViewModels\HomeListViewModel.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'ViewModels\ListRecentViewModel.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'ViewModels\CommentViewModel.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'ViewModels\StudyViewModel.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'ViewModels\FurnaceCompleteViewModel.cs' could not be found
[13:33:37][Csc] CSC error CS2001: Source file 'ViewModels\TreatmentDisplayViewModel.cs' could not be found
This is not good and is a bad practice. Anytime you do a build, even considering you may have the same file versions from Version Control, you run the risk of introducing bugs. As a best practice, you should deploy to production the same binaries that were
tested. What you're saying is Web Deploy makes this impossible.
This now leads to the next question... does Web Deploy always build or only if the source files are newer than the binaries?
Thanks for the link. It did answer my question. A successful build is a requirement before deployment. I looked at packages, but they won't solve the problem either because when you move from staging to production, the connection string changes and web.config
transformations have already taken place.
It looks like I'll need to put in a Connect request to have some changes made to web deploy so that it can be work "properly".
You could submit this feature request:
http://visualstudio.uservoice.com/forums/121579-visual-studio . The Visual Studio product team is listening to user voice there. You can send your idea there so the others can vote it. If you submit this suggestion, you might post that link here which will
benefit others who has the similar issue.
Thanks
Best Regards
We are trying to better understand customer views on social support experience. Click HERE to participate the survey. Thanks!
Member
112 Points
111 Posts
Why does MS Deploy try to build?
Jun 16, 2014 03:56 PM|craigber|LINK
I'm trying to setup a continuous deployment scenario where the assemblies will be built and tested on the build server (team city). The assemblies are then saved to a folder. That folder location is then passed to another Team City task that does the deployment. But MSDeploy wants to build the assemblies again. But MSDeploy is trying to build the assemblies again. How do I tell MSDeploy to not build?
Here's part of the log:
Participant
1100 Points
400 Posts
Re: Why does MS Deploy try to build?
Jun 17, 2014 03:47 AM|dyyo|LINK
I believe this is how MSDeploy works.
MSDeploy will attempt to build your site first before deploying it to the server
As far as I am concerned, I cannot change this setting either
Dyyo - Microsoft Recommended ASP.NET Hosting
All-Star
23975 Points
4084 Posts
Re: Why does MS Deploy try to build?
Jun 17, 2014 04:25 AM|Starain chen - MSFT|LINK
Hi craigber,
As dyyo said that it should build the website first.
This link is about web deploy settings that can help you:
# Web Deploy Operation Settings
http://msdn.microsoft.com/en-us/library/dd569089(v=ws.10).aspx
Thanks
Best Regards
Member
112 Points
111 Posts
Re: Why does MS Deploy try to build?
Jun 17, 2014 11:01 AM|craigber|LINK
This is not good and is a bad practice. Anytime you do a build, even considering you may have the same file versions from Version Control, you run the risk of introducing bugs. As a best practice, you should deploy to production the same binaries that were tested. What you're saying is Web Deploy makes this impossible.
This now leads to the next question... does Web Deploy always build or only if the source files are newer than the binaries?
All-Star
23975 Points
4084 Posts
Re: Why does MS Deploy try to build?
Jun 18, 2014 01:34 AM|Starain chen - MSFT|LINK
Hi craigber,
This links may help you:
# How does Web Deployment with VS10 and MSDeploy Work
http://blogs.msdn.com/b/webdev/archive/2009/03/10/how-does-web-deployment-with-vs10-and-msdeploy-work.aspx
Thanks
Best Regards
Member
112 Points
111 Posts
Re: Why does MS Deploy try to build?
Jun 18, 2014 01:32 PM|craigber|LINK
Starain,
Thanks for the link. It did answer my question. A successful build is a requirement before deployment. I looked at packages, but they won't solve the problem either because when you move from staging to production, the connection string changes and web.config transformations have already taken place.
It looks like I'll need to put in a Connect request to have some changes made to web deploy so that it can be work "properly".
All-Star
23975 Points
4084 Posts
Re: Why does MS Deploy try to build?
Jun 18, 2014 10:31 PM|Starain chen - MSFT|LINK
Hi craigber,
You could submit this feature request: http://visualstudio.uservoice.com/forums/121579-visual-studio . The Visual Studio product team is listening to user voice there. You can send your idea there so the others can vote it. If you submit this suggestion, you might post that link here which will benefit others who has the similar issue.
Thanks
Best Regards
Member
112 Points
111 Posts
Re: Why does MS Deploy try to build?
Jun 19, 2014 03:51 PM|craigber|LINK
Thanks, User Voice is much better than Connect.