[英]Cannot run NuGet Package Command in VS2015
我在同一台機器上做過很多次這樣的項目,但由於某種原因,以下內容對我不起作用:
Install-CleanReferencesTarget
(從https://github.com/Fody/Costura復制/粘貼) 當我到達第三步(到目前為止一直工作)時,我收到以下錯誤:
PM> Install-CleanReferencesTarget
Install-CleanReferencesTarget : The term 'Install-CleanReferencesTarget' is not recognized
as the name of a cmdlet, function, script file, or operable program. Check the spelling of
the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Install-CleanReferencesTarget
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Install-CleanReferencesTarget:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我已經嘗試重新創建項目,重新啟動我的電腦,重新啟動VS,運行VS作為管理員等,但結果相同。 我還驗證了有問題的DLL(FileHelpers.dll)設置為復制本地。
我還查看了包含相同DLL的另一個項目中的FodyWeavers.xml
文件,並且沒有此問題,並且它與此麻煩項目中的相同:
<?xml version="1.0" encoding="utf-8" ?>
<Weavers>
<Costura/>
</Weavers>
有誰知道為什么會突然發生這種情況?
這不是一個答案,但我只是遇到了同樣的問題,並設法找到了解決方法。
最后,而不是使用該cmdlet,我從底部添加目標到我的凸出文件在這里 。 這似乎有效。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.