Is it possible to run VB.NET in Linux?
I have written code in VB.NET and compiled it as well using Visual Studio in Windows.
Can the same code be written (and compiled) on Linux as well?
If yes, then which software do I need to install on Linux?
Is the Linux alternative of VB.NET freeware?
You can run Visual Basic, VB.NET, C# code and applications on Linux.
The most popular .NET IDE is Visual Studio (now in version 2019) that runs in Windows and macOS. A good alternative for Linux users is Visual Studio Code (runs on Linux, Windows and Mac).
You can compile and run VB.NET code and applications (part of .NET framework, consider the successor of Visual Basic, with several language differences from Visual Basic 6.0). A subset of .NET is .NET Core that can be installed on
Red Hat Linux,
Ubuntu,
Linux Mint,
Debian,
Fedora,
CentOS,
Oracle Linux
and openSUSE Linux distributions.
Setup details are on https://www.microsoft.com/net/core.
You can also use Mono, a free and open-source project led by Xamarin (a subsidiary of Microsoft) and the .NET Foundation. The project focus is to support an ECMA standard-compliant .NET Framework-compatible set of tools (including a C# compiler and a Common Language Runtime).
Mono can be installed on
Ubuntu,
Debian,
Raspbian (used in Raspberry Pi)
and CentOS Linux distributions.
You can run most Windows applications (created with VB, VB.NET or with other tools) using Wine that supports the Windows API on Linux.
** About Visual Basic (not VB.NET, due to the original question) **
Note that the last version of visual basic is 6.0, released in 1998, declared legacy during 2008 and supported on Windows XP, Windows Vista, Windows Server 2008 including R2, Windows 7, Windows Server 2012, and Windows 8.x. There are also other basic flavors (like QuickBASIC, Gambas or others).
The support end dates for Visual Basic 6.0 are:
The Visual Basic 6.0 IDE [Integrated Development Environment]:
supported ended on April 8, 2008.
Visual Basic 6.0 Runtime the base libraries and execution engine used to run Visual Basic 6.0 applications: support ended on April 8, 2014.
Visual Basic 6.0 Runtime Extended Files: support ended on April 8, 2014.
You could have a look at the Mono VisualBasic.Net support, or maybe go and check out the Gambas project.
You won't find a fully compatible solution.
There are a few, like SimpleBasic, GnomeBasic and XBasic. None of them are fully compatible with Visual Basic.
The above answer was accepted eons ago, but is horribly outdated, since more recently, there's also .NET Core. This will run the actual VB.NET language, but it will not use Windows Forms controls and features powering most real VB.NET applications. .NET Core 3 does support some variation of Windows Forms, but only on Windows.
Please check Pedro Polonia's excellent answer that contains all the details that mine misses.
Mono is a really interesting project. You can run applications on Linux.
Is not fully compatible, but they are working on that.
Take a look in this site Working with Mono
VB on linux is posible using vb2005.
First install wine.
run in the terminal winetricks dotnet20 dotnet40
download the installer and run it
(wine Downloads/yourinstaller.exe)
execute wine WINEPREFIX=~/yourprefix WINEARCH='win32' wine yourprefix/drive_c/Program\ Files/Microsoft\ Visual\ Studio\ 8/Common7/IDE/vbexpress.exe
Gambas Basic is actively developed and works good. Here you can find a small tutorial for programming a calculator:
Gambas Basic 3.14
This is now possible using .NET Core.
Publish .NET apps with the .NET CLI
How to run a .NET Core console application on Linux
The Java countdown is now running :-)
For those looking for an alternative to Visual-Basic and Visual-Studio with cross-platform support, B4J (Basic For Java) is a good choice too. It's free, kind-of\semi "open-sourced" and really user friendly especially for those coming from VS.
Related
Out of private / experimental interest, I've been writing low-level cross-platform UI functionality with .NET Standard 2.0, and implemented creating a window
on Windows (via WinAPI P/Invoke) and
on Linux with an X11 server (via Xlib/libX11 P/Invoke).
So far I can run the X11 code nicely on Linux with MonoDevelop, but I thought it would be useful to develop for an X server running on Windows (like Cygwin/X or Xming X Server).
For that however, I require an Xlib Windows DLL which I can P/Invoke to, as .NET Core only supports Windows DLLs on Windows platforms (AFAIK).
Before I get myself into the trouble of "porting" the Xlib source to compile with MSVC++, I wonder if there is any project available which already creates an Xlib Windows DLL, or if any such compiled DLL is readily available somewhere?
I found a X11.dll as part of some commercial X server from the mid-1990s for Windows NT, except I don't remember which X server product however. I do know, however, that it'll do what you want.
It's 32-bit, but you can use this DLL: https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/segin-utils/X11.dll
I used it to produce a 32-bit Windows build of a window manager I had worked on years ago: https://github.com/segin/matwm2
Build: https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/segin-utils/matwm2.exe
If I can figure out how to upload release artifacts to GitHub, I'll probably archive these files there.
Is there any way to statically link Direct3D so the program doesn't depend on any D3D DLLs? It seems impossible with Direct3D 9 and later (although I would like to be proven wrong), but I can't find any information on older versions. I'm making a small simple game and I really don't want a mandatory installer, but I want to use Direct3D.
No, there was never a time when you could statically link any version of Direct3D into your app. The same is true for OpenGL.
If what you are asking is "How do I create a Direct3D app that doesn't require an installer?", then this is actually quite easy to achieve as long as you give up on trying to support ancient and irrelevant versions of the Windows OS.
The simplest thing to do is target DirectX 11.0. Your system requirements would read:
Windows 8.1, Windows 8.0, Windows 7, Windows Vista Service Pack 2 with KB 971644
See Direct3D 11 Deployment for Game Developers
Use Direct3D 11.0 APIs
Use DirectXMath, DirectX Tool Kit, DirectXTex, and/or DirectXMesh which are all statically linked
If desired, you could use Effects 11 as it is also statically linked.
Avoid all use of D3DX9, D3DX10, and D3DX11
Use XInput 9.1.0; avoid XInput 1.3 (on Windows 8.0+ you could use XInput 1.4)
Avoid use of XAudio2.7 (On Windows 8.0+ you could use XAudio 2.8)
Avoid use of XACT
If you use VS 2010 or later, then you can deploy the required VCREDIST files side-by-side with your application with a simple copy
If you use the Windows 8.x SDK version of D3DCompile, you can deploy it side-by-side with your application with a simple copy.
Audio is the biggest challenge here since XAudio 2.8 is only on Windows 8.0 or later, and XAudio 2.7 requires the DirectSetup redist to deploy. Most audio middleware solutions use WASAPI directly on Windows Vista+, so these are reasonable options. You could use legacy DirectSound8, and the headers for that are at least in the Windows 8.x SDK that comes with VS 2012/VS 2013.
If you need Windows XP support, then require Windows XP Service Pack 3 as the minimum OS. This will include DirectX 9.0c and WIC components as part of the OS.
You'll need to use Direct3D 9 and DirectSound8
Avoid using D3DX9 at all so all HLSL shaders would have to be pre-built offline, and you can't use the Effects (FX9) system or D3DXMath.
If you are using VS 2012/VS 2013, you can target Windows XP using the *_xp Platform Toolset, but remember that that uses the Windows 7.1A SDK and not the Windows 8.x SDK so it has some implications for DirectX development.
Direct3D 9 debugging on Windows 8.0 or later is also a huge pain as there's no developer runtime available for it.
All of this assumes you are using C++. Using .NET is not realistic as the deployment story for .NET is rather complicated. You could in theory use .NET 2.0 if you require Windows Vista+ or later, but it may require enabling a Windows feature on some versions of the OS, and you can't count on any version of .NET to be present on Windows XP. .NET 4.0 is on by default for Windows 8.0+, but support for .NET 3.5 and earlier is off by default. However, all use of DirectX from C# requires additional assemblies which themselves likely have dependencies on the legacy DirectSetup deployment.
I like the Linux operating system and vim editor, but there are many companies that develop under Windows environment in Visual studio etc. There is a possibility that I will have to work for such a company in about a month.
I'd like to do my work on my Linux system and copy the files to them. I have experience with both developments and I found out that I don't want to work with MS products but I like programming and writing MS code is not such a pain.
Are you a similar developer? Could you give me some advice about your methodology to be most of the time on Linux platform, to create code and debug everything in vim on Linux and only when neccessary open Visual Studio with Windows forms and similar things and test the things that weren't possible to test in Linux environment?
I would see the work in creating small peaces of code on Linux, testing them and then move it to MS platform and integrate to the whole system. How do you debug and test your code? The development will be probably in C# or C++. I can't imagine Visual Basic.
Please write here your experience, style of work, if this has sence or there are too many troubles and I should rather give up.
So the question is: How to develop applications that run on Windows with Linux tools, without touching Visual Studio and browsing with Windows file manager etc.
thank you
Not sure, if this will help you or not but there is a Vim Emulation layer for Visual Studio 2010 called VsVim.
Check out : http://visualstudiogallery.msdn.microsoft.com/59ca71b3-a4a3-46ca-8fe1-0e90e3f79329
If I were you I'd install MinGW or Cygwin on your windows machine and just use gvim/vim anyway (or maybe just use the Win32 vim).
VS is just a big editor. You'll be building with the microsoft compilers ( perhaps using msbuild or nmake ) but probably are going to have to accept that you can only debug windows things with VS ( unless you build for MinGW or Cygwin and use gcc and gdb)
You can use vim as a code editor, you can even stick on Linux when developing software for the .NET platform. The people behind the Mono make this happen. Mono is a software platform designed to allow developers to easily create cross platform applications. It is an open source implementation of Microsoft's .Net Framework based on the ECMA standards for C# and the Common Language Runtime.
You can stick to the editor of your liking and use the tools that come with Mono to compile your stuff. There is a IDE called Mono Develop, but compared to Visual Studio it is pretty basic... and compared to VIM it lacks simplicity.
C# projects are plain text files so it's easy enough to edit them over an SMB share in whatever editor you wish from anywhere the sysadmins let you.
Testing however will be difficult without going back to the windows machine, and while Mono implements the framework, it's still a different environment if you're targeting Windows.
Is it possible to normally run Visual C++ Express edition on windows7 64-bit?
Because when I try to install it, the setup window says "visual c++ 2010 express includes the 32-bit visual c++ compiler toolset".
I am a student and intend to use the IDE for learning/practicing C language. I don't plan to create windows-ready applications anytime soon with the windows SDK.
So, will it allow me to write and compile normally without the 64-bit compiler toolset(on my 64-bit system)? I mean will it make any difference if I don't plan on making applications using SDK? If yes, please explain how?
And finally, should I go on and install it or opt for other C/C++ IDE? I previously used Dev C++ but it isn't as great on Windows 7.
Thanks.
Yes, you'll be able to run your programs as every other 32-bit application - via WoW64 (Windows-on-Windows64) technology.
Yes, Windows 7 64bit supports pretty much all 32bit applications just fine (except if they depend on some 32bit-only driver components, but most applications don't do that).
Okay, so I have a legacy Codebase and an old Visual C++ 6.0 Standard Installation CD. I want to install that on my Windows XP SP3 System.
Is there anything I would need to avoid or to download besides SP6?
Are executables created with VC6 compatible on Vista and Windows 7? (I know that there is no 64-Bit compiler, and that's fine)
(I know that vc6 is old, unsupported and somewhat crappy, but my C++ skills are barely good enough to compile, make 2 or 3 small changes and re-compile, but not good enough to make sure it compiles in VS2008)
It's fine. Install SP6 and that should be it. You might need other dependencies; the platform SDK, if you need it, will require hunting for an older version than what's currently available.
AFAIK it should run fine provided you install VC++ runtime. I think you should install VC6 runtime to be sure, not the recent versions.
For latecomers who don't know where to get this "SP6" we're talking about, it's at:
"Visual Studio 6.0 service packs, what, where, why"
"Product Updates for Visual C++ 6.0"
"Service Pack 6 for Visual Basic 6.0, Visual C++ 6.0 with Visual Source Safe 6.0d"