CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2003
    Location
    Poland
    Posts
    80

    Question Simple Hello world doen't work on other comps

    hi,

    i am a total beginner, i've created a simple hello world app as a C# windows app project and works only on computers with .NET environment installed on. if somebody has win xp and nothing more yet, it shouts: "app is not correctly initiated (0xc0000135). etc..."

    PS. I've copied only the .exe file to the other comp., maybe it's not enough?

    greets from Poland!
    Last edited by haiaw; May 4th, 2005 at 01:20 PM.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Simple Hello world doen't work on other comps

    Quote Originally Posted by haiaw
    hi,

    i am a total beginner, i've created a simple hello world app as a C# windows app project and works only on computers with .NET environment installed on. if somebody has win xp and nothing more yet, it shouts: "app is not correctly initiated (0xc0000135). etc..."

    PS. I've copied only the .exe file to the other comp., maybe it's not enough?

    greets from Poland!
    Any .net applications require the .net Framework to be installed on the target machines. This is similar to vb requiring the VB runtime dll or MFC requiring its MFCxxx.dlls. Generally a program's setup program will install the necessary dependencies.

    Arjay

  3. #3
    Join Date
    Sep 2003
    Location
    Poland
    Posts
    80

    Re: Simple Hello world doen't work on other comps

    program's setup program
    - are there any free ? and which files should i attach to such program's setup program?

    is there any way that a beginner like me could make my simple hello world work on other comps?

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Simple Hello world doen't work on other comps

    Quote Originally Posted by haiaw
    - are there any free ? and which files should i attach to such program's setup program?

    is there any way that a beginner like me could make my simple hello world work on other comps?
    Read 'Deplying & Distributing' in msdn. This should get you going as for what to include in your setup program (I believe the redistributable files can be distributed for free). As far as not requiring any dependencies, you can create a simple app in MFC (statically compliled) or with ATL that should run sans dependencies. However, any program created with .net will require the .net runtimes to be on the target machine.

    Arjay

  5. #5
    Join Date
    Sep 2003
    Location
    Poland
    Posts
    80

    Re: Simple Hello world doen't work on other comps

    ok thanks

  6. #6
    Join Date
    Dec 2003
    Location
    UK
    Posts
    113

    Re: Simple Hello world doen't work on other comps

    I might be mistaken, but I thought WinXP came pre-packaged with the .NET framework. And even with something like Win200 (that doesn't come with .NET) you can download the framework from Microsoft for free. Just do a search on Google for ".NET framework download".

    But yes, if you don't have the framework it will not work. The exe needs to run in the CLR, much like java's virtual machine. But the nice thing about C# is that you don't have to worry about DLL's. Just copy your exe onto the machine you want to deploy it to and if your code worked before it should again.

    Cheers

  7. #7
    Join Date
    May 2005
    Posts
    54

    Re: Simple Hello world doen't work on other comps

    I believe XP SP2 has .NET included, as well as Win2k's most recent SP. Also, it is autoinstalled as a patch if the computer is set up to do so.

    That's not what he was talking about though, it's best to distrubute the framework with your app in case the end user doesn't happen to have .net installed yet.

  8. #8
    Join Date
    Dec 2003
    Location
    UK
    Posts
    113

    Re: Simple Hello world doen't work on other comps

    it's best to distrubute the framework with your app in case the end user doesn't happen to have .net installed yet.
    True, but I think he is more on my level:
    i am a total beginner,
    and therefore your suggestion might be a little advanced for the "hello world" solution.

  9. #9
    Join Date
    May 2005
    Posts
    54

    Re: Simple Hello world doen't work on other comps

    Well if he's asking about it working on other computers, then it is a distribution question. Even if he is a beginner, he asked a question about distribution.... just because he is a beginner doesn't need we need to dumb it down, since he'll have to learn the right way to do it eventually anyways.

    I don't mean to put words in the original poster's mouth (or on his hands for that matter), but I seriously doubt he was worried about a "Hello world!" app working on other computers, rather, he was worried about .NET apps in general working on other computers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured