Is there a way to have a common logic to retrieve the file size on disk regardless of the underlying operating system ? The following code works for windows but obviously doesn’t for Linux. Alternatively, I’m looking for a similar implementation that would work on Linux. Can anyone point me in the right direction ? Thanks for your help !
Tag: .net
How do I download a package from the command line with .NET Core from nuget?
Microsoft packages .NET Core on Linux for Ubuntu. I’m currently using that. I now want to install Json.NET which instructs me to use the Package Manager console and run, I’m wondering how I do that Linux. I see that there is a Nuget CLI, but it doesn’t seem like that’s available on .NET Core. Moreover the docs say On Mac
Understanding .Net Core and Mono
When developing an application in .Net Core, the .NET dependencies and DLLs are embedded in the application? does this mean that I do NOT need to install the .Net dependencies on the client PC? If I develop a .Net Core console application for Linux, is it necessary to install Mono on the PC with Linux (client)? Are .Net core applications
.Net Core ignoring Environment Variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE
It seems apparent that you can save some time doing .NET Core builds by setting Environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true. I am finding this is not the case on CentOS 7 and Debian Jessie Linux distros. I have a Jenkins slave Docker image, used by Jenkins to build .NET Core services, my image tag is jenkins.slave.dotnet.image. The Jenkins Docker Plugin, uses jenkins.slave.dotnet.image
How do I call native Linux and OS X API from .NET Core application?
I need to call file management functions that are not present in .NET Core. How do I call native Linux and Mac OS X API from my C# code? Edit: The only answer to this question doesn’t include any definitive information. Can someone post some code samples or more concrete details about how to invoke Mac OS X APIs from
`Unhandled Exception: System.ArgumentNullException: Value cannot be null.` error while running `dotnet run` using a startup script
I’m trying to run a dotnet app using dotnet run –configuration Release at system server Startup/Reboot. I’m using a init.d script to acheive the same. My startup script, located at /etc/init.d/myscript contains the following: Contents of botScript.sh: When my server Starts or Reboots the startup script gets executed but dotnet run doesn’t work. I get the following error(s): But all
COM-based software control between two computers, and from Linux to Windows
I am not really a specialist in this topic, so please excuse possible hiccups in formulating the question. We are running two programs under Windows, Zemax and Matlab, where Matlab controls Zemax via .NET COM interface. (The fact that it’s Zemax is not critical for this question, it’s just to be specific.) The Matlab code looks like this: If Matlab
Analyse .NET code with SonarQube on Linux platform
I need to perform static code analysis of .NET project using SonarQube. I have 2 machines: Linux with Sonar Server Windows with .net code and its tools (Fxcop, …) I need to perform analysis on Windows and push the results to Sonar Server on Linux machine. Can someone help me with this? Answer First you need to have the appropriate
How to run DNX ‘console app’ as a background service on Linux?
I’ve implemented a DNX (dnx451) ‘console app’ which is intended to run as a background service. On Windows I would just turn it into a Windows Service. What is the proper way to do this on Linux (for instance, Ubuntu)? EDIT: Found more info here: How to migrate a .NET Windows Service application to Linux using mono? Answer On Unix/Linux
Use of MONO_IOMAP to cope with a hard-coded file path?
I’m trying to get a Windows .NET binary to run under Linux using Mono. The app runs fine on Windows. It presently fails under Mono because it can’t find a file with a hard-coded path. For testing, I’m using a Fedora 23 VirtualBox VM running under Windows 7. All the files are present on the VM’s FS (no shares with