VB in VS 2005: Solution fails to Build but no Error Reported

  • Thread starter Thread starter Charles Law
  • Start date Start date
C

Charles Law

In the build output appears

========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

However, the compiler does not generate any errors, and the Errors list is
empty.

This is an almost trivial program, but the compiler will not compile it and
will not tell me where the error is.

Has anyone else seen this?

Charles
 
Charles,

Create a new project of the type you want and then copy/paste your code to
the new project. If that doesn't work, please provide more details, such as
the code and project settings.

Mike Ober.
 
Michael D. Ober said:
Charles,

Create a new project of the type you want and then copy/paste your code to
the new project. If that doesn't work, please provide more details, such
as the code and project settings.

But not here; this group is for VB 6.0 and earlier. VB.Net belongs in a
VB.Net newsgroup.
 
For those who hadn't noticed, it's being cross-posted to both a VB and a
VB.NET group. The regular m.p.vb.bugs should be removed in further
responses, as that group is reserved for "classic" VB (VB6 and earlier).


Rob
 
In that case, you should have put that in your original answer - not the
generic "VB doesn't exist in VS 2005" that the VB 6 fanatics spew. The
reality is that VC++ doesn't exist in VS 2005 in the same manner as it
existed in VS 6. I know because I have programs in both VB 6 and VC++ 6.
The VB 6 code has ported to VB 2005 a lot easier than the VC++ code did to
VC 2005. At some point, VB 6, with its mixed 16/32-bit COM model, will not
even be able to run on Windows. The end to VB 6 is definitely on the
horizon given that Longhorn (Windows 2008) will be the last version of
windows running 32-bit processors.

Mike.
 
Robert Morley said:
For those who hadn't noticed, it's being cross-posted to both a VB and a
VB.NET group. The regular m.p.vb.bugs should be removed in further
responses, as that group is reserved for "classic" VB (VB6 and earlier).

Ahh, I had not seen that. Apologies for any confusion.
 
Michael D. Ober said:
In that case, you should have put that in your original answer - not the
generic "VB doesn't exist in VS 2005" that the VB 6 fanatics spew. The
reality is that VC++ doesn't exist in VS 2005 in the same manner as it
existed in VS 6. I know because I have programs in both VB 6 and VC++ 6.
The VB 6 code has ported to VB 2005 a lot easier than the VC++ code did to
VC 2005. At some point, VB 6, with its mixed 16/32-bit COM model, will not
even be able to run on Windows. The end to VB 6 is definitely on the
horizon given that Longhorn (Windows 2008) will be the last version of
windows running 32-bit processors.

Mike.

Your enthusiasm for the future can be appreciated but your observations and
prophesies are a bit exaggerated.

The VC++ compiler included with VS2005 is quite capable of generating C++
sans any managed environment. The "reality" is while the IDE has changed
(features have different names, colors, placements, &etc.) there is no
substantial differences between VS6 and VS2005 when it comes to VC++. While
with VB the language itself has changed, VC++/CLI is an option.

The statement that VB6 code ports to VS2005 easier than VC++ code can not
possibly be based on any concrete personal experience. Pure fantasy.

That VB6 uses a 'mixed 16/32 bit COM model' is an extraordinary observation
and definitely would come as a surprise to any VB6 programmer.

As for the demise of VB6 - I think everyone is well aware that the VB
development platform is already over the horizon as far as MS is concerned.
However, the VB IDE and applications are supported on Vista, and according
to MS, apps will be supported on Windows Server 2008. Considering a support
life-time of 5 to 7 years, that means it will be at least 2013 before
current VB6 programmers need to be concerned.

[Which by the way, makes VB6 support almost 5x longer than "VB.Net - VS2003"
was supported. <g>]

It is true that MS has announced that "Windows Server 2008" is the last OS
to support 32-bit *processors*, BUT that doesn't mean 16-bit or 32-bit
*processes* won't be supported, or that 16/32-bit processors/processes won't
be supported with newer workstation OSs.

-ralph
 
Ralph said:
Your enthusiasm for the future can be appreciated but your observations
and
prophesies are a bit exaggerated.

The VC++ compiler included with VS2005 is quite capable of generating C++
sans any managed environment. The "reality" is while the IDE has changed
(features have different names, colors, placements, &etc.) there is no
substantial differences between VS6 and VS2005 when it comes to VC++.
While
with VB the language itself has changed, VC++/CLI is an option.

The VC++ linker uses a new interface which means that older libraries cannot
be used. This is a major change, especially when forced to use older
libraries. If there is a switch that will allow this, please let me know.
The statement that VB6 code ports to VS2005 easier than VC++ code can not
possibly be based on any concrete personal experience. Pure fantasy.

That VB6 uses a 'mixed 16/32 bit COM model' is an extraordinary
observation
and definitely would come as a surprise to any VB6 programmer.

Take a look at the limitations of the ActiveX controls that shipped with VB
6. At least one of them, the progress bar control, is a 16 bit control. It
won't handle values longer than 2^15-1 for max value. I suspect there are
other controls with similar issues.
As for the demise of VB6 - I think everyone is well aware that the VB
development platform is already over the horizon as far as MS is
concerned.
However, the VB IDE and applications are supported on Vista, and according
to MS, apps will be supported on Windows Server 2008. Considering a
support
life-time of 5 to 7 years, that means it will be at least 2013 before
current VB6 programmers need to be concerned.

[Which by the way, makes VB6 support almost 5x longer than "VB.Net -
VS2003"
was supported. <g>]

Bravo - MS actually did something right with regards to VB 6. Personally, I
suspect that VS 2002 & 2003 were designed to be a "throw away" answer to Sun
Microsystem's Java. In the VB world, you lost a lot of IDE features going
from VB 6 to VB 2002/3. Features that have almost all been restored in VB
2005. Also, the framework and ASP.Net changed dramatically from 1.x to 2.0,
yet the change from 2.0 to 3.0 was 100% backwards compatible.
It is true that MS has announced that "Windows Server 2008" is the last OS
to support 32-bit *processors*, BUT that doesn't mean 16-bit or 32-bit
*processes* won't be supported, or that 16/32-bit processors/processes
won't
be supported with newer workstation OSs.

64 bit Windows OSs cannot run 16 bit programs, which eliminates many VB 6
program simply because their installers are 16 bit. This effectively
eliminates the ability for most people to install and run VB 6 based
programs on 64 bit Windows. Yes - I think it's a lousy solution since the
64 bit processors still have the ability to emulate an 8086.

I am definitely one of those people who feel VB 6 got shafted with the
introduction of VB.Net. Many of the features in VB 6 could easily have been
incorporated into VB.Net, yet MS deemed it either too difficult or not worth
the effort. It is interesting that the VBA for Word and Excel was actually
based on the VB 6 Control Creation Edition, which makes me wonder if MS had
always felt that VB 6 was a throw away language.

Mike.
 
Take a look at the limitations of the ActiveX controls that shipped with
VB 6. At least one of them, the progress bar control, is a 16 bit
control. It won't handle values longer than 2^15-1 for max value. I
suspect there are other controls with similar issues.

Its max value has nothing to do with whether or not it's a 16-bit control.



Rob
 
Michael D. Ober said:
The VC++ linker uses a new interface which means that older libraries cannot
be used. This is a major change, especially when forced to use older
libraries. If there is a switch that will allow this, please let me know.

Linking object files compiled with different compilers is always an
adventure. But as they are COFF it is possible (depending of course on
initial compiler directives).

One of the many advantages of using a Dynamic Linking or COM.
Take a look at the limitations of the ActiveX controls that shipped with VB
6. At least one of them, the progress bar control, is a 16 bit control. It
won't handle values longer than 2^15-1 for max value. I suspect there are
other controls with similar issues.

Another amazing revelation.

No complaint with the rest.

-ralph
 
Hi Michael

Thanks for the reply, and apologies to everyone for any confusion caused by
the cross-post. As there is no dotnet.vb.bugs I was not sure whether it
applied.

Anyway, I had pretty much come to the same conclusion about recreating the
project (as it is so small), and as you might expect the new one builds just
fine.

I have compared the old and the new, and there is no obvious difference to
me. Naturally the GUIDs are different, but apart from that:

In the original project, the Application.myapp file has an entry

<ApplicationType>2</ApplicationType>

which does not appear in the new project. Also, the original sln file has an
entry

ProjectSection(ProjectDependencies) = postProject
{52BBA65D-E55C-4926-BBC2-95489C9FC144} =
{52BBA65D-E55C-4926-BBC2-95489C9FC144}
EndProjectSection

inside the Project...EndProject section which does not appear in the new
project.

The last difference is in the vbproj file. The original has

<NoWarn>
</NoWarn>
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>

whereas the new vbproj just has

<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>

in the Debug and Release sections. This looks like it could be the culprit,
but I still don't get why it wouldn't tell me what the error or warning was.
It is worth noting that the Compile tab in both project property windows
shows identical settings.

Charles
 
Michael D. Ober said:
Take a look at the limitations of the ActiveX controls that shipped with
VB 6. At least one of them, the progress bar control, is a 16 bit
control. It won't handle values longer than 2^15-1 for max value. I
suspect there are other controls with similar issues.

Anyone that has problems creating their own progress bars, please raise your
hand.... want one that supports double floats?
[Which by the way, makes VB6 support almost 5x longer than "VB.Net -
VS2003"
was supported. <g>]

Bravo - MS actually did something right with regards to VB 6. Personally,
I suspect that VS 2002 & 2003 were designed to be a "throw away" answer to
Sun Microsystem's Java. In the VB world, you lost a lot of IDE features
going

I'm sure the people that paid their hard earned money for VS2002/2003 would
love to hear they invested in "throw away" products <g>

Next, I'm sure the "but, VB.net code is very similar to VB code"... yeah...
and King snakes are very similar to Coral snakes. Only one will kill you.

http://en.wikipedia.org/wiki/Image:Coral_snake.jpg
http://en.wikipedia.org/wiki/Image:Serpent_roi_bandes_grises_01.JPG
 
All

In case anyone is interested, I now know why the build was failing (in this
instance).

The program is notionally a Windows Application, but it has no user
interface because it is intended to be run as a Windows Scheduled Task. To
this end, I removed the reference to System.Windows.Forms from My Project |
References.

Everything was fine, and nothing got upset, until I tried to build the
solution, which is when the build failed without any reason; no warning or
error messages, just "1 Failed".

I tried to add the reference back, but VS crashed every time. In the end I
opened the vbproj file in Notepad and added it manually. Suddenly,
everything worked again.

Funny that, isn't it!

Charles
 
Back
Top