is there any way to detect windows environment based function in our project? - asp.net-core

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

Related

.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

Is .NET Core compatible with COM?

I am trying to understand the implications of starting a project on .NET core. One of the requirement I am facing is to use a .NET library that is leveraging COM.
So is COM supported by .NET core (obviously, assuming the OS is Windows)?
I understand that .NET Core is built for interoperability between different OS. But I was wondering if it is to be expected that there are Windows-specific features that may be included for the windows releases such as COM compatibility.
Thanks for your help.
.NET Core is developed to be cross platform and running also on Linux and Mac. COM is a windows specific thing and will not be supported in .NET Core

build coreclr app on windows for different platform

Can I define coreclr (asp.net core) target runtime for portable app that differ from development platform? Say build app under windows for Ubuntu? Thought that projects are platform independent so that only .net runtime is specific one.
This is explained in the Types of portability in .NET Core article in the .Net Core documentation.
In short, by default, .Net Core applications are portable, which means that you can for example run dotnet publish on Windows and then run that application using dotnet yourapp.dll on any supported platform, including Ubuntu.

VS2008 non.NET Application

How can I create a VB application in VS2008 without requiring the application be run on a computer with a .NET framework in place?
You can't create a non-managed VB application in VS 2008.
You would have to use C/C++ or go back to VS 6.
You can look at the question below for more information on .NET linkers. That is technically an option, but if I were starting a new application that I didn't want to depend on the .NET framework I would not use a managed language.
Running .net based application without .net framework
You'll need to use a 3rd party .NET linker, Visual Studio itself doesn't support what you're after but a number of tools allow it to be done.
A couple of tools:
Remotesoft Salamander .NET Linker
Xenocode app virtualization
Another, non-VS, option is to use Mono to build a "Bundle" which combines both the runtime and your application into a single executable:
Mono:Runtime - Bundles
You can't. You would need to go back to Visual Studio 6 and create a VB6 app.
You can't. VB is .net based, there isn't a non .net VB anymore.
The best you can do is include the .net redistributable with your application's installation.

How to make vb.net apps portable?

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