Converting .NET 1.1 site to 2.0 Problems

Posts   
 
    
NickD
User
Posts: 224
Joined: 31-Jan-2005
# Posted on: 19-Dec-2005 19:14:37   

So, I got adventurous and wanted to convert my 1.1 site to 2.0. No problem. Read up on the potential issues on MSDN and my web site didn't seem like it would have any issues. I ran the conversion and had no exceptions reported. I opened the converted project and the only issues I found were a few deprecated namespaces had changed. No problem, fixed those.

Then, I hit F5 for the first time, and I get funny messages about syntax errors in my global.asax file. OK - that is actually an optional file now, so I'll just delete it and see what happens. Next, my web pages load with a parser error. And oddly enough the ASP.NET runtime version at the bottom of my error page says 1.1. Hmm.

I haven't confirmed this yet, BUT, remember this discussion (Web Projects as Class Libs), which I loved and did. Well, I'm guessing (I'll fill you in as I discover more) that since the converter thought it was converting only a class library, that it didn't convert any of my web pages. The evidence for this is that the "codebehind" property of the "@page" declaration at the top of every .aspx page is no longer valid in 2.0. At least as far as I can tell. If you know differently, please fill me in. Anyway, that property is still in all of my .aspx pages.

So, I'm going to keep working at this one and see what I can come up with.

EDIT --

I just read this at the bottom of this How to make web projects into class libs:

"Unfortunately I'm finding that this really doesn't work well with VS2005. Debugging plain won't work. The macro above doesn't work for me. Attaching to aspnet_wp sits there and looks dumb. VS2005 does not like class library projects as web sites, I'm afraid. Unless someone has a good solution to these issues, it probably bears mention at the head of the page that these methods are not advised for VS2005 users, nor for VS2003 users who may be looking to make the jump with their projects later on."

...so I think what I'm going to do is convert my backed up 1.1 app BACK into a web app, then re-convert it into 2005 and see what that does.

NickD
User
Posts: 224
Joined: 31-Jan-2005
# Posted on: 19-Dec-2005 20:12:33   

After going back to the backed up 1.1 project and changing the project type to "Web", I then converted it again, and everything behaves the way it is supposed to in .NET 2.0. So, this means you can not convert a 1.1 class lib pretending to be a web app and have it behave the same way in 2.0, at least that I have seen yet.

Does this mean that .svn folders will be a problem again with Subversion?

erichar11
User
Posts: 268
Joined: 08-Dec-2003
# Posted on: 01-Jan-2006 04:57:13   

Question: How did you convert your project back to a web project. I'm running into the same issue. How does one change the project type to "web". Can't figure out where to do this.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 02-Jan-2006 14:18:41   

I did the following and succeeded: 1- I downloaded and installed the update mentioned below. 2- Copied the 2003 web project files to a new location 3- Opened Microsoft Visual Web Developer 2005 Express Edition 4- File->Open Web Site 5- Pointed it to the new location 6- The conversion wizard poped up and voila.

The Update to the Web Project Conversion Wizard http://www.microsoft.com/downloads/details.aspx?FamilyID=7cecd652-fc04-4ef8-a28a-25c5006677d8&DisplayLang=en

Also refer to this article: Step-By-Step Guide to Converting Web Projects from Visual Studio .NET 2002/2003 to Visual Studio 2005 http://www.microsoft.com/indonesia/msdn/webprojectsvs05.aspx

NickD
User
Posts: 224
Joined: 31-Jan-2005
# Posted on: 03-Jan-2006 21:57:15   

erichar11 wrote:

Question: How did you convert your project back to a web project. I'm running into the same issue. How does one change the project type to "web". Can't figure out where to do this.

In your .csproj file, you have to set the ProjectType = "Web" and I think that is it. That is just off the top of my head. If that doesn't work, then let me know and I'll go back to my original file.