can i use visual studio 2008 for a regular asp project - visual-studio

i have taken over an asp project from a friend and he was basically just using notepad++ to develop. I would like to use visual studio 2008 but there is no project file or solution file at this point, just a bunch of asp pages and some images, css
the other trick is that he will still be developing for a bit but doesn't want to use VS.
what is the best way to "upgrade" this so i can use VS ide features and he can still use notepad++ without any issue?
EDIT: Thanks for the responses. One additional request. We will ultimately be looking at migrating this to an ASP.net mvc site. Would that change any of the answers below or should i start from scratch when that happens in terms of vs projects solutions?

Yes. We are currently using it that way to support a legacy .asp application. We have a project in one of the solutions for the .asp pages.
edit:
In response to your edit I wouldn't see a need to change anything when migrating to MVC. You'll be adding new project(s) to your solution containing the .asp code. If anything, having it all in one place might make your life a little easier during the transition. Our ASP.net site(s) are in the same solution as the .asp project.
edit (part deux):
Using Notepad++ should present no issues. The edits would be to the .asp files (and .css, etc), not to the VS .proj file. I often use UE to edit the .asp files if I don't need to open the IDE. Assuming you're using a source repository of some sort...

Just create a blank solution (New Project > Other Project Types > Blank Solution) and then include all of the .asp files and any other relevant files.

You can just do File > Open > Web Site... and point VS at the folder containing the files. That should let you just edit the files. I say should as I don't have a classic ASP site to test this on.

When you start the MVC app, I'd start that one from scratch with a new project and then use your existing asp pages as starting points for your views.

Related

many websites under one solution

I have many websites under one solution for documentation purposes. I build these small websites for prototyping new concepts that I've learned.
The problem is whenever I try to debug one of the stand-alone websites Visual Studio will start Cassini for all the websites under the solution.
I know I can create a new solution and just bring in the projects as needed but I was just wondering if there was another way to be able to see all my WebSites and debug anyone one of them at anytime without starting up Cassini for all websites?
In Visual Studio, right-click on the Solution (not on a project), and go to Properties. Select Configuration Properties from the window on the left and untick the Build and/or Deploy properties for the projects that you want to ignore.
I ended up just making them individual solutions and just organzing my directory and making the directory names more descriptive.

How can I run a classic asp site (not asp.net) from within VS2010?

I am just putting together a quick non-cms site. Even though it's non-cms I would still like to use includes with it. Is there an easy way for me to run a classic ASP file in VS2010 without having to install/configure IIS?
I was able to create a new web site project and configure it to use IIS Express. I added the .asp files to the project and it served them correctly.

visual studio not letting me add a VB.Net file

I have an example web solution that I downloaded and when I try Add New Item (e.g. page, web control, etc.), only C# is present as a language option. In other solutions I use, I see C# and VB. How can I add a new VB item?
If the current project is a C# project, you will only be able to add C# items to an existing project.
You should be able to add a new project to the solution, set it to a VB.Net project, then add VB items to it.
If you're trying to do this in a web project, you might be able to achieve this like DotNetNuke does it. Check out this post as to what files have to go in what folder (specifically App_Code) as well as changes to your web.config file. I do have to admit that other than DNN, I've never tried to do this in a regular web project.

How to precompile ASP.NET 4.0 to a Single DLL with VS 2010

I recently upgraded from VS 2003 where I was working on a ASP.NET 2.0 website to VS 2010 where I have migrated to ASP.NET 4.0. So far it has been a big headache to get my site compiling with the new version. One problem was that my aspx.cs pages could not find the shared code libraries in my project. I solved this by moving my shared code to the App_Code folder (if there's a different/better way to do it please let me know).
Another issue that I am finding confusing is with pre-compilation. With VS 2003 I could click the build project button and it would precompile my site into a myweb.dll and myweb.pdb files. Now I'm having trouble doing the same in VS 2010. When I build the site in VS 2010 the dll is not created. I did manage to find an option to "Publish" the site which takes forever (like 2 minutes) and involves duplicating the site to another folder. This would have been acceptable but instead of making the single DLL file, it makes a bunch of files: App_code.compiled, app_code.dll, App_code.pdb, App_global.asax.compiled, App_global.asax.dll, App_global.asax.pdb, App_Web_lrpcway1.dll, App_Web_lrpcway1.compiled, App_Web_lrpcway1.pdb.
The application works - I can deploy it with all these files. However, I'd really like someone to explain what are the extra files and if there is a better way how to do it.
Thanks
This is the difference between a website and a web application.
You can convert your website to a web application to have it
behave more like you are used to.
The files in appCode are compiled when required to run and thus
does not provide dll.s in the bin/debug folder, but they should
be created when the application actually runs (but it is not
put in the same location).
Here is a nice write up about it Link
You can use the ASP.NET Merge Tool to combine all of the little DLLs into one big one.
http://msdn.microsoft.com/en-us/library/bb397866.aspx

I don't get the concept of Visual Studio Projects and Solutions

In Eclipse, I have a workspace that contains all of my projects. Each project builds and compiles separately. A project does not interact with another project.
How does this relate to Visual Studio and Projects/Solutions there?
A VS project is it's own entity. It will build and compile by itself. A Solution is just a way to contain multiple projects. The projects don't necessarily need the other projects to compile (though, they can depend on the other projects).
This just lets you conceptually group projects together into one Big Project. For instance, you can have a separate testing project. It depends on the code from the actual project, and should be kept together with the actual project, but it does not need to be in the same exe/dll.
Each VS project builds a single EXE or DLL. The solution is just a collection of related projects.
So VS project:Eclipse project::VS solution:Eclipse workspace.
Another way to look at it is, a solution is a container for projects. For most of my work , I create each tier as a project within a solution so my tree looks like:
My Web App or Win App
Presentation Layer
files...
Business Layer
files...
Data Access
files
Your mileage may vary
#Thomas Owens:
Yes, some (most?) people using Eclipse have more than one workspace. It's what surprised me the most when I first started using Eclipse, so I'm replying here to make this comment more visible.
The thing that may be throwing you off is the following:
In VS2003, everything had a Project file and a Solution file. If you had a Solution with one Project, you could open the Solution and see the one Project. If you opened the Project, it would try and create a new Solution file to contain the Project. But web projects and Winform projects all had Projects and Solutions.
In VS2005 this changed a bit - by default now, Web projects no longer had Project files. They had received feedback from some web developers that didn't like Project files - their take was that if a file is in the directory, it's part of the app. After VS2005 shipped, they got more feedback from developers who did like the Project file notion, so they patched it back in. This is "Web Site" versus "Web Application" in VS2005 (and I can't remember which is which now).
In addition, in VS2005, if you have a Solution open with only one Project, you won't see in the Solution Explorer that there's even a Solution at all, you'll only see the Project (as if it was not in a Solution). Only after adding the second Project will you see that there's a Solution containing them both.
So basically you were on the right track - Solutions and Projects work the same in Visual Studio as they did in Eclipse, it's just some quirks that make things confusing.
A Solution has 0 or many Projects...
There are way too many kinds of web projects in Visual Studio 2008. There are Web Site Projects vs. Web Application Projects and they limit you in different ways. It's a good example of Microsoft providing too many choices instead of focusing on one strong solution. Even within the Web site Project option, there are at least 3 different ways to compile your application.
I found that not always seeing the solution in the Solution Explorer to be irritating. There is a setting in Options->Projects and Solutions->General called "Always Show Solution" which was handy.

Resources