Quantcast
Channel: Questions in topic: "dll"
Viewing all articles
Browse latest Browse all 706

Unable to debug dynamically loaded assembly DLL that was loaded via Assembly.load() in Unity 5.5.1f1(64 bit)

$
0
0
I am loading an assembly as follows: var bytes = File.ReadAllBytes("E:/Code/Projects/MyUtilities/bin/Debug/MyUtilities.dll"); Assembly loadedAssembly = Assembly.Load(bytes); The assembly is loaded fine and I can call functions with invoke: System.Type type = loadedAssembly.GetType("DLLTest.MyUtilities"); FieldInfo field = type.GetField("c"); Debug.Log(field.GetValue(null)); // get the method MethodInfo method = type.GetMethod("test", BindingFlags.Public | BindingFlags.Static); object[] args = new object[1]; args[0] = 2; var result = method.Invoke(null, args).ToString(); // assuming it doesn't take parameters When I add the DLL project into the UNity solution and set a break point in the DLL project its not hit. The PDB is right beside the DLL. I have tried to keep it beside Library\ScriptAssemblies\Assembly-CSharp.dll as well. Still the breakpoint is not hit in the DLL code. Tried all solution mentioned here: http://stackoverflow.com/questions/1295807/debug-dynamically-loaded-assembly-in-visual-studio-net?noredirect=1&lq=1 Does it have to be a mdb file rather than a PDB file?

Viewing all articles
Browse latest Browse all 706

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>