Nuget包增加了一倍

时间:2018-08-24 12:36:27

标签: visual-studio-2017 nuget

我有一个Visual Studio解决方案,其中有多个项目都指定了自己的package.config。

如果我运行“ nuget restore blablabla.sln”,则会得到例如我的包裹文件夹中的grpc.core \ 1.11.0。

如果让Visual Studio执行此操作,则我的packages文件夹中的grpc.core \ 1.11.0 Grpc.Core.1.11.0都将具有相同的内容!?

那是为什么? BR 丹尼尔

1 个答案:

答案 0 :(得分:0)

  

Nuget包装翻了一番

根据您的描述,您的Visual Studio中应该有两个以上具有相同nuget程序包mobile_test()的程序包资源(忽略大小写)。众所周知,nuget在搜索和还原软件包时不区分大小写。所以:

  1. 仔细检查软件包 grpc.core \ 1.11.0 Grpc.Core.1.11.0 ,除了大小写相同外。
  2. 清理const withAuthorization = (authCondition) => (Component) => { class WithAuthorization extends React.Component { componentDidMount() { firebase.auth.onAuthStateChanged(authUser => { if (!authCondition(authUser)) { this.props.history.push(routes.SIGN_IN); } }); } render() { return ( <AuthUserContext.Consumer> {authUser => authUser ? <Component {...this.props} /> : null} </AuthUserContext.Consumer> ); } } return withRouter(WithAuthorization); } export default withAuthorization; 文件夹,然后再从中还原nuget Visual Studio。
  3. 如果您确认上述内容,请检查您的程序包Feed中是否包含nuget程序包const authCondition = (authUser) => !!authUser export default withAuthorization(authCondition)(Account); 。您可以将其删除,因为它的内容与默认软件包源 authUser.getIdTokenResult(true) .then((idTokenResult) => { if (!!idTokenResult.claims.student) //here I check if it is a student 中的软件包grpc.core\Grpc.Core相同。

希望这会有所帮助。

相关问题