I'm trying to run a 'Stateless ASP.NET Core' API project with Angular 6 inside Service Fabric.

**What I do**

* Create ASP.NET Core API project.
* Create an Angular project within the ASP.NET Core project by running 'ng new ClientApp.
* Run ng build inside the Angular project to genereate the files.
* Edit Startup.cs (see code below)

**Startup.cs**

```
public class Startup
{
    public Startup(IConfiguration configuration)
    {
        Configuration = configuration;
    }

    public IConfiguration Configuration { get; }

    // This method gets called by the runtime. Use this method to add services to the container.
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddMvc();

        // In production, the Angular files will be served from this directory
        services.AddSpaStaticFiles(configuration =>
        {
            configuration.RootPath = "ClientApp/dist";
        });
    }

    // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
    public void Configure(IApplicationBuilder app, IHostingEnvironment env)
    {
        if (env.IsDevelopment())
        {
            app.UseDeveloperExceptionPage();
        }
        else
        {
            app.UseExceptionHandler("/Error");
            app.UseHsts();
        }

        app.UseHttpsRedirection();
        app.UseStaticFiles();
        app.UseSpaStaticFiles();

        app.UseMvc(routes =>
        {
            routes.MapRoute(
                name: "default",
                template: "{controller}/{action=Index}/{id?}");
        });

        app.UseSpa(spa =>
        {
            // To learn more about options for serving an Angular SPA from ASP.NET Core,
            // see https://go.microsoft.com/fwlink/?linkid=864501

            spa.Options.SourcePath = "ClientApp";

            if (env.IsDevelopment())
            {
                spa.UseAngularCliServer(npmScript: "start");
            }
        });
    }
}

```

**Results**

!! If I create a normal (non-Service Fabric) ASP.NET Core API this approach works. !!

If I create the same inside Service Fabric I get the following Errors:

[![enter image description here](https://i.stack.imgur.com/AerHI.png)](https://i.stack.imgur.com/AerHI.png)

//EDIT

Solved it by following <https://blog.bridging-it.de/blog/blogeintrag_4480.html>