corert icon indicating copy to clipboard operation
corert copied to clipboard

app with mongoDB compilation failure

Open denisvlah opened this issue 8 years ago • 2 comments

I am trying to compile an app with RyuJIT AOT compiler following steps in https://github.com/dotnet/corert/tree/master/samples/MonoGame

The app has a reference to the mongodb oficcial driver.

It gives the following error: EXEC : error : VTable of type 'MongoDB.Bson.Serialization.IBsonSerializer`1<IgnoredReply<System.__Canon>>' not computed by the IL scanner. You can work around by running the compilation with scanner disabled. [C:\Users\User\Desktop\EpyDoc3\Src\Core\DruidTesterApp\DruidTesterAppNetcore\DruidTesterAppNetcore.csproj]

I have also tried the rd.xml file with the following conent but it doesn't help:

<Directives>
  <Application>
    <Assembly Name="Newtonsoft.Json">
      <Type Name="Newtonsoft.Json.Serialization.ObjectConstructor`1[[System.Object,System.Private.CoreLib]]" Dynamic="Required All" />
    </Assembly>
    
    <!--<Assembly Name="MongoDB.Driver.Core">      
      <Type Name="MongoDB.Driver.Core.Misc.BatchableSource`1[System.__Canon]" Dynamic="Required All" />      
    </Assembly>-->

    <Assembly Name="MongoDB.Bson" Dynamic="Required All" />
    <Assembly Name="MongoDB.Driver.Core" Dynamic="Required All" />
    <Assembly Name="MongoDB.Driver" Dynamic="Required All" />
    <Assembly Name="mscorlib" Dynamic="Required All"/>
  </Application>
</Directives>

the fragment of the .csproj file:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.DotNet.ILCompiler" Version="1.0.0-alpha-*" />
    <PackageReference Include="MongoDB.Driver" Version="2.5.0" />
    <PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="EpyDoc.Tools.DruidDriver\" />
  </ItemGroup>

  <ItemGroup>
    <RdXmlFile Include="rd.xml" />
  </ItemGroup>

</Project>

denisvlah avatar Mar 07 '18 00:03 denisvlah

Could you share a complete project so that we can reproduce it (or a minimal subset that hits this)?

MichalStrehovsky avatar Mar 08 '18 12:03 MichalStrehovsky

Find a subset of the project in the attached zip file. DruidTesterApp.zip

Thanks,

denisvlah avatar Mar 11 '18 17:03 denisvlah