Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid runtimeconfig.json error when trying to run netcore app on linux

Tags:

.net-core

I have developed .net core console application. It connects with Azure table storage and downloads from azure to a local database. Application is working w/o any issues on a Windows 10 PC. However when I publish it to a PC running Lubuntu and try to run I receive "Invalid runtimeconfig.json error".

Content of runtimeconfig.json is:

{
  "runtimeOptions": {
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "1.1.2"
    }
  }
}

and output of dotnet --info is:

NET Command Line Tools (1.0.4)
Product Information:
Version: 1.0.4
Commit SHA-1 hash: af1e6684fd
Runtime Environment:
OS Name: ubuntu
OS Version: 17.04
OS Platform: Linux
RID: ubuntu.16.10-x64
Base Path: /usr/share/dotnet/sdk/1.0.4

SDK for Linux is the latest version. Anybody have any ideas what might be wrong and how to fix it?

like image 991
tkalay Avatar asked Jun 27 '17 14:06

tkalay


1 Answers

After some trial and error I have resolved the issue. Problem is not really a invalid configuration file. When dotnet runs the dll file it creates a xxxx.runtimeconfig.dev.json, xxxx being the name of dll. However in my case due to missing folder and file access rights in Lubuntu, dotnet was not able to create the runtimeconfig.dev.json file.

I have modified access rights to folder holding my application by executing following terminal command (run this from parent directory of folderholdingmyapp)

chmod -R 1744 folderholdingmyapp

like image 77
tkalay Avatar answered Nov 01 '22 19:11

tkalay