So I've made a self-contained release of a project with Visual Studio Code. The EXE is working on ubuntu and windows, but can't get it to work on os-x.
I'm using a simple data.json
to store some data. The error that occurs on the os-x release, is that it can't find the correct path to data.json
. I get this message:
Could not find file '/Users/User/data.json'.
That is not where I store the release or data.json. I store it in the root-directory of the project. Seems like the application is looking for the json-file in my system root directories. How do I fix this?
My XML csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.1</TargetFramework>
<RuntimeIdentifiers>win10-x64;osx.10.11-x64;ubuntu.16.10-x64</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.json" Version="10.0.3" />
</ItemGroup>
</Project>