Can you compile AOT when some assembly reference is missing?

83 views Asked by At

First some background: we have an old assembly (let's call it InitialAssembly), later on we decide we need to add extra capability, but because this new feature is very large in scale we decide to add in a separate assembly (let's call it AdditionalAssembly). We have decided to make the InitialAssembly to reference the AdditionalAssembly. We have internal logic in the InitialAssembly to check whether the AdditionalAssembly is present at run-time.

If we try to use these assemblies in a new project, if the AdditionalAssembly is present we get the new functionality, and if this assembly is missing we get the old behavior. All is well until we try to compile the project targeting Android with AotAssemblies set to true and with no reference to AdditionalAssembly. Then we get: "Precompiling failed for InitialAssembly.Mono Ahead of Time compiler - compiling assembly InitialAssembly". So the actual question: is there any setting for saying to the compiler "I know what I am doing and I don't want to have the new functionality pre-compiled"?

0

There are 0 answers