Visual Studio 2005 - Initial Thoughts

samsmithnz

Senior Contributor
Joined
Jul 22, 2003
Messages
1,038
Location
Boston
So the MSDN disk for VS.NET 2005 arrived on Tuesday, I got a fresh build of a top-notch laptop from the helpdesk, and loaded VS.NET onto it and proceeded to start loading all my 2003 projects to see what would happen. All the windows ones load with no problems and even run - the biggest one needed a couple of minor tweaks to fit with the new rules in Vs 05. Then I loaded up a pretty big ASP.NET project.

This is a nightmare. I build and it says no errors, but 3 warnings. I look at the warnings and they are all minor "Variable x is used before it has been assigned a value" type errors. But whenever I build it turns the warning into an error. So I fix the 10 warnings it displays and it suddenly comes up with 15 new errors and 30 warnings. I fix the new errors, rebuild, and it asks me to fix the warnings as they are being treated as errors... :mad: I address these warnings, rebuild, no warnings, great. It seems to build but the app doesn't run, so I start debugging it, and I suddenly get 3 new errors and 30 warnings. :mad: :mad: :mad: ***?! Why can't it just tell me all these warnings at the same time. I've been stuck it a simliar cycle to this for 3 days now. How do I ignore those warnings - that really don't matter....?
 
Last edited:
Try cleaning and Rebuilding the entire thing instead of relying on previous intermediate files. Also try not making silly coding errors that cause warnings. YOu could also turn off the warnaserror setting if you really don't like it.
 
Are you using VB.Net or C#?

I recall C# in 2003 being very similar in that you have one error, fix it and you have 90. Fix 2 and you have 3. Fix 3 and you have 101 (extra errors not shown).

That was very agitating.

There is a way to ignore warnings, you need to go into your projects build settings and choose how to handle everything.
 
They aren't silly coding errors. Its stuff like I declare 3 strings

dim strName, strAddress, strState as string.

And because I don't have:
strName = ""
strAddress = ""
strState = ""

its complaining that the variables aren't setup right.

Questions:
1. How do I clean and rebuild it?
2. Where is the option to turn off warnings?
 
samsmithnz said:
Questions:
1. How do I clean and rebuild it?
2. Where is the option to turn off warnings?

Note that this is with VS 2005 Pro working on a winform, not a webform. I suppose options may vary.

1. If you're using VS and not Express, you right click on your solution and/or project and on the context menu will be "Clean Solution" or "Clean" respectively.

2. Again, right click on your project/solution and select Properties. On the window that pops up, hit the compile tab. Lots of stuff here like a checkbox that turns all warnings into compile errors - a checkbox that turns off warnings and numerous items that can be set to cause no reaction or react as a warning or error.
 
I've gone right back to the drawing board, and I can't even get the simplist of ASP.NET projects to work.

This is what I do:
1. Copy the ASP.NET project to the development laptop. Configure the project in IIS, adding it as an application, and then setting the asp.net version to 2.0. Note that before I convert to VS.NET 2005 and the .net version is set to 1.1, it works fine.
2. Open the web site in VS.NET 2005 and build. no errors or warnings. Open the website in my browser.

I always get this error: (any more ideas...? Is there someone else who is trying to do this who has been successful???).

Server Error in '/RestrictedList' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
System.Web.Hosting.ISAPIWorkerRequestInProc.GetServerVariable(String name) +1618
System.Web.Security.WindowsAuthenticationModule.OnEnter(Object source, EventArgs eventArgs) +593
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
 
Back
Top