VS 2005 Trial Hello World

  • Thread starter Thread starter J André Labuschagné
  • Start date Start date
J

J André Labuschagné

Hi All

Just starting to test VS 2005 with C#. Specifications are:

[a] VS 2005 three month trial version.
Windows Vista Ultimate SP1
[c] MS Dot Net Framework 3.51 SP1

I build [cannot find a compile and run anywhere] the classic Hello World
program with one write line. No compile errors. Go to the debug folder in
bin and run it from the command line. Absolutely nothing. What gives?
What am I missing?

Cheers
Andre
 
J said:
Hi All

Just starting to test VS 2005 with C#. Specifications are:

[a] VS 2005 three month trial version.
Windows Vista Ultimate SP1
[c] MS Dot Net Framework 3.51 SP1

I build [cannot find a compile and run anywhere] the classic Hello World
program with one write line. No compile errors. Go to the debug folder
in bin and run it from the command line. Absolutely nothing. What
gives? What am I missing?


Posting the code you're trying to execute?

Frankly, you ought to be using Visual Studio 2010 (the release candidate
is a free download at
http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx), or at the very
least the 2008 version of Visual C# Express. The 2005 version is quite
out of date by now.

But, it should still work. So undoubtedly, you've made _some_ mistake.

But what mistake you've made, is impossible to say, without the exact
code you're trying to run, and a complete, exact description of how
you're trying to run it.

Pete
 
J André Labuschagné said:
I build [cannot find a compile and run anywhere]

If you just select "run" (the green arrow in the toolbar), Visual Studio
saves, compiles and runs the program. If you do it from within Visual
Studio, it should open a console window, write Hello World, and the close
the window so fast the you won't be able to see what it wrote.
Go to the debug folder in bin and run it from the
command line. Absolutely nothing. What gives? What am I missing?

Try to run the program within Visual Studio *before* you run it from the
command line, in this way you can debug it and maybe place a breakpoint in
your code and see if it is reached.

By the way, you ARE writing a Console application, aren't you? If you
try a Console.WriteLine from a WinForms application you will not see
anything. Check the Project Properties.
 
J André Labuschagné said:
Hi All

Just starting to test VS 2005 with C#. Specifications are:

[a] VS 2005 three month trial version.
Windows Vista Ultimate SP1
[c] MS Dot Net Framework 3.51 SP1

I build [cannot find a compile and run anywhere] the classic Hello World
program with one write line. No compile errors. Go to the debug folder
in bin and run it from the command line. Absolutely nothing. What gives?
What am I missing?

Cheers
Andre


To run a project, simply push the green 'play' icon in the toolbar..

As for finding nothing in the folder. Check to see, that you are building to
debug and nor release. There is a dropdown, if that says 'Release' you will
not find it in bin/Debug, but in bin/Release...

And as sugested, you should use VS 2008 C# Express or the RC of VS2010

/Finn
 
Hi All

Just starting to test VS 2005 with C#. Specifications are:

[a] VS 2005 three month trial version.
Windows Vista Ultimate SP1
[c] MS Dot Net Framework 3.51 SP1

I build [cannot find a compile and run anywhere] the classic Hello World
program with one write line. No compile errors. Go to the debug folder
in bin and run it from the command line. Absolutely nothing. What gives?
What am I missing?

Cheers
Andre


[c] MS Dot Net Framework 3.51 SP1 ? Do you mean 3.5? VS 2005 should
be installing and using .Net 2.0.

Also, you mentioned Vista. Did you apply the Visual Studio patch for
Vista? http://support.microsoft.com/kb/929470.

As the others have said, VS 2010 would be a better way to go, unless
downloading to your location is an issue.
 
Family said:
[c] MS Dot Net Framework 3.51 SP1 ? Do you mean 3.5? VS 2005 should
be installing and using .Net 2.0.

VS2005 can use .NET 3.5+, as long as the proper SDK is installed. You
won't get C# 3.0 features (and maybe other stuff, like WPF Designer
support…I don't recall the specifics off the top of my head), but
otherwise it's fine.

Pete
 
22.2.2010 20:51 said:
Hi All

Just starting to test VS 2005 with C#. Specifications are:

[a] VS 2005 three month trial version.
Windows Vista Ultimate SP1
[c] MS Dot Net Framework 3.51 SP1

I build [cannot find a compile and run anywhere] the classic Hello World
program with one write line. No compile errors. Go to the debug folder
in bin and run it from the command line. Absolutely nothing. What gives?
What am I missing?

Cheers
Andre


I tried on a console application

using System;

namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.Write("Hello world");
}
}
}


on Visual C# 2008 Express. When I run it under debugger, the console
window only flashed. But when I run the compiled program on CMD shell
(Vista Business), the text shows as it should (I tested the Write
instead of the common WriteLine to see if the CMD shell puts prompt over
the text, it did not). If you like to see the console window on the
debugger, you have either put the break point after the Console.Write
line, or add

Console.ReadLine();
 
Hi Peter

MS are sending us VS2008 by courier. They do not have VS2010 as a trial
release yet and are not keeping candidate releases as the code base is
changing daily. The full hog is a 2500+ mb download. Got the bandwidth but
am going to skip and will then just upgrade.

Trying to get into this managed code stuff - huge black box between the
developer and the dlls that are called. The .NET Framework is also
appearing to be more and more like a 1000kg gorilla ready to chomp up the
unsuspecting developer and the confused user. Sorry about the rant - we
come from an assembly and raw C background where the latter only had 24
basic commands and everything worked. Used Framework 1 outside of VS a few
years back and dumped it. Having another look at it - 3.51 looks like it
may have gotten it sort of right.

Thanks for the help.

Cheers
Andre

Peter Duniho said:
J said:
Hi All

Just starting to test VS 2005 with C#. Specifications are:

[a] VS 2005 three month trial version.
Windows Vista Ultimate SP1
[c] MS Dot Net Framework 3.51 SP1

I build [cannot find a compile and run anywhere] the classic Hello World
program with one write line. No compile errors. Go to the debug folder
in bin and run it from the command line. Absolutely nothing. What
gives? What am I missing?


Posting the code you're trying to execute?

Frankly, you ought to be using Visual Studio 2010 (the release candidate
is a free download at
http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx), or at the very
least the 2008 version of Visual C# Express. The 2005 version is quite
out of date by now.

But, it should still work. So undoubtedly, you've made _some_ mistake.

But what mistake you've made, is impossible to say, without the exact code
you're trying to run, and a complete, exact description of how you're
trying to run it.

Pete
 
Hi Alberto

Cannot see a "run" green arrow in the toolbar. The only green arrow I see
has as its tooltip "start page".

But you had the solution. It was a WinForms application. Changing it to
Console did the trick.

Thanks a ton.

Cheers
Andre

Alberto Poblacion said:
J André Labuschagné said:
I build [cannot find a compile and run anywhere]

If you just select "run" (the green arrow in the toolbar), Visual
Studio saves, compiles and runs the program. If you do it from within
Visual Studio, it should open a console window, write Hello World, and the
close the window so fast the you won't be able to see what it wrote.
Go to the debug folder in bin and run it from the
command line. Absolutely nothing. What gives? What am I missing?

Try to run the program within Visual Studio *before* you run it from the
command line, in this way you can debug it and maybe place a breakpoint in
your code and see if it is reached.

By the way, you ARE writing a Console application, aren't you? If you
try a Console.WriteLine from a WinForms application you will not see
anything. Check the Project Properties.
 
Hi Finn

Still looking for the green button. First time in this IDE. But thanks for
that.

Cheers
Andre


Finn Stampe Mikkelsen said:
J André Labuschagné said:
Hi All

Just starting to test VS 2005 with C#. Specifications are:

[a] VS 2005 three month trial version.
Windows Vista Ultimate SP1
[c] MS Dot Net Framework 3.51 SP1

I build [cannot find a compile and run anywhere] the classic Hello World
program with one write line. No compile errors. Go to the debug folder
in bin and run it from the command line. Absolutely nothing. What
gives? What am I missing?

Cheers
Andre


To run a project, simply push the green 'play' icon in the toolbar..

As for finding nothing in the folder. Check to see, that you are building
to debug and nor release. There is a dropdown, if that says 'Release' you
will not find it in bin/Debug, but in bin/Release...

And as sugested, you should use VS 2008 C# Express or the RC of VS2010

/Finn
 
Hi Mike

VS2005 is working with 3.51

Cheers
Andre

Family Tree Mike said:
Hi All

Just starting to test VS 2005 with C#. Specifications are:

[a] VS 2005 three month trial version.
Windows Vista Ultimate SP1
[c] MS Dot Net Framework 3.51 SP1

I build [cannot find a compile and run anywhere] the classic Hello World
program with one write line. No compile errors. Go to the debug folder
in bin and run it from the command line. Absolutely nothing. What gives?
What am I missing?

Cheers
Andre


[c] MS Dot Net Framework 3.51 SP1 ? Do you mean 3.5? VS 2005 should be
installing and using .Net 2.0.

Also, you mentioned Vista. Did you apply the Visual Studio patch for
Vista? http://support.microsoft.com/kb/929470.

As the others have said, VS 2010 would be a better way to go, unless
downloading to your location is an issue.
 
Hi Pete

Seems to be working.

Cheers
Andre

Peter Duniho said:
Family said:
[c] MS Dot Net Framework 3.51 SP1 ? Do you mean 3.5? VS 2005 should be
installing and using .Net 2.0.

VS2005 can use .NET 3.5+, as long as the proper SDK is installed. You
won't get C# 3.0 features (and maybe other stuff, like WPF Designer
support…I don't recall the specifics off the top of my head), but
otherwise it's fine.

Pete
 
Hi Arto

Thanks for that. It was on WinForms application. Changed to Console
Application and I now can see the out put.

BTW - we really only need to call this little utility for an encryption
requirement for a government department that has thrown their lot in with
the XML encryption classes nestled deep down in the .NET Framework. We have
managed to get them to give us public and private keys in unmanaged code so
that we can use the MS Crypto library dlls directly without this huge black
box in between us and the argument but need to test with the managed code as
well. The hello world was simply included in the Main() to see if anything
was happening at all and, is so, what. We are new to the VS IDE.

Cheers
Andre

Arto Viitanen said:
22.2.2010 20:51 said:
Hi All

Just starting to test VS 2005 with C#. Specifications are:

[a] VS 2005 three month trial version.
Windows Vista Ultimate SP1
[c] MS Dot Net Framework 3.51 SP1

I build [cannot find a compile and run anywhere] the classic Hello World
program with one write line. No compile errors. Go to the debug folder
in bin and run it from the command line. Absolutely nothing. What gives?
What am I missing?

Cheers
Andre


I tried on a console application

using System;

namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.Write("Hello world");
}
}
}


on Visual C# 2008 Express. When I run it under debugger, the console
window only flashed. But when I run the compiled program on CMD shell
(Vista Business), the text shows as it should (I tested the Write instead
of the common WriteLine to see if the CMD shell puts prompt over the text,
it did not). If you like to see the console window on the debugger, you
have either put the break point after the Console.Write line, or add

Console.ReadLine();
 
J André Labuschagné said:
Hi Alberto

Cannot see a "run" green arrow in the toolbar. The only green arrow I see
has as its tooltip "start page".

But you had the solution. It was a WinForms application. Changing it to
Console did the trick.

Thanks a ton.

Cheers
Andre

Alberto Poblacion said:
J André Labuschagné said:
I build [cannot find a compile and run anywhere]

If you just select "run" (the green arrow in the toolbar), Visual
Studio saves, compiles and runs the program. If you do it from within
Visual Studio, it should open a console window, write Hello World, and
the close the window so fast the you won't be able to see what it wrote.
Go to the debug folder in bin and run it from the
command line. Absolutely nothing. What gives? What am I missing?

Try to run the program within Visual Studio *before* you run it from the
command line, in this way you can debug it and maybe place a breakpoint
in your code and see if it is reached.

By the way, you ARE writing a Console application, aren't you? If you
try a Console.WriteLine from a WinForms application you will not see
anything. Check the Project Properties.

See it on here just below the Tools and Test menu?

http://www.hanselman.com/blog/conte...crosoft Visual Studio (Administrator) (5).png

mick
 
Hi Mick

Yep - I used that but the tooltip to not read run by debug. It works.
Thanks.

Cheers
Andre

mick said:
J André Labuschagné said:
Hi Alberto

Cannot see a "run" green arrow in the toolbar. The only green arrow I
see has as its tooltip "start page".

But you had the solution. It was a WinForms application. Changing it to
Console did the trick.

Thanks a ton.

Cheers
Andre

Alberto Poblacion said:
I build [cannot find a compile and run anywhere]

If you just select "run" (the green arrow in the toolbar), Visual
Studio saves, compiles and runs the program. If you do it from within
Visual Studio, it should open a console window, write Hello World, and
the close the window so fast the you won't be able to see what it wrote.

Go to the debug folder in bin and run it from the
command line. Absolutely nothing. What gives? What am I missing?

Try to run the program within Visual Studio *before* you run it from the
command line, in this way you can debug it and maybe place a breakpoint
in your code and see if it is reached.

By the way, you ARE writing a Console application, aren't you? If you
try a Console.WriteLine from a WinForms application you will not see
anything. Check the Project Properties.

See it on here just below the Tools and Test menu?

http://www.hanselman.com/blog/conte...crosoft Visual Studio (Administrator) (5).png

mick
 
Found it lurking as a debug button.

J André Labuschagné said:
Hi Finn

Still looking for the green button. First time in this IDE. But thanks
for that.

Cheers
Andre


Finn Stampe Mikkelsen said:
J André Labuschagné said:
Hi All

Just starting to test VS 2005 with C#. Specifications are:

[a] VS 2005 three month trial version.
Windows Vista Ultimate SP1
[c] MS Dot Net Framework 3.51 SP1

I build [cannot find a compile and run anywhere] the classic Hello World
program with one write line. No compile errors. Go to the debug folder
in bin and run it from the command line. Absolutely nothing. What
gives? What am I missing?

Cheers
Andre


To run a project, simply push the green 'play' icon in the toolbar..

As for finding nothing in the folder. Check to see, that you are building
to debug and nor release. There is a dropdown, if that says 'Release' you
will not find it in bin/Debug, but in bin/Release...

And as sugested, you should use VS 2008 C# Express or the RC of VS2010

/Finn

 
Family said:
[c] MS Dot Net Framework 3.51 SP1 ? Do you mean 3.5? VS 2005 should
be installing and using .Net 2.0.

VS2005 can use .NET 3.5+, as long as the proper SDK is installed. You
won't get C# 3.0 features (and maybe other stuff, like WPF Designer
support…I don't recall the specifics off the top of my head), but
otherwise it's fine.

Pete

Can you explain how to make VS2005 target the 3.5 framework? I would
guess you would have to reference any 3.5 assemblies manually, but I
would think that many might not work correctly. Am I missing
something?

Chris
 
Chris said:
Can you explain how to make VS2005 target the 3.5 framework? I would
guess you would have to reference any 3.5 assemblies manually, but I
would think that many might not work correctly. Am I missing
something?

As I mentioned, installing the .NET 3.5 SDK allows the .NET 3.5
assemblies to be easily used in VS2005. Of course, you've always been
able to add a reference to any assembly you want, so even without the
SDK, you could do it "the hard way".

If you're asking about the project setting available in VS2008, where
you specifically set the version of .NET your project "target"…

The only difference between .NET 2.0 and .NET 3.5 are the additional
assemblies. Existing versions didn't change. The VS2005 IDE doesn't
have a project setting like 2008 does to specifically "target" a given
..NET version (i.e. exclude later .NET libraries not found in the
targeted version), but .NET assemblies have always had the ability to
configure a specific assembly version requirement. If you have a need
to do that in 2005, you can.

Pete
 
Hi Chris

Just noticed that I have 1 and 2 installed as well. At this juncture I have
no idea which version VS2005 is referencing. How can I tell? I just
asssumed that it was using 3.51. Where do I explicitly instruct the IDE or
the code?

Cheers
Andre

Hi Mike

VS2005 is working with 3.51

Cheers
Andre

How are you making it target the 3.5 framework?

Chris
 
Back
Top