Deploying a web app via TFS2010 only copies certain folders, not all folders, to our development server - xaml

My company uses TFS 2010 to deploy our web apps from our local environment to our development environment. Here's the compiled output in my local directory for one of our vended web apps, ProGet, (http://inedo.com/proget/overview) in question that isn't deploying correctly. I expect all of what I see below to deploy to our development server:
Here's my .xaml build file:
Finally, here's my solution in Visual Studio:
When I queue the build, this is what's built out to our development server - notice it's missing a bunch of files/folders, but it does include "Resources" and "bin" and web.config:
This app is a vended application, ProGet, an already developed corporate Nuget repository that we purchased a source code license for. Does anyone have any ideas what I might be doing wrong?
EDIT
Here's a screenshot of my local IIS and the window to the right is a result of right clicking the website and choosing "Explore". Notice the *.cs files. Weird they don't compile down.

The Default Build Template (DefaultTemplate.xaml) should output the same files you get when you compile locally.
However, from your screenshots it looks like you are using a custom build template xxxx_DeploymentProcess.xaml that is obviously doing something different with how it outputs the build files. There is no way for us (stackoverflow community) to know what your custom build process is doing.
You could try switching back to the default template, and we'd be able to help you then. But, there's a good chance that you are using a custom build template for a reason, and you might not want to eliminate it before you know what it's doing.

Related

Getting SlowCheetah to transform files on Visual Studio Online

I've looked over several suggestions for getting SlowCheetah transforms to work with Visual Studio Online's build system, but nothing seems definitive, especially for the Visual Studio 2015 world.
I have a web project with both build configurations and publish profiles in place. If I'm using the one-click publish, everything works as expected; first the build config transform fires, then the publish profile config transform. However, on VSO, only the web.config is transformed, and then only for the build configuration.
The goal would be to provide the build definition on VSO with the build configuration and publish profile to use (which I know can be provided via MSBuild) and trigger the transforms to work as appropriate. I'm using the new VSO build definitions that are done online through the web interface (not the XAML ones), and the good news is this has an option to restore NuGet packages automatically (which has been one of the issues in the past). It looks like other MSBuild steps could also be added, so maybe there's a way to trigger the process after the build or something.
Has anyone gotten this to work properly? Thanks.
I did a quick test on this but didn't see any issue.
The screenshot for my project:
And the screenshot for my build definition:
After the web project is published with these settings, I can get the "Web.config" and "XMLFile1.xml" transformed with the "edd" profile and "XMLFile2.xml" transformed with build configuration.

How can I include (and execute) deploy related tools in an MSDeploy package without making them part of my app?

I'm starting to use MSDeploy quite aggressively within our Visual studio web projects projects as a mechanism for producing self contained build artefacts that have everything needed to setup and run themselves on a remote server. This works fine for simple web apps, however we have some web applications that need additional command line tools to be run on the remote servers before the application can be considered to be "deployed".
I have followed Sayed's advice to include additional files and folders within my package, but they appear as a subfolder within the deploy of my web application (and that's not good, as the files are only needed once at deploy time).
Ideally, I'd like the package.zip to contain the tools as a set of sibling folders to the IIS aplication, and have a mechanism to run an exe within those folders at deploy time. (I think this is via the deploy.manifest, but would like advice here too) but NOT actually leave the files on the remote machine.

Post-Builds in TFS Team Build best practice

i have a question about Post-Builds. We have a Post-Build in project settings. This Post-Build task compress JavaScript because of Web Application performance. Assembly path is assigned by variable $(YUICompressorDLLPath).
Generally it works fine from developer machine but how should I do it from TFS Team Build. When I start the Team Build it ends with error because the assembly is on the build machine on other place as on developer machine. I tried overwrite the variable over MSBuild Arguments but it seems it doesn't work.
What is the best practice, how is to accomplish this?
Regards
Anton Kalcik
It seems that you should change $(YUICompressorDLLPath) $(OutDir)\$(TargetFileName)
The best practice, on my opinion is to keep the directory structure on build server same as on developer machine. On this way is working everything fine, because of relative paths. For more information to see how to ensure generated file will be deployed see also: Deploy generated files in TFS Build Server

How to create Web Deployment Package for IIS WebSite and use standard manifest/parameters

I have various IIS hosted service hosts with simple svc files etc. What I want to do is to be able to create deployment packages from our test server using IIS Export Package in a way that parameters may be saved and picked up at Export time so that the Export is repeatable and automatable. I.e. the Export will always use the necessary Manifest extensions such as XmlFile etc.
The web sites exist in the solutions and are then picked up using a Web Deployment project in each solution so that config substitutions are done etc.
We are currently on VS 2008 SP1 so do not have direct access to VS 2010
The first issue I have with MsBuild (running in TeamCity) is how to build the IIS web site (with target=Package) when there is no project file? In this way maybe I can avoid the Web Deployment projects (I use them for various configurations but don't want to do it this way for deploying to Production but rather export from our fully tested staging into a package file to be imported onto a production server).
Secondly, I want to avoid having to configure the Export in IIS 7 each time I run it. I want it simply to pick up the correct set of extensions to use and create the necessary parameters for me. Is this done from a Manifest file? I can see how to use the parameters.xml but I am unclear whether I need to use a manifest.xml (created by hand) and how to link it in. The idea is that a tester/deployment person should be able to do the Export simply without having to enable all of the extensions that are required
Any help or guidance will be greatly appreciated.
Ok, in the meantime I got it figured out.
I ended up using the document at Package an Application for the Windows Web Application Gallery which gave me the means by which I could extend our automated build in TeamCity to create the "repeatable" export packages.
In short I will use the current Web Deployment Projects to create the deployment artefacts and then in MsBuild combine them with the pre-prepared manifest.xml and parameters.xml files into Build artefacts folder and zip them up into a package. From there the task will be to Import the package into IIS Deploy in the target environment.
The parameters.xml file will be used to set the HostName for wcf clients and services, connection strings, app settings etc.
This turned out to be the best solutuion bcause I can put it into our automated build.

Need msbuild file that will publish a Web Application

Has anyone had success making an msbuild file that will publish a Web Application, not the old 2.0 web site but a Web Application?
This is not what I am looking for:
<MSBuild Projects="eRx.Web.SecureSiteShell.csproj" Properties="Configuration=Debug;OutDir=$(OutputFolder)\$(OutputWeb)\bin\;WebProjectOutputDir=$(OutputFolder)\$(OutputWeb)\" Targets="ResolveReferences;_CopyWebApplication" />
I tried simply using 'targets:Publish' but I get : Skipping unpublishable project.
Apparently this just isn't possible. My first hint was getting absolutely no response from this site.
I began to look into making a web setup project but was unsatisfied at having to edit the installation dialogues to get a custom installation folder. All I really need is something that will copy the published output of a Web Application (not Web Site you 2.0 peeps).
I think I have cheated the system by creating a simple Windows Setup program. Surprisingly I am able to include the primary output of my web application which satisfies my need. I DO have to manually add each projects debug symbols if I want them so the process can be lengthly but doable.
Like I said, not completely satisfied because I wanted to get the files in a nice deploy folder for my QA group to work with but feeding them an MSI has its advantages I suppose.
I leave this for anyone to comment on. I still can't believe I can't do this from msBuild or any other tool.