1. Home
  2. Docs
  3. Getting Started
  4. Installation
  5. Additional Steps for .Net Core / .NET 5

Additional Steps for .Net Core / .NET 5

With .Net core nuget package, there are some additional steps to get dotnet Report running locally in your project. The same steps apply to .NET 5 Framework as well.

It’s always a good idea to checkin your code before adding the dotnetreport nuget package.

  1. Need to get files locally in your project. THIS TAKES 3 STEPS

First, add GeneratePathProperty=”true” dotNetReport.core package reference:

Second, add the following to your project to copy front end files included in your project directly rather than as a reference.


Third, build the project, don’t worry about errors, but you should notice that the references are gone and these files are now part of the project.
Finally, remove the entire CopyDotNetReportContent block, otherwise the project will keep overwriting your file changes. We don’t need it anymore.

  1. Client side packages need to be added to your package.json file.

The list of libraries dotnet Report uses from npm is included package.dotnetreport.json. Please manually merge the contents in to your project’s actual package.json. If you don’t have one, just rename this file to package.json.

Then run gulpfile.dotnetreport.js (merge it in with your gulpfile, if you don’t have one, just rename this file to gulpfile.js).

  1. Add Static Config to your Startup.cs

Your Starup.cs should look like this:

public Startup(IConfiguration configuration)
Configuration = configuration;
StaticConfig = configuration; //<— Add this line manually

    public IConfiguration Configuration { get; }
    public static IConfiguration StaticConfig { get; private set; }  //<--- Add this line manually

If your project is not using controller with Views, you would also need to add Controller with Views and set NewtonSoft Json setting in your Startup.cs

            .AddNewtonsoftJson(options => options.UseMemberCasing()); // <-- This is important otherwise javascript calls won't work

Also, add dotnet report keys to your appsettings.json file:

"dotNetReport": {

    "apiurl": "https://dotnetreport.com/api",
    "accountApiToken": "Your Account API Key",
    "dataconnectApiToken": "Your Data Connect Key",
    "privateApiToken": "Your Private API Key"


  "ConnectionStrings": {
    "ConnectionKey": "Data Source=;Initial Catalog=;User ID=;Password=;"

You should be able to build and run the project after the above changes.

Was this article helpful to you? Yes No

How can we help?