为什么nuget命令会产生Exception?

问题描述 投票:0回答:1

我在ubuntu上使用nuget,并使用rider作为IDE。我的IDE在nuget管理面板上的nuget下工作得很完美,我可以毫无问题地使用它来添加和删除我的包,但是当我运行 nuget 在我的终端中,我得到了这个异常。

Could not resolve type with token 01000249
System.TypeLoadException: Could not resolve type with token 01000249
  at (wrapper managed-to-native) System.Reflection.MonoMethodInfo:get_method_info (intptr,System.Reflection.MonoMethodInfo&)
  at System.Reflection.MonoMethodInfo.GetMethodInfo (System.IntPtr handle) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Reflection.MonoMethod.GetPseudoCustomAttributes () [0x00002] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.MonoCustomAttrs.GetPseudoCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType) [0x0000d] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.MonoCustomAttrs.IsDefined (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inherit) [0x0003b] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Reflection.MonoMethod.IsDefined (System.Type attributeType, System.Boolean inherit) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at Microsoft.Internal.AttributeServices.IsAttributeDefined[T] (System.Reflection.ICustomAttributeProvider attributeProvider, System.Boolean inherit) [0x00000] in <0007e672dd7f4959adc6f8103d9c843f>:0 
  at System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.IsExport (System.Reflection.ICustomAttributeProvider attributeProvider) [0x00000] in <0007e672dd7f4959adc6f8103d9c843f>:0 
  at System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo+<GetExportMembers>c__Iterator0.MoveNext () [0x001cd] in <0007e672dd7f4959adc6f8103d9c843f>:0 
  at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00018] in <63992662b765477a898ef49cdcc99ee2>:0 
  at System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.HasExports () [0x0000c] in <0007e672dd7f4959adc6f8103d9c843f>:0 
  at System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.IsPartDiscoverable () [0x0001d] in <0007e672dd7f4959adc6f8103d9c843f>:0 
  at System.ComponentModel.Composition.AttributedModel.AttributedModelDiscovery.CreatePartDefinitionIfDiscoverable (System.Type type, System.ComponentModel.Composition.Primitives.ICompositionElement origin) [0x0000a] in <0007e672dd7f4959adc6f8103d9c843f>:0 
  at System.ComponentModel.Composition.Hosting.TypeCatalog.get_PartsInternal () [0x00052] in <0007e672dd7f4959adc6f8103d9c843f>:0 
  at System.ComponentModel.Composition.Hosting.TypeCatalog.CreateIndex () [0x0000b] in <0007e672dd7f4959adc6f8103d9c843f>:0 
  at System.Lazy`1[T].CreateValue () [0x00075] in <8f2c484307284b51944a1a13a14c0266>:0 
mono nuget
1个回答
0
投票

我终于删除了我的mono和nuget的。

sudo apt purge mono-compelete

sudo apt purge nuget

然后只安装nuget,方法是

sudo install nuget

© www.soinside.com 2019 - 2024. All rights reserved.