You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test Name: JsonRpcProxyGenerationTests.CallMethod_IntInt_Int
Test FullName: StreamJsonRpc.Tests (netcoreapp2.1).JsonRpcProxyGenerationTests.JsonRpcProxyGenerationTests.CallMethod_IntInt_Int
Test Source: D:\git\streamjsonrpc\src\StreamJsonRpc.Tests\JsonRpcProxyGenerationTests.cs : line 166
Test Outcome: Failed
Test Duration: 0:00:00
Test Name: JsonRpcProxyGenerationTests.CallMethod_IntInt_Int
Test Outcome: Failed
Result StackTrace:
at Lokad.ILPack.Metadata.AssemblyMetadata.GetTypeHandle(Type type)
at Lokad.ILPack.AssemblyGenerator.CreateCustomAttributes(EntityHandle parent, IEnumerable`1 attributes)
at Lokad.ILPack.AssemblyGenerator.GenerateAssemblyBytes(Assembly assembly)
at Lokad.ILPack.AssemblyGenerator.GenerateAssembly(Assembly assembly, String path)
at StreamJsonRpc.ProxyGeneration.Get(TypeInfo serviceInterface) in D:\git\streamjsonrpc\src\StreamJsonRpc\ProxyGeneration.cs:line 362
at StreamJsonRpc.JsonRpc.Attach[T](Stream sendingStream, Stream receivingStream) in D:\git\streamjsonrpc\src\StreamJsonRpc\JsonRpc.cs:line 573
at StreamJsonRpc.JsonRpc.Attach[T](Stream stream) in D:\git\streamjsonrpc\src\StreamJsonRpc\JsonRpc.cs:line 556
at JsonRpcProxyGenerationTests..ctor(ITestOutputHelper logger) in D:\git\streamjsonrpc\src\StreamJsonRpc.Tests\JsonRpcProxyGenerationTests.cs:line 30
Result Message:
System.ArgumentException : Type cannot be found: "System.Runtime.CompilerServices.IgnoresAccessChecksToAttribute, rpcProxies_cdac9d9d-b20f-49ff-9b2d-330b04eb391c, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"
Parameter name: type
The text was updated successfully, but these errors were encountered:
vermorel
changed the title
ArgumentException thrown while dumping assembly to disk
Fail to serialize: Type cannot be found: "System.Runtime.CompilerServices.IgnoresAccessChecksToAttribute
Jan 13, 2020
vermorel
changed the title
Fail to serialize: Type cannot be found: "System.Runtime.CompilerServices.IgnoresAccessChecksToAttribute
Fail to serialize: Type cannot be found: System.Runtime.CompilerServices.IgnoresAccessChecksToAttribute
Jan 13, 2020
I have found the problem and will submit a PR to fix this. It looks like ILPack doesn't handle when a custom attribute is both defined in the assembly and applied to the assembly.
I tried using this in StreamJsonRpc to dump out a dynamically written assembly.
https://github.com/AArnott/vs-streamjsonrpc/blob/c17313e3aed25059de03c3484882729e6c265dff/src/StreamJsonRpc/ProxyGeneration.cs#L362
It failed with the exception below:
The text was updated successfully, but these errors were encountered: