我尝试了几种不同的方法来设置这个项目,但每一种都失败了。这是我的问题。
这是我的 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().AddNewtonsoftJson();
services.AddSpaStaticFiles(configuration =>
{
configuration.RootPath = "client/build";
});
}
// This method gets called by the …Run Code Online (Sandbox Code Playgroud)