What is deps.json, and how do I make it use relative paths?

The answer to your first question, per the Runtime Configuration File Documentation:

And the answer to your second question, is to remove preserveCompilationContext in your project.json file (and rebuild).

MyApp.deps.json is a list of dependencies, as well as compilation context data and compilation dependencies. Not technically required, but required to use the servicing or package cache/shared package install features.

Per your comment to Dimitry, I couldn’t tell if you have .net core installed in your target machine and therefore infer the kind of deployment you are trying to do. But assuming it is installed, you should be able to tune your myproject.runtime.json to fix your problems. In case you don’t, I highly recommend reading about the two different types of .NET Core Application Deployment:

You can create two types of deployments for .NET Core applications:

Framework-dependent deployment. As the name implies,
framework-dependent deployment (FDD) relies on a shared system-wide
version of .NET Core to be present on the target system. Because .NET
Core is already present, your app is also portable between
installations of .NET Core. Your app contains only its own code and
any third-party dependencies that are outside of the .NET Core
libraries. FDDs contain .dll files that can be launched by using the
dotnet utility from the command line. For example, dotnet app.dll runs
an application named app.

Self-contained deployment. Unlike FDD, a self-contained deployment
(SCD) does not rely on any shared components to be present on the
target system. All components, including both .NET Core libraries and
the .NET Core runtime, are included with the application and are
isolated from other .NET Core applications. SCDs include an executable
(such as app.exe on Windows platforms for an application named app),
which is a renamed version of the platform-specific .NET Core host,
and a .dll file (such as app.dll), which is the actual application.

Leave a Comment