我試圖將「jquery.unobtrusive-ajax.js」添加到我的ASP.NET Core MVC(.NET框架)應用程序中。ASP.NET Core MVC(.NET框架)標記爲「Extraneous」的Bower軟件包
當試圖使用「管理鮑爾軟件包」並在搜索字段中輸入「unobtrusive」時,我找不到任何「Microsoft.jQuery.Unobtrusive.Ajax」軟件包引用。然後我決定使用命令提示符。
我輸入:亭子安裝Microsoft.jQuery.Unobtrusive.Ajax
添加文件夾「Microsoft.jQuery.Unobtrusive.Ajax」和.bower.json,bower.json,jquery.unobtrusive阿賈克斯。 js和jquery.unobtrusive-ajax.min.js也被添加了。如果在代碼中使用它工作正常。
但是,當從命令提示符運行「bower list」時,我將Microsoft.jQuery.Unobtrusive.Ajax引用標記爲無關,在Visual Studio 2015 Dependencies/Bower中也發生了相同的情況。並沒有在「管理涼亭包」中顯示安裝的軟件包。
當我運行: 「亭子搜索jquery.unobtrusive」 的結果是一個列表
jquery.unobtrusive阿賈克斯https://github.com/aspnet/jquery-ajax-unobtrusive.git
Microsoft.jQuery.Unobtrusive.Ajax https://github.com/whyleee/Microsoft.jQuery.Unobtrusive.Ajax.git
Streampoint.jQuery。 Unobtrusive.Ajax https://github.com/StreampointSolutions/jquery-sps-ajax-unobtrusive.git
Microsoft.jQuery.Unobtrusive.Validation https://github.com/whyleee/Microsoft.jQuery.Unobtrusive.Validation.git
但無論我使用鮑爾安裝「jquery.unobtrusive-ajax」或「Microsoft.jQuery.Unobtrusive.Ajax」。我總是將軟件包安裝爲「無關」的。
我檢查了bower.json和.bower.json文件,發現沒有什麼不尋常的。我能理解爲什麼這些軟件包被標記爲「無關」的涼亭?