My .NET AddIn uses a third-party assembly Newtonsoft.Json. If you need to read or write JSON files, it's a very useful addition to your toolkit.
If I build my app as usual, then load and run it in MicroStation, I get an error: 'Cannot load Newtonsoft.Json v12.0.0'. This had me puzzled, because the build copies the assembly to ..\MicroStation\mdlapps along with the AddIn. I spent a day trying to work out whether this was a versioning issue (the version no. in Viz Studio is 12.0.3) with no success. I'm not the only one using Newtonsoft.Json; there's an early version in Microsoft's Windows SDK folder. Eventually I worked out that MicroStation could not find the assembly in ..\MicroStation\mdlapps. I copied the assembly to ..\MicroStation, and now it works.
..\MicroStation\mdlapps
..\MicroStation
However, I don't want to pollute the ..\MicroStation folder with assemblies that belong to AddIns. What configuration variable can I use to tell MicroStation to look elsewhere? MS_ADDINPATH and MS_ADDIN_DEPENDENCYPATH look promising. In my current installation of CONNECT Update 14.2, they both point to $(MSDIR)mdlsys\filehandler\RealDwg2019\, even though the comment in MicroStation's configuration dialog tells us that MS_ADDIN_DEPENDENCYPATH should not duplicate MS_ADDINPATH.
MS_ADDINPATH
MS_ADDIN_DEPENDENCYPATH
$(MSDIR)mdlsys\filehandler\RealDwg2019\
What's a good solution?