Visual Studio 2010: convert a website project into a web application project?

I have an existing solution in VS2010. When I click on the properties of my project, I get a view, as seen in image1.png: enter image description here When I create a new empty ASP.NET web application and click on the properties of my project, I get a view, as seen in image2.png: enter image description here

Huge difference.

Now I am implementing this code here: http://wcf.codeplex.com/wikipage?title=Getting%20started:%20Building%20a%20simple%20web%20api

And this tutorial assumes that I get an idea, as I showed you in image2.png

In image1 and image2, I also noted menu items: "Website" and "Project"

This makes me assume that I created the application for the website, while I need something else (I am thinking of a web application project).

Not sure what to do now, I need to convert the current application to another, but to which type and how to do it?

I came to this post too: http://blogs.msdn.com/b/webdevtools/archive/2009/10/29/converting-a-web-site-project-to-a-web-application-project.aspx But before I start typing everything: P Is this what will solve my problem?

+4
source share
3 answers

It should be possible to use a website or a web application project. In the example, from the link you posted, they use a predefined template for ASP.Net MVC Web Applications. This has several advantages - it establishes a structure and other resources for you - it is an effective template.

For the purpose of the tutorial, why don't you just configure the application this way? If you have already written the code, you can simply import it into a new application.

For future projects, you might think about what works best for your needs. Besides structure, there are some other key differences between a web application and a website design.

MSDN conveniently provides the differences here:

http://msdn.microsoft.com/en-us/library/dd547590.aspx

If you find that you want to use the functions of the web application, then the link you published is in order. You will need to reorganize your links, etc. Etc., But the process is quite simple (but not painless).

+3
source

The β€œwebsite” in visual studio is the old .net 1 style for creating websites. It basically dynamically compiles the code in the folder when it hits the first time. .NET later introduced a "web application" model in which code is compiled into a DLL and no code files are deployed to the site. The "websites" are largely designed and should not be used for any new projects unless you are making a quick demo site. The Codeplex project you are referencing is also dependent on MVC 3 (which are web applications). You probably better just restart as the tutorial says - create a new MVC application, as shown in the first screenshot.

If you do not have this option, use the Web Platform installer to add MVC for you - http://www.microsoft.com/web/downloads/platform.aspx

Good luck

+2
source

I can’t say exactly what is happening with the screenshots, but if you have a website that you need to convert into a web application project, you can find directions here

Although the instructions apply to VS2005, they are basically the same for 2010.

+1
source

Source: https://habr.com/ru/post/1384400/


All Articles