2
votes

Is it possible to import an already existing Umbraco site into Visual Studio? (By means of getting all the site files and DB backup)

I've tried creating an empty project and copying the website files, but I get several errors when I try to compile the solution. The errors look like "Could not find scheme information for the element 'umbracoConfiguration'."

The same happens if I create an empty solution, add the UMBRACO nuget package, and then copy the website files.

I'm wondering if it is at all possible, or if once an UMBRACO website is running, how should one customize/develop on it?

THANK YOU!

2
Which version Umbraco?wingyip
Hi wingyip! It's Umbraco 7.2.1 (latest) / VS 2013 Just to update, I managed to import it, and have it running. Now many things in the Admin page seem to work, BUT the Document Types are not displaying. Whichever one I click, I get a NullReferenceException error. Any ideas what might cause an issue like this? [NullReferenceException: Object reference not set to an instance of an object.] umbraco.cms.presentation.create.controls.nodeType.Page_Load(Object sender, EventArgs e) +167 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs..... THANKS!!!!dcaping

2 Answers

2
votes

After several attempts and trial and error, as well as reading other blogs, the way it worked for me was to go in Visual Studio -> File -> Open -> Web Site... and select the main folder containing all the files.

It is important to know that the web.config had to be modified in advanced for the website to work to point to the local server and off course attach the DB to the local SQL server.

Everything works perfectly just the way it was working on the host, and I have the solution in Visual Studio.

0
votes

I like to start with nuget because it handles setting up all of my project references. I create a new MVC4 Web Application

Visual Studio->File->New->Project->MVC4 Web Application

After I create the new application, I open the Nuget Package Manager Console

Tools->NuGet Package Manager->Package Manager Console

I then enter the command:

Install-Package UmbracoCms.Core -Version 7.2.1

I find that installing the UmbracoCms.Core instead of the whole UmbracoCms nuget package is best because it only sets me up with the umbraco dlls and sets up the references for me. The UmbracoCms nuget package tries to do a lot more and is more handy if you are setting up a brand new umbraco site in Visual Studio.

Once I have nugetted the appropriate version of umbraco, I copy my existing umbraco site files over the files that were nugetted. When you copy all of the files over, don't copy all of the App_Data. Most of the files in that directory are TEMP files and cache files. From App_Data, only copy the following. This will save you time reindexing the site. I suspect a lot of the App_Data files were responsible for your Object Null Reference.

App_Data/access.config
App_Data/packages/*

In visual studio, in the solution explorer, click "Show All Files", and then include the appropriate files in the solution. Rebuild the solution, and you should be set up for development.