Publish asp.net 3.5 website to local folder using MSBuild - asp.net

I have a solution with multiple class libraries and a website (not a web application) in framework 3.5 VS 2008.
I would like to create a script/batch file to automate the publishing of the website to a given folder location(not to IIS).
I tried googling regarding this but everywhere they are refering to a .csproj file for the website. In my solution I do not have any such file for the website.
I do not want to use any add ons / other tools for automated builds right now.
Please suggest an approach using MSBuild or any other inbuilt asp.net tool.

Related

Web Deployment Project on VS2019

I've created a blank solution in VS2019. Using the option "add existing web site" I've added a website to the solution which was built in VS2010. Normally, after that, I was used to add a Web Deployment Project to the solution, to compile all the code in one dll, and upload the result to the web server.
But this kind of project does not seem to be compatible anymore with the newer versions of VS.
Is there any way to get a similar compiled result in VS2019?
I found an alternative.
It is to convert the [asp.net web site] to an [asp.net application]. The asp.net application has a publish feature, which can be used to generate an output folder with the compiled application inside, with the aspx pages and a single dll.
I suggest to follow the steps described here to convert the asp.net web site to asp.net application:
https://learn.microsoft.com/en-us/previous-versions/aa983476(v=vs.140)

How to update internal enterprise web page without Visual Studio project?

Problem 1 : I am not a web developer, but since people think all developers can do everything, I've been asked to look at a company's internal web site for the purpose of updating it.
Problem 2 : The company does not have the original Visual Studio project for the web site.
Question 1 : Can the files running the web site be used to manually build a working VS project?
Question 2 : Is it better or necessary to rebuild the web site from scratch?
Two are two ways to deploy ASP.NET:
Compile project and deploy aspx pages and dlls (I'm talking about webforms here, not MVC).
Source code (dynamic compilation available starting Framework 2)
In second case you can download all code, create project and add all files there.
If you have only complied version, it's more complex. You can get aspx files, but for code behind you can use for example Reflector or DotPeek.
PS. If you have ASP files, it's classic ASP, you have all source inside ASP (VBScript), so you can get everything and edit in VS or even in notepad.

ASP.NET Website No Publish Option

I took on a project that was developed by another developer. The client needs a few alterations made to the site so I got the source code and found out it was developed as an ASP.NET Website project (not web application). Looking at the FTP site, each code behind file is complied down to its dll in the bin folder.
I opened up the web site using Web Developer 2012 Express, made the alterations and even successfully debugged the application and everything looks good. The problem is I can not figure out how to publish it! When I build the web site no dlls are generated in the directory structure of the application. Further, there is not Build menu and thus no Build > Publish option to publish the website.
I've build and deployed major applications using APS.NET MVC but I can't for the life of me figure out how to deploy this simple website project as no dlls are being created.
How does one publish or deploy a website project with no Build > Publish option and no dlls created when Building?
I think it's a visual studio express thing. I don't have the build menu here at home on express but at work it shows up fine on projects.
Have you tried right-clicking on the site in Solution Explorer and observing any possible Publish Site options there?
Failing that, you might try copying the files directly to the site's root folder on the webserver.

Do I have to convert my website project into a web application project to migrate to Azure?

I have a current website project that I need to migrate to Windows Azure. Back in 2009 we had to convert the website project to a web application project. Is that still the case today?
Your life will probably be a lot easier if you use web application projects, but you can use website projects. At the very least, you can use cspack from the command line and point it at any directory. You can also use the physicalDirectory attribute in ServiceDefinition.csdef to point to an arbitrary directory. That directory can be your website project.
I'm not sure if there are better ways from within Visual Studio to use a website project as a web role.
You can add any project to the Windows Azure Visual Studio project. I like to create a new Windows Azure project first, and then add existing projects to it (rather than the other way around).

How am I supposed to deploy an ASP.NET 4 MVC website?

What's the recommended way to deploy a website created with ASP.NET 4.0 and Visual Studio 2010?
I've previously always added a web setup project to my solution, and used that to create an MSI, even for small applications.
But when I build a web setup project in VS2010 it kind of works but some stuff still seems broken:
1. I need to turn on IIS 6 Compatibility on a Win 2008 R2 box to get the msi to run.
2. The msi includes web.config, web.debug.config, and web.release.config. I thought VS's web.config transformations was supposed to take care of that.
-Matt
I suggest looking at using MSDeploy, which packages up all your files and configuration settings into a zip file that can then be imported into IIS 7.
Scott Hanselman had a great presentation that shows how to use MSDeploy.

Resources