Solved

ASP.NET MVC Open Existing Project

Posted on 2010-08-17
10
535 Views
Last Modified: 2013-11-27
How can I open an existing MVC project that does not have the .sln file?

When I open it as a website, the context menu's are not correct (i.e. right clicking on the Views folder does not allow me to add Views from the context menu)

0
Comment
Question by:conrad2010
  • 5
  • 5
10 Comments
 
LVL 27

Expert Comment

by:nmarun
ID: 33457286
Create a blank solution and add the project(s) to this solution.Arun
0
 

Author Comment

by:conrad2010
ID: 33457362
@Arun:

a little more instructions (or a link) on how to do it would be great, am not too familiar with sln files, projects, etc...
0
 
LVL 27

Expert Comment

by:nmarun
ID: 33457514
Click on File->New Project. In the New Project window choose Visual Studio Solutions under Other Project Types. You'll see 'Blank Solution' on the right side. See attached image for details.

Arun

image1.png
0
 

Author Comment

by:conrad2010
ID: 33457632
@Arun:

Ok, thx for the screen shot, got the blank project .sln file with this in it:

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcApplication1", "MvcApplication1\MvcApplication1.csproj", "{C06AB0C5-1775-4125-B13C-559FA9417140}"
EndProject
Global
      GlobalSection(SolutionConfigurationPlatforms) = preSolution
            Debug|Any CPU = Debug|Any CPU
            Release|Any CPU = Release|Any CPU
      EndGlobalSection
      GlobalSection(ProjectConfigurationPlatforms) = postSolution
            {C06AB0C5-1775-4125-B13C-559FA9417140}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
            {C06AB0C5-1775-4125-B13C-559FA9417140}.Debug|Any CPU.Build.0 = Debug|Any CPU
            {C06AB0C5-1775-4125-B13C-559FA9417140}.Release|Any CPU.ActiveCfg = Release|Any CPU
            {C06AB0C5-1775-4125-B13C-559FA9417140}.Release|Any CPU.Build.0 = Release|Any CPU
      EndGlobalSection
      GlobalSection(SolutionProperties) = preSolution
            HideSolutionNode = FALSE
      EndGlobalSection
EndGlobal

Now how can I use that for my existing MVC application?

You mentioned moving Projects in it... can you provide a sample by any chance?

0
 
LVL 27

Expert Comment

by:nmarun
ID: 33458160
Firstly, copy the MVC project into the folder where you created your blank solution.Once you create the blank solution, right click on the solution file in visual studio solution explorer and choose 'Add Existing Project'. Now browse to the location of the solution file and choose the .csproj or the .vbproj (as the case may be) and click on ok. This should add the MVC project to your solution.Arun
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:conrad2010
ID: 33458312
@Arun:

ok, following the steps, but there are no .csproj  or .vbproj files either...
0
 
LVL 27

Expert Comment

by:nmarun
ID: 33458387
Please post back a screenshot of your MVC application when you open it as a website.Arun
0
 

Author Comment

by:conrad2010
ID: 33458442
@Arun:

The Solutions Explorer of VS2008 (MVC1.0) when I open the MVC Application as a website...
Untitled.jpg
0
 
LVL 27

Accepted Solution

by:
nmarun earned 500 total points
ID: 33458544
In that case, you're better-off creating a new MVC project altogether and then add the elements (files and folders) from the existing site to the new one manually.Once you create your new MVC project, copy the contents of the existing folders into the new folders (copy the contents of controller folder of your existing site to the new projects' controllers folder and like-wise). Also copy the files/folders that are not existing in the new project (like the errorpages, Flash, PDF).After you've copied all the files and folders from the old site to the new project folder, read the following article.http://blogs.msdn.com/b/davidklinems/archive/2007/12/18/quick-tip-add-files-to-visual-studio-projects-the-easy-way.aspxThis should get you set up right.Arun
0
 

Author Closing Comment

by:conrad2010
ID: 33458585
@Arun:

Fantastic, thanks for the help... this got me puzzled but it's already restored.

Much appreciated!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
I need help assigning an image to an image control in my VB.Net WPF project 3 43
Angular JS Route 3 45
C# HTTP GET method sample code 3 39
Turn on intranet settings 1 36
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now