I'm trying to design a WIX setup project that needs to harvest the output of an ASP.NET MVC Web site.
There are several problems.
Building the ASP.NET project does not output the same content as a web publish would.
So it seems that I need to harvest the output of the published web site, meaning it should be done in a temporary location.
It should work on team build continuous integration (and in Visual Studio).
Every sample I've found so far uses temporary directories and command line steps before building the setup project.
Am I wrong ?
Is there another solution ?
Thanks in advance.
You would need to run those commands as part of your build so that you have that output to then package with WIX.
Related
I created a ASP.NET Website and pushed the entire code on TFS. But when i create a Build Definition in VSTS i do not see any template for the Website, all the templates are for ASP.NET Web application. The list of templates are shown in the below screenshot:
Screenshot: https://i.stack.imgur.com/j5IOa.png
So if i want to build a website in VSTS do I need to first convert it into the Web Application or is there a third party template available to build my Website in VSTS ?
Edited: The website project structure is show below:
I have given the path till my project file in the Build Solution task as follows:
The build is successful but i get the message that nothing can be added in the Artifact as shown in the below screenshot:
Edited (Latest): When I create a new "Website" in VS 2017 i do not get a project file, only a .sln file is created, so for this website what template and its configuration can i use in VSTS or how can i create a project file(.csproj) so the whole website can come under that project file. The project structure is shown in below screenshot:
Any help will be greatly appreciated. Thanks in advance.
To build website project, you can also use ASP.NET build process template.
The only difference is you should specify **\*.publishproj instead of **\*.sln in VS Build task.
You can also refer the answer in another post.
I have a ASP.Net MVC Project in a solution which contains multiple other Class library projects (which are dependencies of MVC project).
Now I want to automate the process of creating multiple DEV AzureWebsites and publish the MVC project (along with its dependencies) through Azure PowerShell Cmdlets.
I know how to create AzureWebsite and other Cmdlets, but I am not sure about how to publish VS MVC Project, take that folder and deploy it in AzureWebsite. Please let me know my options.
PS - I do not want to Visual Studio -> Right Click publish option, because I need to create multiple instances of Dev AzureWebsites.
Good news. The script to do this is already written for you. In Visual Studio, take a look in the PublishScripts folder of your solution. There you will find the scripts and parameter file for your solution. You can use these to publish to other Web Apps (formerly Websites).
The dependencies will be included in the package file that is generated so no additional steps are needed for that.
I have a solution with multiple C# projects linked to a Website (File => New => Web Site).
I can use the continuous integration for all the C# project for now.
I would like to try the website from a different solution just for testing:
I would like to know if the modification of an aspx or aspx.cs file will
rebuild all the solution/project or just push the file which was
modified on Azure.
It seams that the website will be rebuild, or will try to rebuild.
Here is my website test solution
and my Build Definition file :
So my question is, is it possible to integrate a website to a continuous integration system ? (TFS 2012)
If it's possible, What did I miss on the basic configuration ?(I didn't need any specific configuration for a WebApp project or a C# project)
I might need to build some files on the website (App_Code folder), But I would keep the possibility to deploy only the modified files (aspx, aspx.cs) without rebuild all the website and push everything on the server.
Let me know if you need any further information
There is an article here Continuous Deployment di Asp.Net web sites con TFS Build. It is in italian, but I think you may get the core using Bing/Google translator.
We're using this process to use WebDeploy to deploy and compile two web sites that are a part of the solution. The approach we took was found here:
http://vishaljoshi.blogspot.com/2010/11/team-build-web-deployment-web-deploy-vs.html
But it's only deploying one of the web sites; is there a way to tell it to publish both?
Thanks.
Web Packages created based on the above walkthrough (i.e. via VS 2010 and its derivatives like TFS etc) can only contain one web project. Unfortunately VS generated Web Packages will be limited from this sense. If you use Web Deploy (MSDeploy) EXE or API directly and then you can package more than one web site within IIS etc. I believe you are trying to accomplish this via Team Build so that is not really an option.
Although, in Team Build you can create more than one build definitions to cause multiple packages to be created. You can also set properties in your .csproj or .vbproj file (same properties mentioned in Step10 of the walkthrough). If more than one project have properties DeployOnBuild set to be true then from within single solution build within TFS you can have multiple web packages generated. You will still have to deploy each web independently.
Hope this helps
I've got an existing web site that monitors an SVN repository for changes and when there is a check in, the new web site is built using aspnet_compiler and then a diff of what is on the production site is sftp'd up to a production web server. The entire continuous integration process is built using cruisecontrol.net.
I've refactored the entire site to use ASP.NET MVC and I am now trying to integrate into my build process. It seems that this has changed and I am not getting the same behavior as I used to get with a pre-MVC site. I'm unfortunately not making much progress because it seems that no one has done this yet. Has anyone got something like this to work in any form at all?
Automating the command line using "devenv" like a "regular project" does not work either. There are /Build command line switches but they just build in place. This command line does not expose the "Publish" mechanism that is built into the UI. There is even a {Project Name}.Publish.xml file in the project directory that seems like it is a manifest of what needs to be published. Just no way of automating that.
I'm just trying to emulate the "Publish {Project name}" under the build menu in VS 2008 MVC project from the command line.
If you're using CruiseControl.net, you're 85% of the way to doing this. Are you able to use NAnt? That would definitely be the way to go.
If not, then I'd look into using msbuild from the command line rather than devenv as that wasn't designed to do what you want.
NAnt is definitely a great way to go. Though, with all the changes they've made to msbuild, it is certainly a great contender. Nant just recently got new life breathed back into it, so it should continue to be an excellent option.
When you create a MVC project this is a standard .net project and not a "web project", which are not the same thing. I think that aspnet_compiler is only for web projects, so maybe this is what is causing you problems. I don't know which build tool you are using, but try building it like any other .net project.