【发布时间】:2016-11-12 18:27:59
【问题描述】:
我有一个由 Yeoman(described here)生成的“Hello World”Kestrel 服务器。
yo aspnet
当我通过命令行运行该站点时,一切正常:
dotnet run
如果它通过 Visual Studio Code 运行,尽管 bootstrap.css、jquery.js 和 bootstrap.js 不加载 (404)。
查看 F12 工具,它们实际上来自不同的位置。当通过dotnet run 运行时,它们来自https://ajax.aspnetcdn.com/...,但是当通过Visual Studio Code 运行时,浏览器会在本地文件夹~/lib/... 中寻找它们。
一个。为什么根据我运行网站的方式,文件的来源会有所不同? 湾。我该如何解决这个问题?
谢谢
【问题讨论】:
标签: c# .net asp.net-core visual-studio-code kestrel-http-server