.NETGURU
Compiler problems?
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.sdk.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

Dhruv (VIP)
I am using Visual Studio .NET 2004, Version 7.1.3088, and I have experienced
some really odd compiler issues, and was wondering if anybody has had similar
experiences.

Two that come to mind are:

1) A child form inherits from a parent form. The child has a constructor
that calls the parent's constructor. When I instantiate the child using its
New method, the compiler complains that the New method is not declared, when
it clearly is.

When I select Build->Rebuild Solution, there are no syntax errors, but when
I run the application by clicking Debug->Start, the above errors appear. If I
ignore them and continue with the application, everything runs fine.

2) The same parent and child form as above, but the child overrides one
method from the parent. The resulting binary does not execute the child code.

With this problem, I recompiled the solution many times with no effect. So I
checked in all my code changes, restarted VS.NET and recompiled the code, and
then the problem was alleviated.

So in general, I have found that the problems can be alleviated by either or
all of the following:

- Close VS.NET and start again.
- Check-in all changes and Get Latest Version in Sourceoffsite, and restart
VS.NET.

My guess is that the Build->Rebuild Solution complies the code to byte-code
while Debug->Start further translates the byte-code to binary before it is
actually loaded and executed. Because the first compiler does not write the
byte-code 'properly', the second compiler finds errors in translating the
code, or the second compiler is just not robust enough.

Any thoughts or comments on this issue?

Reply to this message...
 
    
Niki Estner
"Dhruv" <Click here to reveal e-mail address> wrote in
news:Click here to reveal e-mail address...
[Original message clipped]

This is just guessing, but as you are using source-safe, you should check
the date/time of the files that haven't been compiled: (If the developer's
computers are out of sync, this can happen)

[Original message clipped]

No, there is only one compiler. AFAIK Build -> Build solution and Debug ->
Start only recompile the files that have changed since the last build, while
a rebuild rebuilds all files.

Niki

Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification