[Mono-list] Mono and NuGet

Maciej Paszta maciej.paszta at gmail.com
Sun Nov 7 09:26:53 EST 2010


Hi!

I was wondering whether Mono supports (or is able to run) NuGet (former
NuPack). I've tried to run the newest version available on
nuget.codeplex.com, but without success, the error I'm getting is:
[mono-2.8] paszczi at paszczi-laptop:~/dev$ mono --runtime=v4.0.30319
NuPack.exe
Missing method .ctor in assembly /home/paszczi/dev/NuPack.exe, type
System.Data.Services.Common.EntityPropertyMappingAttribute
Can't find custom attr constructor image: /home/paszczi/dev/NuPack.exe
mtoken: 0x0a000293
Missing method .ctor in assembly /home/paszczi/dev/NuPack.exe, type
System.Data.Services.Common.EntityPropertyMappingAttribute
Can't find custom attr constructor image: /home/paszczi/dev/NuPack.exe
mtoken: 0x0a000293

Unhandled Exception: System.TypeLoadException: Could not load type
'System.Data.Services.Common.EntityPropertyMappingAttribute' from assembly
'NuPack'.
  at (wrapper managed-to-native) System.MonoType:GetPropertiesByName
(System.MonoType*,string,System.Reflection.BindingFlags,bool,System.Type)
  at System.MonoType.GetProperties (BindingFlags bindingAttr) [0x00000] in
<filename unknown>:0
  at
System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo+<GetExportMembers>c__Iterator0.MoveNext
() [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable.Any[MemberInfo] (IEnumerable`1 source) [0x00000]
in <filename unknown>:0
  at
System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.HasExports
() [0x00000] in <filename unknown>:0
  at
System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.IsPartDiscoverable
() [0x00000] in <filename unknown>:0
  at
System.ComponentModel.Composition.AttributedModel.AttributedModelDiscovery.CreatePartDefinitionIfDiscoverable
(System.Type type, ICompositionElement origin) [0x00000] in <filename
unknown>:0
  at System.ComponentModel.Composition.Hosting.TypeCatalog.get_PartsInternal
() [0x00000] in <filename unknown>:0
  at System.ComponentModel.Composition.Hosting.TypeCatalog.CreateIndex ()
[0x00000] in <filename unknown>:0
  at
System.Lazy`1[System.Collections.Generic.IDictionary`2[System.String,System.Collections.Generic.List`1[System.ComponentModel.Composition.Primitives.ComposablePartDefinition]]].InitValue
() [0x00000] in <filename unknown>:0

I've tried to compile NuGet from sources but had no luck:

[mono-2.8] paszczi at paszczi-laptop:~/dev$ mono --runtime=v4.0.30319
NuPack.exe
Missing method .ctor in assembly /home/paszczi/dev/NuPack.exe, type
System.Data.Services.Common.EntityPropertyMappingAttribute
Can't find custom attr constructor image: /home/paszczi/dev/NuPack.exe
mtoken: 0x0a000293
Missing method .ctor in assembly /home/paszczi/dev/NuPack.exe, type
System.Data.Services.Common.EntityPropertyMappingAttribute
Can't find custom attr constructor image: /home/paszczi/dev/NuPack.exe
mtoken: 0x0a000293

Unhandled Exception: System.TypeLoadException: Could not load type
'System.Data.Services.Common.EntityPropertyMappingAttribute' from assembly
'NuPack'.
  at (wrapper managed-to-native) System.MonoType:GetPropertiesByName
(System.MonoType*,string,System.Reflection.BindingFlags,bool,System.Type)
  at System.MonoType.GetProperties (BindingFlags bindingAttr) [0x00000] in
<filename unknown>:0
  at
System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo+<GetExportMembers>c__Iterator0.MoveNext
() [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable.Any[MemberInfo] (IEnumerable`1 source) [0x00000]
in <filename unknown>:0
  at
System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.HasExports
() [0x00000] in <filename unknown>:0
  at
System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.IsPartDiscoverable
() [0x00000] in <filename unknown>:0
  at
System.ComponentModel.Composition.AttributedModel.AttributedModelDiscovery.CreatePartDefinitionIfDiscoverable
(System.Type type, ICompositionElement origin) [0x00000] in <filename
unknown>:0
  at System.ComponentModel.Composition.Hosting.TypeCatalog.get_PartsInternal
() [0x00000] in <filename unknown>:0
  at System.ComponentModel.Composition.Hosting.TypeCatalog.CreateIndex ()
[0x00000] in <filename unknown>:0
  at
System.Lazy`1[System.Collections.Generic.IDictionary`2[System.String,System.Collections.Generic.List`1[System.ComponentModel.Composition.Primitives.ComposablePartDefinition]]].InitValue
() [0x00000] in <filename unknown>:0


I've found some repo from Rafael (under github.com/monoman) but had no luck
with that either. So my question is - is it possible to use it as is on
Mono. NuPack/NuGet seems like a quite good idea, I've tested in on Windows
and was positively surprised buy the workflow and easiness it offers. I'm
aware that integrating NuGet into Monodevelop requires significant amount of
time, but for me the console version would be sufficient.

-- 
Maciej Paszta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20101107/ffb3f491/attachment.html 


More information about the Mono-list mailing list