Convert VB.Net Web Site to Web Application Project

 I am working with Visual Studio Pro SP1 and had some problems converting an old VB.Net web site into a VB.Net Web Application Project.  I followed the advice offered here ( http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx ), but ran into a few kinks when using the process on a VB project. 

The Problem:
After creating a new Web Application Project, copying in the old files, and running the "Convert to Web Application Project" process, the site would no longer build.  Any classes stored in the "Old_App_Code" folder (previously named "App_Code" before conversion) could not be seen.  The original website was written using the root namespace, and when I converted it, VS changed the default namespace to the name of the project.

My Solution:
First, I changed the default namespace back to the root namespace (set Default Namespace to "" in project properties).  Next, and this is the part that confuses me, is that I copied the code from each file in the "Old_App_Code" folder, and pasted it into another newly created *.vb file in the same folder.  After I had done this for each file, I deleted the old *.vb files and renamed the new ones with the old names.  Viola!  Everything builds and works just fine.

I converted this project in order to prepare it for integration with MSBuild and Team Foundation server (MSBuild applications need a project file, hence the need to convert), and since most of our existing apps are VB.Net 1.1 or 2.0 Web Sites. (not Web Applications), I'm sure that I will run into this again.

Does anybody have an explanation of why the code-copying is necessary, so I can better explain the process to developers as they come on-board for our Visual Studio Team Suite rollout?

Thanks,

Byron

0
bkinnaird
11/6/2007 4:34:25 PM
asp.net.migrating-from-1.x-2.0 1016 articles. 0 followers. Follow

6 Replies
1323 Views

Similar Articles

[PageSpeed] 24

I ran the conversion tool also as described on the scottgu site you referenced.  It's good, but does miss a few things, some of which I still have not resolved.

The conversion tool copies the files in "AppCode" to "OldAppCode" and marks their "build action" as "content" I believe.  So by creating a new cs or vb file, you basically set the build action to "compile" as it is by default for new code files.

I had started setting namespaces on our files.  After seeing your comments, I might start all over again and use your advice for namespaces.

0
Larry
11/15/2007 10:25:17 PM

Instead select all the files in the folder and right click > goto Properties > set Build Action to COMPILE.

 And the job is done instead of converting one file at a time. Saved me a lot of time.

0
tarzaan
11/23/2007 11:48:12 AM

Take a look at Microsoft's documentation on doing this conversion; mabye there is something that can help:

http://msdn2.microsoft.com/en-us/library/aa983476(VS.80).aspx

 


Thank you,

0
atconway
12/20/2007 7:12:04 PM

Changing the build action to "compile" worked... no need to copy the code into new files.  When I was selecting New Item->Class for the new "copy to" file, the default build action is set to "compile" by default for the new classfile.  Somehow the conversion process was changing the build action for the converted files (old files) to the "content" setting, which was causing zillions of errors.  Thanks for the help.

 

 

0
bkinnaird
12/20/2007 7:27:11 PM

Hi,

I am trying to convert an old ASP.Net 1.1 app to 2.0.

These are the steps I followed:

1) Open the 1.1 sln file with VS 2005 - it went through a conversion wizard process and converted the project succesfully.

2) Right click on root folder and select Convert to Web Application - It converted all the files to Partial Class model and created designer files as well.

3) Now I build the web site and it works fine - all the pages come up correctly. The fun starts now.....

1) I add a control to the aspx page and it does not get added to the designer page automatically.

2) I see lots of code highlighted in code behind page with error messages: (example: Control1 is not a member of webform1) there are hundreds of examples like that...though I can see control1 included in the designer class as well) and the page also works and compiles fine. As soon as I make some deliberate compolation error in my code behind file, VS now shows up all these messages as errors in the Error List.

I am confused as to what I am missing.

 Any pointers? 

 

0
kandi8
6/6/2008 6:58:30 PM

Hello,

I reccomend starting a brand new post on your issue in the ASP.NET forum so it gets a little more exposure, than this older post.  People may not read to the last post here to understand your problem.

 

Thanks,


Thank you,

0
atconway
6/6/2008 8:30:03 PM
Reply:

Similar Artilces:

.Net 2.0 Web application using Vb.net is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one ASP.net web application using Vb.net which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

Access .Net 2.0 Application from .Net 2.0 Web Site
I need to populate a specific form in a .Net desktop application from a .net web application.  Is there an easy way to go about this? Hi, Based on my understanding, you want to start an executable application from your ASP.NET websit, right? We can invoke Process.Start method (http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx) to launch an executable application from ASP.NET application. Note: Please keep in mind, the ASP.NET application is running on the server, so it will start the executable application that exists in the server.   I look...

error in converting a framework 1.1 vb.net web site to framework 2.0
  I am trying to convert a framework 1.1 vb.net web site to framework 2.0 site, and it's not possible to rewrite it.  I have gone through the convertion wizard and compliled successfully. Sound great so far. However, when I run the page via the virtual web server, I get a error message said, "Parser Error Message: Could not load type BizWeb.WebPages.DefaultSettings.FeeForm"   Did anyone exprience this problem when doing convertion? Please share some experience to me.   Thanks in advance!   vcllvc  Hi, One way: Go to IIS manager, right click...

Converting 1.1 Web Project to a 2.0 Web Application Project, then and now...
Hey all, I hope I can explain this correctly, as I am completely lost as to what was and is going on. About 6-8 months ago, I installed VS2005 Professional on my notebook and got the VS2005 WAP conversion installation, which was a seperate add on at the time. I took a couple small 1.1 applications and as I recall pointed to the .vbproj file and allowed the conversion wizard to do it's thing and then went through the output fixing all the code which was no longer 2.o compliant (ie. Like the SMTP class changes).  Now, on my Desktop I was told to install VS2005 Team System and patc...

Making a .NET 1.1 Web Project .NET 2.0 enabled
We were able to use such things as  below in the InstantASP forum source code.  I'm trying to do the same with Presstopia but it errors out when putting the below in their web.config. <machineKey validationKey="..." decryptionKey="..." validation="SHA1" decryption="3DES" />So what did InstantASP have to do to make their 1.1 code able to use machinekey then if it's not a .NET 2.0 application?  I want to do the same for Presstopia.   I figure there are general things you can do to allow a 1.1 app to make it able to ...

HELP Running a web-site with .NET 2.0 and NET 1.1
Hi evreybody,  I have a HUGE problem. I running a website that I have just created with ASP .NET 2.0 technology, well within my web site there is an web application that needs to run under V1.1. I'm using IIS 6.0 and I was wondering to see if anybody can help me run my new site, and run that web app at the same time. Basically is two sites within one web directory, the way you acces both sites is by the same link, just one is ROOT/default aspx (V2.0) and the other is Root/webapp/default.aspx (v1.1) can anybody help me... :( THANK you you will have to define them as two separate w...

Convert v 1.1 Web application to 2.0 Web site?
Hi - I migrated the asp.net 1.1 portal start kit to asp.net 2.0 as a web application in VS 2005. This seems to have worked out fine. Now I would like to be able to work on this project at home on my laptop where I only have Visual Web Developer Express. The problem is that when I build the project in Visual Web Developer Express - I can't figure out how to compile my asp.net 1.1 codebehind files. As I understand it, a Web site project does not build the site .dll in the bin directory as before. I have not yet updated my files as partial classes - is this all I need to do? Visual Web...

Can a .NET 1.1 page execute in a .NET 2.0 web site?
I've got a ASP.NET 1.1 web site to which I would like to add some ASP.NET 2.0 web pages. Could I just change the web site to point to the 2.0 .NET version and still have the .NET 1.1 web pages work so that both versions are in the same web site? Have you some of you approached this? Thanks. The official answer is maybe It's not officially supported, but most ASP.NET 1.1 pages will run fine under ASP.NET 2.0.  Officially you should run the upgrade wizard on your 1.1 pages. This is a  pretty good blog entry.      JamesMy Blog: http://www.wintersfamily.plus.c...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0 #2
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! There are too many differences for one email - - from 1.0 to 1.1 (not a whole lot of real change, other than fixes, at least compared to 1.1 to 2.0) With 2.0, there were many new declarative controls, with many new ideas added in With 3.0, it's a superset of 2.0 - instead of replacing the installation completely, it just 'added on' new functionality - I would...

VS 2008 Web Application Projects targeting .NET 2.0 and AJAX 1.0
Hi! I have a problem trying to use VS 2008 Web Application Projects targeting .NET 2.0 and AJAX 1.0: I've read in one of the blogs (http://blogs.msdn.com/webdevtools/archive/2007/07/30/using-vs-2008-to-target-asp-net-ajax-1-0.aspx) that there is a bug that makes Beta 2 recognize System.Extensions 1.0.61025.0 as a .NET 3.5 component. When I try to add a reference to it in my .NET 2.0 Web Application Project, it appears grayed out (as I believe it should). So, I there any other way to add it?I tried referencing the assembly in the web.config file, but the WAP doesn't build.Any ideas?&n...

2.0 web site and 1.1 Web Project
We converted a 1.1 solution to a 2.0 solution. All of our projects that are for the UI seem to be web applications, ie. they have a csproj file and the dll matches the name name of the project as the dll name. For example mywebsite.dll. There is one assembly. However when I right click on the root of the project in VS 2005 I get a convert to web application projet option we are using VSS. Why is this so to me it looks as though it is already a web application (because of the presence of the csproj file). If it were a web site from the .net 2.0 model then it would make sense ie. we can c...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! Have a look into this links http://en.wikipedia.org/wiki/.NET_Framework http://blogs.msdn.com/mohammadakif/archive/2006/12/03/net-3-0-different-versions-of-the-net-framework.aspx http://www.codeproject.com/aspnet/ComparisonASP1xASP20.aspAshok Rajawww.iGold.inDon't forget to click "Mark as Answer" on the post that helped you. This credits that m...

converted 1.1 to 2.0 Web application project, now project compiles under both models
Hi,  Just converted our fairly big 1.1 project to 2.0.  Then used "Convert to Web application" on the whole project. When we just "build" or "rebuild" the ouput window tells us that is compiled into one assembly in the "bin" directory, just as intended and the reason we converted to Web application project type. Now, when we either "debug" or run it after deploying it: - it complies  to one single assembly again, and we get a confirmation of that in the "output" window. - but then it proceeds to compil...

Web resources about - Convert VB.Net Web Site to Web Application Project - asp.net.migrating-from-1.x-2.0

Application - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Would you give up chocolate for better application performance?
Application performance is critical to business performance according to 98 percent of businesses, yet 89 percent of executives say the poor ...

Gun Sales, Concealed Permit Applications Surge After San Bernardino
The day after Syed Farook and Tashfeen Malik opened fire in San Bernardino, gun sales and concealed carry permit applications surged.

MBA: Mortgage Applications Increase in Latest MBA Weekly Survey, Purchase Applications up 29% YoY
From the MBA: Mortgage Applications Increase in Latest MBA Weekly Survey Mortgage applications increased 1.2 percent from one week earlier, ...

Falling Costs, Rising Applications Will Boost US Energy Storage Market
... in 2013 to 3,659MWh by 2020 on improving economics and policy developments, predicted GTM Research's Shayle Kann Falling Costs, Rising Applications ...

Mortgage applications down 0.2%
Mortgage interest rates haven't moved much in the past three weeks, but they are holding at a higher level than for all of 2015.

California Film & TV Tax Credits Applications Dip In New Small Screen Round
With production on the uptick in the home of Hollywood , the second round of those seeking small screen Golden State tax credits saw 32 applications ...

Digitimes Research: China touch panel makers increasing investments in niche products and large-size ...
The China International Touchscreen Exhibition (C-Touch) was recently held in Shenzhen, China, featuring a number of local and international ...

Six internet-of-things applications in big new government trial
Manchester, England, is set to be the UK demonstrator city for internet-of-things innovation. Of course, there is much smart technology already ...

New patent application suggests Nintendo’s NX console is like nothing we’ve seen before
Nintendo has been close-mouthed about its plans for the Nintendo NX, but a recent patent filing may have tipped the company's hand. If so, then ...

Resources last updated: 12/13/2015 10:53:16 AM