msgpack / msgpack-cli

MessagePack implementation for Common Language Infrastructure / msgpack.org[C#]
http://msgpack.org
Apache License 2.0
835 stars 175 forks source link

Cannot build Xamarin.IOS project with 1.0.0-rc #283

Open Jinqiao opened 6 years ago

Jinqiao commented 6 years ago

After I update to 1.0.0-rc, I got the following error message at build time:

/path/to/MTOUCH: Error MT2002: Failed to resolve
"System.CodeDom.CodeParameterDeclarationExpression" reference from
"System.CodeDom, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=cc7b13ffcd2ddd51" (MT2002)
yfakariya commented 6 years ago

Thank you for reporting. I'm recognizing and tuckling this.issue with improving stability in Xamarin.

lucaspimentel commented 6 years ago

It looks like there's a reference to System.CodeDom when building against .NET Standard 2.0, but that dependency is not added to the NuGet package.

The following code throws an exception because there are internal types in MsgPack.Serialization.CodeDomSerializers that require System.CodeDom.dll but the assembly can't be found:

string assemblyString = "MsgPack, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a2625990d5dc0167";
Type[] types = Assembly.Load(assemblyString).GetTypes();