I'm upgrading a VB .NET COM based SS4 addin to SS10. When compiling I get the following warning:
Warning The primary reference "Interop.MicroStationDGN, Version=8.0.0.0, Culture=neutral, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework.
To me this is saying the Interop.MicroStationDGN is depends on a .NET 4 library, but I have to target 3.5 for the addin.
Since it's a warning it still compiles but during the running of the addin of course it throws an exception:
System.IO.FileNotFoundException: Could not load file or assembly 'Interop.MicroStationDGN, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.File name: 'Interop.MicroStationDGN, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null'
Any ideas how to fix this one?
Hi Mike,
Mike Robertson said:When compiling I get the following warning:
There are many similar discussions (because it's not MicroStation specific issue) available on Internet. You should try to check some of them whether they will provide some more insights that can be applied to your situation.
Mike Robertson said:Any ideas how to fix this one?
I have no PowerGeopak installed, but I do not see such problem with my Microstation V8i SS10 installation. So I guess it's something specific to your project or (more probably) your computer setting.
In addition to Bob's link to Dependency Walker, there are also some alternative, e.g. this open source one.
Also any NET IL code decompiler (many of them are free) can help.
But my the most important recommendation is to change MSBuild output verbosity to Detailed (or you you prefer some suffering and pain, to Diagnostic ;-) and to check what is reported during the building your addin. To change MSBuild setting, go to Tools > Options and there to Projects and Solutions > Build and Run. You can choose whether you want to configure output (what is displayed) or log (what is logged to file).
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Jan (and Mike),
Jan Šlegr said:In addition to Bob's link to Dependency Walker, there are also some alternative, e.g. this open source one.
Might I suggest to Download Dependencies directly from the GitHub project releases page, since the version on the first link release is 1.07 vs. 1.10 available on GitHub.
But yes, I have seen and used this tool that is a slightly more modernized version of DependencyWalker w/ongoing improvements by the community.
HTH,Bob