How to make vb.net apps portable? - vb.net

Is it possible to make an vb.net application portable?

It is portable - build your .exe and copy it on your flash drive. Assuming it will be run where there is .net framework, there is no problem!
EDIT: A similar topic here: Writing USB Drive Portable Applications in C#

"portable" has more than one meaning, but if you mean a program that could also run on linux or mac than you need to think mono. Specifically, look at their migration analyzer.

Depends on what you mean by "portable". Certainly, you can build them without external dependencies on things like config files, registry settings, etc. You'll still need the .NET runtime installed on the target computer, though.

I seem to recall that you can use vb.net to write Silverlight apps; once compiled, this should be fairly portable (onto all Silverlight / Moonlight enabled browsers).
Of course, if you talk about web apps, the client (html) should already be portable, regardless of the server.

Whether it's a desktop application or a web application, the .Net framework needs to be installed on the machine that the app is run on. Generally, the .Net framework is installed with Windows.
It has to be the same version of the .Net framework as the app was developed in (1.0, 1.1, 2.0, 3.0, 3.5). Which version of the framework is installed depends on the version of Windows.

Just a thought!
Maybe you can make your app executable the normal way (with setup) and then make it into a portable application online using service described at
http://www.abtevrythng.com/2011/12/make-portable-applications-online-for.html#ixzz1flSBi6dZ

You can try to use the online portable app "converter" Cameyo to do it. Just install the Cameyo app, launch it, then install the application you made.

You must use VS 2015. Make all your reference dll's to be local copied. Build your solution (with no deploy file extension (publish-> options->deployment))and merge the exe file with your dll with ilmerge ( http://www.microsoft.com/en-us/download/details.aspx?id=17630 ) (download ILmerge-GUI too) from the Microsoft web site. And have good luck

Related

is there any way to detect windows environment based function in our project?

In my project i have to create platform independent code. My project(Based on .net framework 4.6.1 which i have convert it into .net core 3.1) was developed long ago and its based on windows environment now we convert it into Linux and Mc environment also. so is there any way to detect all windows specific classes so we can change it for Mc and Linux also or we just read the entire code and find each function and convert it. because its very time taken process to read entire code and change according to requirement so is there any other way to do it?
Check this article Overview of porting from .NET Framework to .NET Core first .
so is there any way to detect all windows specific classes so we can change it for Mc and Linux also or we just read the entire code and find each function and convert it.
.NET Portability Analyzer is a tool that analyzes assemblies and provides a detailed report on .NET APIs that are missing for the applications or libraries to be portable on your specified targeted .
try-convert is the tool that will help in migrating .NET Framework projects to .NET Core.
Run on Linux and Mac platforms
.NET Core is cross-platform and it runs on macOS, Linux, and Windows. .NET Core supports the previously mentioned operating systems as your development workstation. With .NET Core you can target any application type that’s running on any platform. Visual Studio provides an Integrated Development Environment (IDE) for Windows and macOS. You can also use Visual Studio Code, which runs on macOS, Linux, and Windows.
.NET Core vs. .NET Framework for server apps

.NET Core Runtime without installing

Can anyone help as to how to use the run time binaries found in the link below?
https://www.microsoft.com/net/download/windows
Basically, we are moving to .NET Core (we have been using .NET framework 4.0 for many years - so big shift as you can guess). I am kind of nervous to install .NET core on the production server (Windows Server 2012). Is it safe to install .NET Core on a server running .NET framework 4.0? If no, is there any way I can get the .NET Core runtime on to the server without installing them (kind of copying portal libraries) so that I can start with the beta testing of the app. Any help would be much appreciated. Thanks!
EDIT:
It is not duplicate, One of the main questions I had if I can use portable binaries on the server to run my app, without actually installing them (got the answer below, thanks again). Not sure someone down voted this without any reason. It makes the developers nervous to ask a question in StackOverflow. if they can mention the reason that would be great!
There are no issues when installing .NET Core and .NET Framework on the same machine. They are designed to allow them to be installed side-by-side.
However you do need to install the .NET Core runtime onto the server to allow the code to be run because the OS has native dependencies that need to be present. See this link for more information.
With .NET Core you can do framework dependent deployments (FDD) and self-contained deployments (SCD). FDD requires any shared assemblies to be present on the server i.e. System.* assemblies etc. but an SCD only requires the basic runtime/native dependencies. For an SCD your app deployment would include any .NET Core shared assemblies in it's deployment package.
You can read more about FDD and SCD here
Also there is more information about the native dependencies on different OS platforms here

Creating a .NET application without the entire framework?

I am in the process of creating a lightweight application in vb.NET, and was wondering if it is possible to create an application that uses some of the dll's within the .NET 2.0 framework, without actually using the framework itself.
For instance, can I take the dlls from the .NET directory that the app will reference (and only those dlls that it references), put them into a folder inside the app's directory, and then just change the reference path to that new location? That way, when the app is installed on pc's without .net framework installed, the dlls can just be zipped and copied over to the newly installed app directory.
This may all sound a bit confusing, just let me know if you need any more info.
It is quite unlikely that you'll be able to do that.
There is this thing called .net framework client profile for creating lightweight .net apps that do not need the whole framework but you still need to have that installed.
I would recommend using something like Delphi if you need a standalone exe that does not depend on anything.
There is concept of Client Profile in .NET 3.5 and .NET 4.
That is subset of .NET, smallest necessary fraction of .NET that client must have in order to be able to run .NET applications targeting client profile.
There is more detailed overview of the features you may use when targeting client profile.
Unless you move to .Net 4 or above, you need full framework on the client computers. Having said that, which OS are you targeting? Newer MS OS often come with .Net framework installed already.

What is the minimum software I need to install in a windows machine in order to run a mono + gtk# application?

I have developed an application with mono and I would like to know what are the minimum libraries that need to be available in a windows machine, in order to run this app.
I've heard .net will suffice, no need to install the mono package for windows. Is this true? which .net version do I have to install?
BTW, my application uses GTK# as well.
Thanks in advance.
MonoDevelop is built on GTK#, its minimal requirements on Windows are,
.NET Framework 4
GTK# runtime
as stated in http://monodevelop.com/Download
Therefore, your application should require the same.
You need the installer present in the mono project download pages for Gtk#. Take a look at this question.
Technically, you would need also mono, but since this is for Windows, it will include the .NET installed. Unless it is a really old version of Windows.
Hope this helps.

How to develop IronPython applications on Mono?

I might need to write some GUI application that runs on .Net (and Windows), while what I can work with is Mono (on Ubuntu and/or Gentoo). I am very familiar with Python; in addition, I understand that the Mono Windows.Forms assemblies seem to be satisfactorily usable (I've run successfully .Net applications using Windows.Forms).
What are the steps I would have to take to have an environment where I can develop stand-alone IronPython on a GNU/Linux maching? Also, I would very much appreciate some .Net-Mono compatibility pointers (e.g. things I should know or avoid).
I'm not looking for an IDE; I'm quite at ease using vim for my editing purposes, and I don't mind building GUIs programmatically.
Note: what I'm actually asking, is help with the following:
I obviously have to install IronPython; so I make sure my Mono packages are installed, then I run the IronPython installer (using Mono, obviously) just like I would on Windows? Will this make the IronPython assemblies available to Mono? If not, how can I do that? Ubuntu 9.10 has a package for IronPython, but it's not the latest version; at the same time, for compatibility purposes, I can't upgrade the Ubuntu installation. I can't find an ebuild for Gentoo.
Do I have to install any more assemblies?
After I successfully install IronPython, how do I create a .Net/Mono executable from my IronPython sources? Is there a “proper” way?
Is there a way to “embed” the IronPython (and any other required) assemblies in the final .exe?
Check Windows Forms section on IronPython Cookbook for hints about creating Windows Forms applications.
As to the environment, I would write the app in Mono and check it works on Windows. I would set up two virtual machines and any source control system to transfer sources between them.
The key part is to write and run tests so you can verify it works on both platforms. So you cannot use just GNU/Linux machine to be sure. But I think you can install Windows 7 for 30-days trial period.
I used to write WinForms tests so here is link to my blog and several other articles:
GUIAT blog
Acceptance Testing .NET Applications using IronPython
Functional Testing of GUI Applications
IronPython says it requires Reflection.Emit and lightweight code generation. FAQ iOS tends to frown on that kind of thing. So if you want to do iOS, you may be out of luck.