我试图手动运行IISExpress,以便以后添加OpenCover范围。 这是一个.NET Core 2.2应用程序。 我可以从Visual Studio中启动该应用程序,并且一切运行正常。 现在,我想在命令行上手动启动它。 我使用VS生成的applicationhost.config。
我遵循了OpenCover for ASP.Net Core application running on IIS Express的回答, 即适应我的环境:
我正在从(非管理员)命令提示符下执行此操作 C:\ Program Files \ IIS Express>
WITH grouped_by_date AS (
SELECT Sales_Organization, Market_Grp,
Delivery_Year, Delivery_Month, Invoicing_Day,
SUM(QTY_UoM) as Weight
FROM tmp.factsales s
GROUP BY Sales_Organization, Market_Grp,
Delivery_Year, Delivery_Month, Invoicing_Day
)
SELECT gbd.*,
(SELECT SUM(gbd2.Weight)
FROM grouped_by_date gbd2
WHERE gbd2.Delivery_Year = gbd.Delivery_Year AND
(gbd2.Delivery_Month < gbd.Delivery_Month OR
gbd2.Delivery_Month = gbd.Delivery_Month AND
gbd2.Invoicing_Day <- gbd.Invoicing_Day
)
) as weight_ytd
FROM grouped_by_date gbd;
IISExpress启动并运行。 但是当我尝试连接到我的网站时,得到以下响应:
set LAUNCHER_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectSystem\VSIISExeLauncher.exe
set LAUNCHER_ARGS=-p "C:\Program Files\dotnet\dotnet.exe" -a "exec ""C:\Workspace\wk1\nSKEP\Dev\WebAccess\Dscp.Api\bin\Debug\netcoreapp2.2\Dscp.Api.dll"""
iisexpress.exe /config:"C:\Workspace\wk1\nSKEP\Dev\WebAccess\.vs\config\applicationhost.config" /site:Dscp.Api
我已经访问了链接的网站并进行了谷歌搜索,但是没有找到任何帮助。
在Win10系统事件查看器中,“ IIS Express AspNetCore模块V2”出现以下错误:
HTTP Error 500.0 - ANCM In-Process Handler Load Failure
Common causes of this issue:
* The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.
* The in process request handler, Microsoft.AspNetCore.Server.IIS, was not referenced in the application.
* ANCM could not find dotnet.
Troubleshooting steps: Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect
For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028526
当我在路径中指定VSIISExeLauncher.exe时,显然有趣的是它谈论VSIISExeLauncher.dll。
怎么了?