VB.NET without .NET Framework?

wfunction

Well-known member
Joined
Oct 31, 2006
Messages
46
Programming Experience
1-3
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.
 
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.
 
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?
 
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?
 
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...
 
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?
 
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.
 
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.
 
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.
 
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.
 
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
 
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.
 
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.
 
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.
 
Back
Top