Download Azure website and Azure database and create new TFS project - visual-studio

We have an Azure website and database that was published by a 3rd party. Is there a way to pull this down into Visual Studio and Team Foundation Server as a project?
I know you can publish existing projects to Azure via Visual Studio, but this site and database currently only exist in Azure.

You can move the database by exporting it through the portal, downloading the bacpac blob and restoring it to a local SQL server.
The content of the website could also be recovered using a backup of the website (currently in preview). This should work well for all static content and scripting languages (e.g. PHP) but you will have a hard time if the original solution contained multiple projects and compiled code (attempting disassembling the code and rebuilding the solution would only be feasible in a worst case disaster recovery situation).
If there is any chance to receive the code and project meta-information through the 3rd party it is the preferred solution for all non-trivial websites.

Related

Create Visual Studio 2019 project from existing Azure Web App

I have a v7 Umbraco instance as a Web App on Azure but the machine the dev copy was on has been decommissioned and I need now to recreate the dev site in Visual Studio 2019, ideally cloning it from the live site in some way. I have created an empty project and, using the cloud explorer, downloaded the files from the app, but I am unclear whether I just copy them directly into the solution folder or into their own subfolder of the solution folder or whether simply copying them in will do the trick anyway as there's still the database to consider as well. I'm afraid I haven't used Visual Studio since creating this site three or so years ago and I seem to have forgotten most of what I did then anyway, so any help wpuld be greatly appreciated. The only advice I coud find via google was for older versions of VS and so not much help.
Recreating the original project from the live site is probably not going to be possible. It depends how and what you deployed to the live site.
It sounds like what you have is a working live site, but have lost access to the original source code. You should be able to copy the site and get it working elsewhere, but you're probably going to struggle to recreate the original development environment and amend the compiled elements of the website without access to the source code.
The Umbraco.com website has some great documentation on getting started and setting up Umbraco. Umbraco TV is great for getting up to speed quickly too. This should help explain the project structure. I suggest you create a blank Umbraco install to familiarise yourself with how Umbraco works(I wrote a post explaining how to do this with MS VS2015 here).
A typical deployment, using MS WebDeploy or FTP from Visual Studio, wouldn't deploy the project files or source-code for the compiled (.cs) elements of the website, these are usually kept as development files and checked in to source control.The live site probably only has the compiled versions of these file in the bin folder. The good news is the Razor template and view files(.cshtml) should be on the server.
However, if everything was uploaded (it happens) then you may have a chance, in which case you can download the files, potentially open the project and try to run the project locally on the development machine. There's no reason why you can't install an older version of MS Visual Studio alongside 2019 if there's an issue with that version. Although, I suspect this isn't an option since you felt the need to create a new empty project. If this is the case you might be able to add any project files to the the new empty project and attempt to recreate the project that way.
Regarding the database. You're going to need a copy or backup installed on a Microsoft SQL Server (unless you used MS SQL CE which is file based). You should be able to download a .bak file from the server if you're using Plesk or connect remotely using MS Management Studio if not, it depends on the host (Azure will allow access via MS Management Studio). Umbraco will need the connection string configured in it's web.config, the one you downloaded may be trying to connect to the live server so be careful.
Long shot ideas:
If you're really desperate you might be able to reverse engineer some of your compiled .dll using a tool like ILASM.exe but it's not going to be easy;
Perhaps you could reference the .dll in a the new project and it will all work auto-magically?! but I doubt this will work as there will be two application starting points and you'll probably get a runtime exception.

Visual Studio stuck in loading a project when not connected to company's network

I have a Visual Studio solution which initially came from the company's VSTS Git repo. The solution contains multiple projects including web and webapi projects. They use the local web server and local SQL Server.
When I am not connected to my company's network, Visual Studio 2017 gets stuck while loading one of the projects. I went through the *proj files and didn't see anything referencing something outside my local paths. I turned off NuGet's checking for downloading missing packages or trying to download packages as one of NuGet's sources is a company server.
I am unable to find the reason why VS gets stuck. While being stuck and I connect to the company's network using VPN, it continues loading the projects.
Is there a way to troubleshoot this and find the cause? Can VS create some kind of a useful log file?

Is it possible to develop a classic ASP website directly on a webserver with TFS?

We currently have a very large Classic ASP website that is critical to our business. It is kept in Visual SourceSafe for version control and we have numerous developers who develop the site in Visual Studio 2005. We open the website with VS2005 directly from the Development web server. We can check the files in and out of VSS directly through VS2005 and all changes we make to the asp pages are visible on the development website immediately, without the need to check back in or copy any files.
We would like to move forward with VS2013 and TFS. Our newer websites are all in TFS and we want to standardize.
Is there a way that we can continue developing the website directly on the web server using VS2013 integrated with TFS? I have found number of articles and responses online about TFS and ASP.NET, but since we don't build classic ASP code, these don't seem to help us.
Really your development server is not where you should be doing your development, but on your local desktops, and then deploying to your development server for initial testing.
However with that said, it looks like your working directory in SourceSafe is where you have IIS pointing to on your development server. You can do the same thing with visual studio and TFS. Just have your Visual Studio workspace pointing to the same location, but checking in everything to TFS.
Edit- the bin directory for a project typically doesn't get checked in to TFS. The developer would have to make sure they build the project every time they wish to view the site on this development server to populate the bin directory.

Visual Studio 2010 Publishing So Slow

I'm using Visual Studio 2010 Premium, and find publishing via FTP through Visual Studio's build in publishing mechanism to be painfully slow. If I choose to manually FTP (with a client like FileZilla), I'm able to publish much quicker. Although I haven't measured it, publishing the whole site (i.e. overwriting all files) with FileZilla is in the neighborhood of 10 times faster than the incremental publishing of Visual Studio. Is anyone else experiencing this? Is there a way to address this issue?
Thanks
scenario: you don't mind publishing your source code, and you need to publish via ftp. visual studio's built in "copy web site" tool is prohibitively slow because it scans the server for changes and your website has many folders and files, but analyzing the server is unnecessary because you are the only person who updates your website.
solution: "web site publisher", the simplest and most genius program ever. it took me many hours to find it, which is why i felt the need to share it. you can configure it to scan only your hard drive for new/changed files and deletions, and then publish the changes since you last published to the ftp server. my solution won't work for pre-compiled asp.net web applications; works well for regular asp.net web sites.
download it here:
http://www.cryer.co.uk/downloads/websitepublisher/
you must enable the turbo optimization so that it does not scan the server. click "config", "optimisations", and then check "turbo".
here's my blog post saying the exact same thing:
http://devblog.alexsapps.com/2012/04/visual-studio-2010-copy-web-site-tool.html

SQL Server Management Studio solution vs Visual Studio Projects

Almost all of our projects involve a web application or winforms application and a data access layer (class library) and stored procedures/database scripts.
We are looking for a good way to organize the solutions, and found a few ways:
1)We could have a sql server management studio solution for all the db related things, then have a visual studio solution for the application and data access layer projects.
2)We could do it all in visual studio with 3 projects, a sql server project, a web app/winforms app project, and a data access layer project.
3)We could do it all in visual studio with 2 projects, a web app/winforms app project and a data access layer project, and just put the sql scripts in a directory in the data access layer project.
I'm sure there's other ways, but I'm just curious to see how others go about doing it.
I have done this successfully using Visual Studio Team System Database Edition - multiple types dot net projects with a database project in a single solution.
Keep in mind that deploying a database project takes much longer because you usually need test data and most inserts thereto are RBAR insert statements. We used to turn off deploying the database project until absolutely necessary (usually once or twice a week).
Of course, all of this was in TFS for source code control
SQL Server Management Studio solution
allow use GUI designer for creating and editing some objects.
Visual Studio Projects
allows use TFS as version control and more integrate work of all developers working with a database;
better implements IntelliSence
I use Management Studio and some batch files to export/import/store the sql in the solution (under source control too).
So each time there's a change in the db it's exported to the solution and a custom tool is run to update the ORM proxy classes.

Resources