How to tell Rider Assembly Location
I'm trying to debug some code generated by the XMLSerializer class. I set the /system.diagnostics/switches/add[@name="XmlSerialization.Compilation"] value so that the assembly and corresponding PDB are written to disk. This results in one or more Microsoft.GeneratedCode.dll assemblies being created (depending on how many different timess its registered). I've made a copy of the assembly I want to debug into, but how do I tell Rider the assembly's location?
Thanks!
Please sign in to leave a comment.
Hi Kpederson!
Could you please explain your case in more detail?
In Rider, there is an external source debugging feature that could be useful in your case.
When my application runs it makes a number of calls to `new XmlSerializer(type, (new List<Type>() {...}).ToArray()))`. At the time one of these serializer instances is first used, a new assembly is dynamically created and loaded called "Microsoft.GeneratedCode.dll". When the `/system.diagnostics/switches/add[@name="XmlSerialization.Compilation"]` switch is set, its equivalent assembly and PDB are also created on disk. Note also that the assembly will be overwritten the next time a different instance of the XmlSerializer is used for the first time, so its lifespan is sometimes short lived.
While running the application in the debugger, I would like Rider to do a number of things that I'm not sure are possible yet:
I found issue RIDER-24566, which I believe implies that the first two are not possible at this time. I am hoping option number 3 is possible somehow.
Please let me know if you need any additional clarification.
Hi!
The first two points indeed are not implemented and related to RIDER-24566.
The last one is also not possible, unfortunately. Here is the feature request for this: RIDER-18260.
Feel free to follow them and vote to be notified about updates.