2016-10-02 4 views
1

내가 만드는 오전과 각 2 응용 프로그램 사용 asp.net 코어의 모호성. 프로젝트를 만드는 동안 최신 4.6.1 DotNetFramwork 버전을 선택했습니다. Glimpse 패키지 버전 인 "2.0.0-beta1"도 추가했습니다. startup.cs 파일에서 IApplicationBuilder 인터페이스 버전과 충돌하는 데 문제가 있습니다.엿보기를 사용할 수 없습니다. IApplicationBuilder 패키지

Start.cs 파일의 Configure 메서드에서 IApplicationBuilder에 대한 모호한 오류 메시지가 나타납니다. 내가 Microsoft.AspNetCore.Builder.IApplicationBuilder 패키지를 선택하면 , 나는 IApplicationBuilder이 UseIISPlatformHandler 및 UseGlimpse에 대한 정의를 포함하지 않는 말을 컴파일 오류가 발생합니다.

난 다음이 IApplicationBuilder이 UseBrowserLink, UseDeveloperExceptionPage, UseExceptionHandler 및 UseIISPlatformHandler에 대한 정의를 포함하지 않는 것을 말하는 불만 사항을 제기 Microsoft.AspNet.Builder.IApplicationBuilder을 선택합니다.

나는 붙어과이 문제를 해결하는 방법을 잘 모르겠습니다. 내 프로젝트에서 엿볼을 사용해야합니다. 누군가가

을 도울 수 있을까요? 다음은

내 project.json 및 startup.cs의 복사본이 파일

project.json

{ 
    "dependencies": { 
    "Microsoft.NETCore.App": { 
     "version": "1.0.1", 
     "type": "platform" 
    }, 
    "Microsoft.ApplicationInsights.AspNetCore": "1.0.0", 
    "Microsoft.AspNetCore.Diagnostics": "1.0.0", 
    "Microsoft.AspNetCore.Mvc": "1.0.1", 
    "Microsoft.AspNetCore.Razor.Tools": { 
     "version": "1.0.0-preview2-final", 
     "type": "build" 
    }, 
    "Microsoft.AspNetCore.Routing": "1.0.1", 
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", 
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.1", 
    "Microsoft.AspNetCore.StaticFiles": "1.0.0", 
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", 
    "Microsoft.Extensions.Configuration.Json": "1.0.0", 
    "Microsoft.Extensions.Logging": "1.0.0", 
    "Microsoft.Extensions.Logging.Console": "1.0.0", 
    "Microsoft.Extensions.Logging.Debug": "1.0.0", 
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0", 
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0", 
    "Glimpse": "2.0.0-beta1" 
    }, 

    "tools": { 
    "BundlerMinifier.Core": "2.0.238", 
    "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final", 
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" 
    }, 

    "frameworks": { 
    "netcoreapp1.0": { 
     "imports": [ 
     "dotnet5.6", 
     "portable-net45+win8" 
     ] 
    } 
    }, 

    "buildOptions": { 
    "emitEntryPoint": true, 
    "preserveCompilationContext": true 
    }, 

    "runtimeOptions": { 
    "configProperties": { 
     "System.GC.Server": true 
    } 
    }, 

    "publishOptions": { 
    "include": [ 
     "wwwroot", 
     "**/*.cshtml", 
     "appsettings.json", 
     "web.config" 
    ] 
    }, 

    "scripts": { 
    "prepublish": [ "bower install", "dotnet bundle" ], 
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] 
    } 
} 

startup.cs

using Glimpse; 
using Microsoft.AspNet.Builder; 
using Microsoft.AspNet.Hosting; 
using Microsoft.AspNetCore.Builder; 
using Microsoft.Extensions.Configuration; 
using Microsoft.Extensions.DependencyInjection; 
using Microsoft.Extensions.Logging; 


namespace AspNetCoreAngular2Demo 
{ 
    public class Startup 
    { 
     // Entry point for the application. 
     public static void Main(string[] args) => WebApplication.Run<Startup>(args); 


     public Startup(IHostingEnvironment env) 
     { 
      // Set up configuration sources. 
      var builder = new ConfigurationBuilder() 
       .AddJsonFile("appsettings.json") 
       .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true); 

      builder.AddEnvironmentVariables(); 
      Configuration = builder.Build(); 
     } 

     public IConfigurationRoot Configuration { get; set; } 

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

     // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 
     public void Configure(Microsoft.AspNetCore.Builder.IApplicationBuilder app, 
           IHostingEnvironment env, 
           ILoggerFactory loggerFactory) 
     { 
      loggerFactory.AddConsole(Configuration.GetSection("Logging")); 
      loggerFactory.AddDebug(); 

      if (env.IsDevelopment()) 
      { 
       app.UseBrowserLink(); 
       app.UseDeveloperExceptionPage(); 
      } 
      else 
      { 
       app.UseExceptionHandler("/Home/Error"); 
      } 

      app.UseIISPlatformHandler(options => 
             options.AuthenticationDescriptions.Clear()); 
      app.UseStaticFiles(); 
      app.UseGlimpse(); 

      app.UseMvc(routes => 
      { 
       routes.MapRoute("default", 
           "{controller=Home}/{action=Index}/{id?}"); 
       routes.MapRoute("spa-fallback", 
           "{*anything}", 
           new { controller = "Home", action = "Index" }); 
       routes.MapWebApiRoute("defaultApi", 
             "api/{controller}/{id?}"); 
      }); 
     } 

    } 
} 
+0

에 대한 https://www.myget.org/gallery/glimpseprototype에서 NuGet 피드에서 엿볼 2 베타 2를 사용해보십시오? – Paul

+0

동일한 문제가 있었지만이 지침에 따라 작동했습니다 : https://github.com/Glimpse/Glimpse.Prototype/issues/123#issuecomment-276980579 –

답변

0

엿볼 2 베타 1 .NET Core RC1을 지원합니다.

이의 해결 되었습니까 .NET 핵심 RTM 지원

+1

"Glimpse"항목을 추가하려고 시도했습니다 : "2.0.0-beta2 "project.json에서 URL https://www.myget.org/gallery/glimpseprototype을 Visual Studio 2015 편집기의 NugetManager에있는 패키지 소스 설정에 추가했습니다. 라이브러리를 다운로드하지 않고 설치합니다. 모든 단서 – Mike