Visual studio 2017添加引用時報錯未能正確加載ReferenceManagerPackage包的解決方法
最近新裝了2017,開始前幾天還好,可是最近在添加引用時,報錯
---------------------------
Microsoft Visual Studio
---------------------------
未能正確加載“ReferenceManagerPackage”包。
此問題可能是因配置更改或安裝另一個擴展導(dǎo)致的??赏ㄟ^查看文件“C:\Users\Administrator\AppData\Roaming\Microsoft\VisualStudio\15.0_3dfc125b\ActivityLog.xml”來獲取詳細(xì)信息。
重新啟動 Visual Studio 可幫助解決此問題。
繼續(xù)顯示此錯誤消息嗎?
---------------------------
是(Y) 否(N)
---------------------------
找了百度及google 最后終于讓我找到了 解決方案 原文:
安裝完visual studio 2017 后添加引用總是提示 未能加載包ReferenceManagerPackage,這個問題困擾了兩天,直到在網(wǎng)上看到了下面這一段
I just got this error after installation of Visual Studio 2017.
The solution was as follows.
- Launch Developer Command Prompt for VS 2017
- CD C:\Program Files\Microsoft Visual Studio\2017\Community\Common7\IDE\PublicAssemblies
- Run gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll
You should now see
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.0
Copyright (c) Microsoft Corporation. All rights reserved.
Assembly successfully added to the cache
Restart Visual Studio and hopefully all will be well and you can add references.
The file C:\Users\USER\AppData\Roaming\Microsoft\VisualStudio\15.0_cc9cc69a\ActivityLog.xml is useful for debugging any other assemblies that may be causing the issue. Annoyingly it's very tempting to click No when asked never to see the error message again, which will suppress the error and this path so I thought I'd post it here for reference.
廢話不多說,來看下具體的解決方案:
1、打開VS2017下的Developer Command Prompt for VS 2017
2、然后在CMD窗口輸入
CD CD C:\Program Files\Microsoft Visual Studio\2017\Community\Common7\IDE\PublicAssemblies 然后回車(注:這里的CD C:\Program Files\Microsoft Visual Studio\2017\Community\Common7\IDE\PublicAssemblies 是你的安裝目錄下的路徑 , 如:我是安裝在D盤下的VS017,那么我的路徑就是 D:\工作軟件\vs2017\Common7\IDE\PublicAssemblies)
然后回車
3、再然后在CMD窗口輸入 gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll 回車,得到下圖的結(jié)果
4、最后一步,重啟VS2017 就OK了!
希望對你有幫助!
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
基于.net4.0實現(xiàn)IdentityServer4客戶端JWT解密
這篇文章主要為大家詳細(xì)介紹了基于.net4.0實現(xiàn)IdentityServer4客戶端JWT解密,具有一定的參考價值,感興趣的小伙伴們可以參考一下2018-09-09asp.net在iframe中彈出信息并執(zhí)行跳轉(zhuǎn)問題探討
本代碼將實現(xiàn)在iframe中彈出信息并執(zhí)行跳轉(zhuǎn),感興趣的朋友可以參考下2013-04-04IIS實現(xiàn)反向代理時Cookie域的設(shè)置方法
這篇文章主要給大家介紹了關(guān)于IIS實現(xiàn)反向代理時Cookie域的設(shè)置方法,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧。2018-04-04微信公眾平臺開發(fā)教程(二) 基本原理及消息接口總結(jié)
本篇文章主要介紹了微信公眾平臺開發(fā)教程(二) 基本原理及消息接口,具有一定的參考價值,有興趣的朋友可以了解一下。2016-12-12