无法加载文件或程序集System.IO.FileSystem.Watcher,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a

时间:2017-11-26 11:39:16

标签: c# .net-core windows-10-iot-core

我一直在处理这个问题大约一个星期了。任何人都可以提供帮助。

我尝试安装System.IO.FileSystem.Watcher 4.0.0.0认为Nuget但它没有工作

这是我的代码btw

public sealed class StartupTask : IBackgroundTask {
    public void Run(IBackgroundTaskInstance taskInstance) {
        Console.WriteLine("Running demo with WebListener.");
        IConfigurationRoot config = new ConfigurationBuilder()
            .Build();
        IWebHostBuilder builder = new WebHostBuilder()
            .UseContentRoot(Directory.GetCurrentDirectory())
            .UseConfiguration(config)
            .UseStartup<WebHost>()
            .UseWebListener(options => {
                options.ListenerSettings.Authentication.Schemes = AuthenticationSchemes.None;
                options.ListenerSettings.Authentication.AllowAnonymous = true;
            });
        IWebHost host = builder.Build();
        host.Run();
    }
}
class WebHost {
    private int m_hight = 720;
    private int m_width = 1080;
    public void ConfigureServices(IServiceCollection services) {

    }
    public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) {
        app.Run(async (context) => {
            await context.Response.WriteAsync("hello there");

        });
    }
}

0 个答案:

没有答案