問題:
I'm developing an ASP.NET 5 WebAPI project using VS Ultimate 2015 Preview.我正在使用 VS Ultimate 2015 Preview 開發一個 ASP.NET 5 WebAPI 項目。 I'm trying to configure the app in this way (line numbers are just guides):我正在嘗試以這種方式配置應用程序(行號只是指南):
1 using Microsoft.Framework.ConfigurationModel;
2
3 public IConfiguration Configuration { get; private set; }
4
5 public Startup()
6 {
7 Configuration = new Configuration()
8 .AddJsonFile("config.json")
9 .AddEnvironmentVariables();
10 }
Line 8 gives me an error: 'Configuration' does not contain a definition for 'AddJsonFile'...第 8 行給了我一個錯誤:“配置”不包含“AddJsonFile”的定義...
What is wrong?怎麼了?