Go Back

Is the Documentation for DotNetAssembly Wrong or is the Runtime Bugged?

The current documentation for DotNetAssembly (https://www.synergex.com/docs/index.htm#lrm/lrmChap21DOTNETASSEMBLY.htm) has this specific warning:

The .NET assembly API does not support search paths. If you specify an environment variable that is set to multiple directory paths, DotNetAssembly will only use the first one.

However in testing we are finding that this is not true, and that pathing does work; here is the stripped down command:
private static InternalDetails__Data, @DotNetAssembly
		public static property Property__, @DotNetAssembly
			method get
				if(InternalDetails__Data == ^NULL)
					InternalDetails__Data = new DotNetAssembly("exe:SynergyInteropLibrary.dll")
				mreturn InternalDetails__Data

And EXE is set as follows:

putting SynergyInteropLibrary.dll into either folder (either exe2 or exe) works. Based on the documentation it seems like only exe2 should work.

Who is wrong here?

4 Answers
1   | Posted by Ace Olszowka to Synergy DBL on 6/5/2019 6:30 PM
Best Answer chosen by Ace Olszowka
Linda Kelley
The documentation is outdated: runtime search list logicals are honored by the NET Assembly API. We’ll up update the documentation accordingly. Thanks for pointing this out.

6/6/2019 9:44 PM   2  
Jack Ford
For me, this is a very welcome discovery/confirmation!   I thought I had tested directory search lists under .NET some time ago, finding that it was not supported as the doc stated, but Ace inspired me to check it again.  Linda, do you know when this was implemented?

10/25/2019 10:03 PM   1  
Ace Olszowka
@Jack Ford, yeah this is our recollection too; but I am interested to see what they come back with.

10/28/2019 1:15 PM   0  
Linda Kelley
Hi Jack, this became possible sometime around 9.5.3. However, we strongly discourage you from using this feature. As the DotNetAssembly documentation warns, "Although the .NET Assembly API supports search paths, we don't recommend that you use them. Search paths only work at runtime, and the gennet40 utility does not support them."

10/28/2019 7:10 PM   0  
Please log in to comment or answer this question.