關於NETCore發布到IIS
第一次發布Core項目時顯示No executable found matching command "npm"
顯示npm命令不存在,一時間摸不着頭腦,從網上查看如何安裝npm,從而找到解決方案。
基本步驟首先我安裝了nodejs,然后打開nodejs命令行工具,
輸入以下內容
node cli.js install npm -gf 其中-gf表示全局安裝的意思。在黑窗體中運行npm顯示一下內容表示安裝成功:
當我再次執行dotnet publish又顯示
No executable found matching command "bower"
No executable found matching command "gulp"
於是利用npm可以實現上面兩個命令的安裝:
npm install -g bower
npm install -g gulp
此時再執行發布命令,就沒有問題了。
具體的發布步驟可以參考:https://docs.asp.net/en/latest/publishing/iis.html