Pregunta

I am creatinig Managed Extensibility Framework extensions for some program. That program uses dll files witch i create. I dont have visual studio project of that program, but i have that program. I can run these extensions using that program, but cant debug them properly. Is it possible to use visual studio debugger to debug my code?

I found solution to this, thanks!

¿Fue útil?

Solución

I found solution to this by my self, but thanks for sugestions. I can use that app for which i am creating this extension, class libary project. I press properties on project, then select debug tab and set "start external programm" an set it o that main app. then i press f5 and that app starts and when it uses my extension i can debug it using visual studio debugger. And i forgot to tell that i am creating this in C#.

http://msdn.microsoft.com/en-us/library/68c8335t.aspx

Otros consejos

I believe what you are looking for can be found here: http://msdn.microsoft.com/en-us/library/0bxe8ytt.aspx

According to this article, you could use the "Add Existing Project" dialog in you solution (for your DLL) to add the executable that you do not have the solution for. Because you are using MEF, it might get a bit tricky and you might want to create a new solution for debugging instead. However, this seems to be the general way to handle your situation. Since you have the source code for your DLL, I believe it should allow you to step through your code fully at the very least.

Note: You will need to make sure you have Visual C++ installed in your development environment.

If you are trying to debug the assembly code, then you can use the technique discussed by @BiggsTRC, if you are simply trying to identify why parts aren't being loaded, you could consider looking at the Composition Analysis Tool (mefx). This is a command-line tool for analysing a set of parts and finding out where failures may occur during composition.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top