Note that there are some explanatory texts on larger screens.

plurals
  1. POReferences to embedded interop assemblies, again
    primarykey
    data
    text
    <p>I am including Olectra Chart, a third-party graphics package, into a VB.Net project, but am plagued with the following warnings:-</p> <blockquote> <p>vbc : warning BC40059: A reference was created to embedded interop assembly 'Interop.OlectraChart2D' because of an indirect reference to that assembly from assembly 'AxInterop.OlectraChart2D'. Consider changing the 'Embed Interop Types' property on either assembly.</p> <p>vbc : warning BC40059: A reference was created to embedded interop assembly 'Interop.OlectraChart2D' because of an indirect reference to that assembly from assembly 'MyClassLibrary'. Consider changing the 'Embed Interop Types' property on either assembly.</p> </blockquote> <p>These appear to prevent the necessary dlls from being included in the <code>bin</code> directory, resulting in exceptions at run-time.</p> <p><strong>Edit:</strong> Exception thus:-</p> <blockquote> <p>System.IO.FileNotFoundException: Could not load file or assembly 'Interop.OlectraChart2D, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. File name: 'Interop.OlectraChart2D, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null'</p> </blockquote> <p>I have noted the answers given <a href="https://stackoverflow.com/questions/8156488/what-does-reference-was-created-to-embedded-interop-assembly-mean">here</a> and <a href="https://stackoverflow.com/questions/7923050/stupid-warning-messages-wont-go-away-and-now-wont-let-me-publish">here</a>, and have tried all possible combinations of <code>Embed Interop Types</code> values in the property panel for <code>AxInterop.OlectraChart2D</code> and <code>Interop.OlectraChart2D</code> but none of them clears the warnings without creating compilation errors.</p> <p>Including the project in a different solution brings different warnings:-</p> <blockquote> <p>COM Reference 'OlectraChart2D' is the interop assembly for ActiveX control 'AxOlectraChart2D' but was marked to be linked by the compiler with the /link flag. This COM reference will be treated as a reference and will not be linked.</p> </blockquote> <p>but the output <code>bin</code> directory is fine.</p> <p>I can clear the run-time exception by copying the dlls into the <code>bin</code> directory from other solutions but that doesn't seem right to me. Does anyone know what I should do to fix this properly?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload