I have been following the instructions here, to embed a toolbox and it works fine for embedding.
I have been using the code snippet that I found at the end of this post by to reference the embedded toolbox.
However, this code returns a path with the assembly location. like this
and it needs to be
I have modified my code, to replace the string "AssemblyCache" and this works, but is there a cleaner way to do this? my code is below
string assemblyfolderpath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); string finalpath = assemblyfolderpath.Replace("AssemblyCache", "Toolboxes"); string tool_path = System.IO.Path.Combine(finalpath,@"toolboxes\Default.tbx\CreateScenario");
Thank you in advance for your help