Results 1 to 19 of 19

Thread: VB.NET without .NET Framework?

  1. #1
    wfunction is offline VB.NET Forum Enthusiast
    .NET Framework
    .NET 1.1 (VS 2003)
    Join Date
    Oct 2006
    Posts
    46
    Reputation
    113

    VB.NET without .NET Framework?

    Does anyone know how to use a VB.NET application without having to install the framework? I need to do this on a computer which I am not the owner and do not want to install the framework. Thanks.

  2. #2
    Raven65's Avatar
    Raven65 is offline VB.NET Forum Master
    .NET Framework
    .NET 3.5 (VS 2008)
    Join Date
    Oct 2006
    Posts
    305
    Reputation
    133
    Much like VB6 needed the VB6 runtimes installed for its features to work, your going to need the .NET framework, (1, 1.1, and/or 2.0) for a .Net application to work.

    Something has to be there to tell the machine how to interpret the code.

  3. #3
    wfunction is offline VB.NET Forum Enthusiast
    .NET Framework
    .NET 1.1 (VS 2003)
    Join Date
    Oct 2006
    Posts
    46
    Reputation
    113

    Yeah, I know, but...

    Thanks. I already knew that; however, what I mean is that is there any way to include the dlls and other stuff in the EXE? Or create a native EXE that will run?

  4. #4
    Raven65's Avatar
    Raven65 is offline VB.NET Forum Master
    .NET Framework
    .NET 3.5 (VS 2008)
    Join Date
    Oct 2006
    Posts
    305
    Reputation
    133
    I'm wouldn't think this is possible. You'd basically have to Import the Framework, which would result in enormous exe's.

    Someone might know some hack way to do this, but I imagine installing the Framework, or going back to VB6, is going to be your option.

    Is there a problem you are trying to avoid by not installing the Framework?

  5. #5
    JuggaloBrotha's Avatar
    JuggaloBrotha is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Jun 2004
    Location
    Lansing, MI; USA
    Posts
    4,364
    Reputation
    979
    when someone makes a .Net program, they make an app that depends on the FrameWork by installing the framework on the computer it ensure that certain things work right, for example:
    int he framework you can use "ControlChars.NewLine" for a carrage return, this is included because a Windows carrage return is different than a MacOS carrage return, also Linux has it's own carrage return that's different than Windows and Mac

    that one's just a simple example, so in short make your .Net app and install the framework on all the target machines, if the target machine's aren't allowed to have the Framework installed then use VB6, Perl, Cobol, etc... (something else)

    also if you include the dll's from the Framework in your app to avoid installing the Framework, you're guaranteeing that you're app will run only on a machine that has that exact OS (IE the framework installs different files for Win98, 2000 and XP, so if you develop your app on WinXP and avoid installing the Framework on the target machines, then all the target machines will have to have WinXP as well) things also get a little more complicated if XP SP2 is installed or not too...
    Currently using: VS 2010 Ultimate on Win7 Ultimate x64.


  6. #6
    jmcilhinney's Avatar
    jmcilhinney is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    13,140
    Reputation
    1652
    What legitimate reason would the system owner have for not wanting to install the .NET Framework anyway? There isn't one. It's just software and they have lot's of software installed already. If they didn't know about the Framework and you just said that it was part of your application then they'd have installed it without knowing. Vista is going to have the Framework installed as prt of the OS so there's no choice there. People who don't want to install the Framework are either ignorant of what it is and does or are working for someone who is ignorant. If an ignorant person refuses to listen to you when you explain the logic of why they should install the Framework then they simply cannot use .NET applications. I guess they'll be using XP forever because future OSes will have that nasty Framework installed.

    You can get tools that will compile your .NET app to machine code and include only the Framework libraries required to run your app. Got a spare US$1899?

  7. #7
    wfunction is offline VB.NET Forum Enthusiast
    .NET Framework
    .NET 1.1 (VS 2003)
    Join Date
    Oct 2006
    Posts
    46
    Reputation
    113

    Well...

    I don't know the reason, but I'm in a place where the administrator manages hundreds of computers and there's no framework.

  8. #8
    jmcilhinney's Avatar
    jmcilhinney is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    13,140
    Reputation
    1652
    Quote Originally Posted by wfunction View Post
    I don't know the reason, but I'm in a place where the administrator manages hundreds of computers and there's no framework.
    Then you cannot use .NET applications.

  9. #9
    jamiebaker is offline VB.NET Forum Newbie
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Oct 2006
    Location
    London, UK
    Posts
    2
    Reputation
    0
    Quote Originally Posted by JuggaloBrotha View Post
    also if you include the dll's from the Framework in your app to avoid installing the Framework, you're guaranteeing that you're app will run only on a machine that has that exact OS (IE the framework installs different files for Win98, 2000 and XP, so if you develop your app on WinXP and avoid installing the Framework on the target machines, then all the target machines will have to have WinXP as well) things also get a little more complicated if XP SP2 is installed or not too...
    Yep, this is what we used to do to get .Net apps running under WINPE - everytime the machine was booted we would add every vb.net related reg key and DLL in at runtime; it works, and could be done programatically but would be an awful mess.

  10. #10
    cjard's Avatar
    cjard is offline VB.NET Forum All-Mighty
    .NET Framework
    .NET 4.0
    Join Date
    Apr 2006
    Posts
    7,036
    Reputation
    1724
    Quote Originally Posted by wfunction View Post
    Does anyone know how to use a VB.NET application without having to install the framework? I need to do this on a computer which I am not the owner and do not want to install the framework. Thanks.
    That's like asking how to drive to the shops if you dont own a car, or run a Windows program without having windows installed. It cannot be done.

  11. #11
    cjard's Avatar
    cjard is offline VB.NET Forum All-Mighty
    .NET Framework
    .NET 4.0
    Join Date
    Apr 2006
    Posts
    7,036
    Reputation
    1724
    Quote Originally Posted by wfunction View Post
    I don't know the reason, but I'm in a place where the administrator manages hundreds of computers and there's no framework.
    Then he can download the MSI and use group policy to push it out to all PCs automatically overnight. There is no need to visit each computer manually

  12. #12
    vis781's Avatar
    vis781 is offline VB.NET Forum All-Mighty
    .NET Framework
    .NET 4.0
    Join Date
    Aug 2005
    Location
    Cambridge, UK
    Posts
    2,015
    Reputation
    269
    Quote Originally Posted by cjard View Post
    That's like asking how to drive to the shops if you dont own a car, or run a Windows program without having windows installed. It cannot be done.
    It can be done and there are programs available to allow you to do such a thing. One of them is called Xenocode Postbuild. It'll cost you a couple of hundred pounds though.
    GDI+ Code Generation Utility : GDI+ Architect

    A Must : FxCop .Net Code analyzer : FxCop

  13. #13
    jmcilhinney's Avatar
    jmcilhinney is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    13,140
    Reputation
    1652
    Quote Originally Posted by ImDaFrEaK View Post
    NOW!!! With that in mind. If you are set on doing it this way it's fairly simple. Go to the projects property page. Goto References and choose the option beside every reference to include it with your project. It will copy the .dll's and send them with your project rather than using them from the hosts framework. You will see possibly that this is a lot of resources. Again this depends on what you are doing. Every .dll you are using will be included with your application and then you can get away with not having the .net framework on the other computers. It's not too hard.
    I'm afraid that that's completely untrue. The .NET Framework is much more than just a class library. When you build an executable or a library in Visual Studio you are not compiling to machine code. You are compiling to Microsoft Intermediate Language (MSIL), which is something like assembly langauge. It contains individual instructions at a much lower level than VB or C# but that are still human-readable, unlike machine code which is just binary and all but impossible to read by eye.

    When you run a .NET application the .NET Framework invokes its Just-in-Time (JIT) compiler to compile the MSIL code to machine code, which can then actually be run on the local processor. The name refers to the fact that each section of MSIL is only compiled as and when it's needed. If you don't have the .NET Framework installed then you cannot compile the MSIL so you cannot run your app, period. It's THAT that makes a .NET app a .NET app.

    There are various tools around that will precompile a .NET app, including any dependencies from the Framework, to machine code, thus making it like any other native application. Those tools cost money though. One has already been mentioned in this thread.

  14. #14
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    14,643
    Reputation
    2742
    Quote Originally Posted by ImDaFrEaK View Post
    Just revert to old VB or C++ and make all the correct API calls accordingly to the OS your on.
    ..........
    There is nothing wrong with C++ or old VB if that's what you want. .NET is .NET for a reason and that is b/c all languages C++.NET, C#.NET, VB.NET, ect ect depend on the already installed libraries.
    FYI, you can't even make a 'hello world' app in C++ without referencing system libraries, and classic VB is also well know for its runtimes, dependencies is not an issue regarding .NET compared to other platforms. So the difference apart from the bigger 'native' library for .Net devs to choose from is as jmcilhinney said simply 'how it works' with IL and JIT and the whole management thing.

  15. #15
    ImDaFrEaK is offline VB.NET Forum Miyagee
    .NET Framework
    .NET 3.5 (VS 2008)
    Join Date
    Jan 2006
    Location
    California
    Posts
    416
    Reputation
    119
    Thanks for the corrections. I completely understand what you guys are saying. I was thinking backwards obviously.
    Triple G^3 - Get Stuck on It!

    The Angels will sing for me tonight.
    The Holy Spirit will comfort me.
    And as hard as the wind blows;
    I'll be ahead of it!

  16. #16
    cjard's Avatar
    cjard is offline VB.NET Forum All-Mighty
    .NET Framework
    .NET 4.0
    Join Date
    Apr 2006
    Posts
    7,036
    Reputation
    1724
    Quote Originally Posted by vis781 View Post
    It can be done and there are programs available to allow you to do such a thing. One of them is called Xenocode Postbuild. It'll cost you a couple of hundred pounds though.
    True! I was answering on a puritannical level:

    There is no way to run a .NET application on a machine that does not have the .NET framework installed

    Compiling a .NET application (MSIL) into native code means it is not a .NET application any more.

    However, vis is correct in that you will have a program that was originally written in vb.net that does not require the .NET framework to run. Its a case of interpreting the OP's question - and it seems the differing interpretation has led to a very good, complete answer in this case

  17. #17
    wfunction is offline VB.NET Forum Enthusiast
    .NET Framework
    .NET 1.1 (VS 2003)
    Join Date
    Oct 2006
    Posts
    46
    Reputation
    113

    Oh

    Oh, OK. Vis, do you know of any free programs? Or fully functional trials for a period?

  18. #18
    vis781's Avatar
    vis781 is offline VB.NET Forum All-Mighty
    .NET Framework
    .NET 4.0
    Join Date
    Aug 2005
    Location
    Cambridge, UK
    Posts
    2,015
    Reputation
    269
    Free? No, assembly linking is tricky stuff and if there eas a free one i wouldn't like to think what kind of a mess it would make.

    http://www.xenocode.com/Products/Postbuild/Trial.aspx
    GDI+ Code Generation Utility : GDI+ Architect

    A Must : FxCop .Net Code analyzer : FxCop

  19. #19
    wfunction is offline VB.NET Forum Enthusiast
    .NET Framework
    .NET 1.1 (VS 2003)
    Join Date
    Oct 2006
    Posts
    46
    Reputation
    113
    OK, thanx.

Bookmarks

Posting Permissions

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