Tuesday, March 13, 2012

Should be a simple question

I am just learning ASP.NET. (I am rather familiar with regular ASP 3.0) As I proceed to do the examples in the text book I am using to learn VB.NET, the example projects are becoming progressively more than I want to type in from scratch each time. So I decided to try and shorten the process of my having to type everything in, and that is where my problems begin. First I start up a new project and let Visual Studio set up a Virtual Directory for me. Then I quit out of Visual Studio and copy the example from the Book's CD to the physical directory (that the virtual directory is associated with). If you assume that I have correctly copied all of the example project's directories and files to the physical directory (from the CD), why then do I get this error message when I try to run the WhatEverNameItIs.vbproj: "Visual Studio.net can not create or open the application. The likliest problem is that required components are not installed on the local Web Server. Run visual Studio .NET Setup and add the Web development component." There must be a way that I can use the examples from my CD so that I don't have to key in everything from scratch.
Thank youThe vbproj that you copied from the CD was probably referring to some directories that are not the same that you have locally.
I would instead create a web project from scratch and drag and drop the files (except for the vbproj) from the CD to the project explorer from Visual Studio.
I would try creating a new project. Once you have done that copy and paste all the files from the CD to the new project. Except this time do not copy the vbproj file.

Chris Gastin
It appears some one beat me to the punch. Bleroy looks like we think alike.

Chris Gastin
Well if I don't key in the vbproj file - how will that help me? Isn't the vbproj file everything I am trying to keep from having to key in by hand. I really don't know what the heck I'm doing I suppose
Ok, thanks to you guys I am making a little progress here. It is still somewhat hit and miss until I refine what I am doing. I now understand that the vbproj file is just a list of pointers to keep the project tied together. The files I care the most about are the aspx & aspx.vb files. After creating a new project (thereby establishing a new virtual directory) I go to my CD sample files and: 1) find out the name that is being used for the default webform1 file on the CD, then I go back to the projects solution explorer and rename the default webform1 file to the name from the CD sample. 2) Now I go to the CD example file and open the .ASPX file I want to copy. I do a select all>copy of that files contents and then go to the new project file and open the matching .ASPX file and copy over that files contents with the CD example contents. I do the same for the ASPX.VB file. 3) I copy any graphics files from the CD to the new project that are required. Now everything will work in the new project. Whew.
In VS.NET you can also right click on your project name in solution explorer and choose "Add Existing File" and point to the files on the CD and add them to your project.
Hoorah! The last reply is the magic bullet to all my problems (so far)...stay tumed for further events in the near future I'm sure.

Cheers

0 comments:

Post a Comment