Wont add dependencies because of missing service fabric packages

坚强是说给别人听的谎言 提交于 2020-04-13 23:01:59

问题


Starting a new empty .NET Core 2 class library i try to add any dependency with nuget i get this error

Error The local source 'C:\Program Files\Microsoft SDKs\Service Fabric\packages' doesn't exist.

But service fabric should have nothing to do with this solution . Also the solution builds succesfully


回答1:


I faced the same error.

There was service fabric installed but I decided to delete it. Then after that, this error started to appear.

All you have to do is create an empty packages folder

C:\Program Files\Microsoft SDKs\Service Fabric\packages



回答2:


I had this issue in VS 2019 despite uninstalling what I thought was all of Service Fabric long ago, and only using it in 2017. Adding the missing folder resolved the problem, although I don't know the root cause.




回答3:


Solved it by uninstalling visual studio 2017 and installing 2019. I suspect its something that went wrong when i installed Service Fabric SDK (which i was not using for this project). With 2019 it works even when having SF installed.



来源:https://stackoverflow.com/questions/56245714/wont-add-dependencies-because-of-missing-service-fabric-packages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!