.NET Core in Visual Studio 2019 - Desktop deployment options - .net-core

I tried searching for deployment methods but the results I was seeing are way to general and meaningless to be useful. Maybe there are some keywords I am missing to find what I am searching for?
I have an .NET Core application and need to push it out to many computers throughout the organization. I also need to be able to push out updates to the application periodically.
Its my understanding that this can be done through Azure but I need to know of any locally contained options that don't rely on internet connections but would work within our local network.
What could I search for to pull up lists of products and/or solutions to achieve something like this?

You can use tools like Teamcity, Jenkins or Octopus. Once installed, it runs on localhost and the build definition can be created to execute periodically. Also, you will be able to add your changes incrementally while planning for new builds.
For TeamCity I recommend the following link -
deploying .NET Core app on TeamCity
For Jenkins and Octopus I came across following -
deployment using Jenkins
deployment using Octopus and Jenkins

Related

Setup for ASP.NET web application

We have some ASP.NET web application which used in 2 ways:
enterprise solution (msi-like installer)
cloud solution (use same installer)
Currently we use home-grown installer, but consider if we can replace it with something more convenient and suitable for CI/CD development cycle.
What technologies/products can be used? Currently I think about webdeploy, but not sure how it can be applied for enterprise setup...
This is quite a broad question, but I think it deserves an answer.
1. (partially) Open source solution
One way to configure CI cycle is to use Jenkins along with MS deployment functionality. This article shows how to quickly set up a job to integrate Jenkins with msdeploy tool.
Basically it configures a job to perform the deployment using Powershell:
msdeploy.exe -allowUntrusted=true -verb:sync -source:contentpath='D:\WS\ExampleProject' -dest:contentpath=F:\webfolder,computerName=exampleproject.example.com,Username='yourdomain\username',Password='password' -skip:objectName=dirPath,absolutePath="config" -skip:objectName=filePath,absolutePath="web.config"
It also tells that the executing user should be an administrator on target server, but this can be circumvented through proper configuration of Web Deployment Handler as indicated in this article.
One intermediary step that can be done before Jenkins integration (which I recommend) is to configure Web deployment. This allows to quickly check that deployment can be performed onto target server IIS using Visual Studio and any configured user that is allowed to deploy. It also allows to quickly see the difference between current code base (web pages, JS files, binaries) and target server deployed package.
2. Visual Studio 2017 DevOps solution
Microsoft recently released VS 2017 which contains a great support for DevOps which handles most the issues related to CI/CD. I cannot find a reference, but I remember that this feature is available for Enterprise version only. Also, the good news is that it is not tightened to Microsoft technologies.
A presentation related to the subject can be found here.
I think WebDeploy can be used without significant problems. From my experience with it:
backup limitation: can be done only at Web Site level, not Web application level
deployment time: is quite small - actual files copy + Web site backup (if configured) + application pool recycle.
Recently I saw a vendor offering customers who wanted on-premises deployments the same Docker image that they use for cloud deployments. Seemed like a good, clean, solution.
Another option is nuget packages - host your own repository. Then deploy with a tool like Octopus Deploy. I'm not terribly familiar with it, but both solutions look to be easy after an initial hump in setup.

How to setup build definition to update IIS settings

Using TFS 2010
The solution I am working with is approximately 34 projects. I have gotten my build definition to copy the build output to a separate location. of those 34 only 3 are actually web type projects. This works fine and gives me compiled code.
My issue is that once the build is deployed to that location how to configure the build definition to update the appropriate IIS website/ settings.
I looked at this location already but this seems quite error prone: http://vishaljoshi.blogspot.ca/2010/11/team-build-web-deployment-web-deploy-vs.html
I considered creating a separate .msbuild for each of my csproj files that need to be setup and have it run on Post build. My suspicion though is that this will run on the build server itself and also how would I get for example the path to even update IIS with.
Anyone have any suggestions or tips to make this moderately better?
nutshell: after deploying a different location than build server how do you automate IIS processes to pickup new build.
tyvm
MacM
You should use a deployment automation tool rather than the build tool to tackle this problem, especially if you'll be deploying to several different environments. Any deployment tool with decent IIS support will be setup to update configuration on a per-environment basis. It's the most normal IIS scenario in the world.
I think MS is including the InRelease tech in the new VS, and there are a number of other good solutions for deployment as well including Octopus Deploy, and IBM UrbanCode Deploy. .

What is a good way to deploy ASP.NET MVC applications to IIS?

My team works on a couple of ASP.NET MVC 2 applications, hosted on IIS 7 with an Oracle database. We do our database migrations manually and publish our projects directly to the web servers using Publish to File System in Visual Studio 2010.
Are there any best practices on how to release to test, stage and production environments directly from TFS? We would love to be able to automate our releases completely, including database migration scripts.
The preferred way to perform deployments these days seems to be WebDeploy. I believe this can be integrated into TFS, although we don't use TFS so no experience with this yet. WebDeploy is fully extendable with it's provider model.
You could use WebDeploy as a build task like TheCodeKing says. It works fine, we do it in our project and deploy to a dev-server and a test-server like that. The build definitions are available in the VS Team Explorer and every team member can push a build to Dev or Test.
For the database you could use the Data Dude features (or another schema compare tool) and run it via a TFS Build task (TFS 2010 supports database projects) or via the command line to compare and upgrade the database. This is of course dependent on you using the database projects.
Yes you will use web deploy for details information and step by step guide see the following post
http://mohamedradwan.wordpress.com/2010/10/23/auto-deploy-your-website-for-qa-with-team-build/
Thanks
M.Radwan

Does Microsoft offer an automated tool for App Deployment?

Does Microsoft offer a tool where you can deploy a web application to multiple web servers in a load-balanced environment/web farm?
My team is looking for a tool, preferably from Microsoft, where we can deploy our web application from development environment to production environment automatically.
If I understanding what your asking for your looking for a build server, to my knowledge Microsoft don't offer one, but some to take a look at are Team City, Hudson(requires a plug-in), and CruiseControl.net.
Basically they work by pulling from your source control building your application and running your tests. They all support scripting that will allow you to build then deploy to your servers. This can be set up to run nightly, weekly, etc. you can also set it up to monitor your source control for changes and build anytime it sees a change
The only one I've used is Team City, the install was easy, and depending on how many build agents you need it's free.
If your just looking to build and deploy from VS Another option is creating an NAnt script and running it from VS as an external tool.
For a good over view of Build servers check out this SOF question cruisecontrol.net vs teamcity for continuous integration
The Web Deployment Team blog at Microsoft has some reasonably useful information, and have a deployment tool you could try...
In the last environment we setup we used TeamCity for all our builds and deployments (Which is basically to say we wrote MSBuild scripts and automated them with TeamCity). In short we had the following 5 build configurations:
Continuous Build - Automatically rebuilt our product upon every check-in. Running all the tests. This build did not deploy anywhere
Nightly Build (Dev) - Automatically build and deployed our product to the development web server (no server farm). We build would run the tests, update the development database, shutdown the Dev IIS web site, copy the necessary files to our web server, and restart the site
Test Build - Like our Nightly build only it deployed to our test environment and it wasn't scheduled so it had to be manually started by logging into Team City and pressing a button
Stage Build - Like test only deployed to a web server that was externally visible to our customers sot that they could validate the application. Also, only run on demand.
Production - Created a zip file of our product that the deployment team could install on our production web servers
So I guess what I'm suggesting is that you use TeamCity and then write build scripts in such a way that they'll deploy to your Web Farm. If you want examples I could supply you with the pertinent portions of our build scripts
** One more thing: we check in our web.config files and such for each environment into subversion and then part of the build process is to copy and rename the appropriate config file for the environment. For example, web.prod.config => web.config in our production build
I believe that Sharepoint does this.
File Replication Service ( e.g. DFS Replication ) is a typical and very good choice for doing this.
Your changes are synced between member servers at the file system level.
Sharepoint does this automatically when you deploy a solution package.

ASP.NET Automated deployment to remote ftp server

Does anyone know any good solutions for automated deployment to a remote server using SFTP? I am specifically trying to deploy an asp.net mvc website to mosso. I can do it manually every time using an SFTP client, but would much rather have an automated (and consistent) way to do this.
I have written a pretty detailed blog post using TeamCity, and Web Deployment projects to automate build and deployment as a starter here:
http://www.diaryofaninja.com/blog/2010/05/09/automated-site-deployments-with-teamcity-deployment-projects-amp-svn
I have then added to this to show FTP addition
http://www.diaryofaninja.com/blog/2010/09/21/continuous-integration-tip-1-ndash-ftp-deployment
A basic process flow is pretty simple:
Using a teamcity build server i download from my SVN repo
I build and deploy the site to a local folder on the build server
I fire a command line FTP client that supports scripting called
WinSCP using the MSBUILD Task EXEC (http://winscp.net/)
Upload all my sites content
Have [insert beverage] of choice
I then make sure that i only deploy the Trunk of my SVN repo, and develop and test everything in an branch before merging - this way only tested stuff gets deployed. Add Automated testing to your build cycle and you've got a match made in heaven.
Some great free tools to get going are:
Visual Studio Web Deployment Project
TeamCity (free for under 20 build configs)
Bamboo
deployment tools under .NET solutions
Automatic Deployment Resources

Resources