简体   繁体   中英

Debug VS 2012 asp.net mvc jquery webapi MEF

I'm developing an ASP.net MVC project as part of a larger solution. The MVC project uses the following technologies:

MVC WebAPI jquery MEF

Views are rendered using MVC. jQuery REST calls made to webAPI controllers for updating parts of the view.

I'm using MEF resolve the MVC and WebAPI controllers and any other dependencies.

Right now, I'm not able to resolve any of the WebAPI calls. What do I need to do to debug problems with MEF resolution?

Thanks in advance.

You can use MEFX to help diagnose composition errors ( http://msdn.microsoft.com/en-us/library/ff576068(v=vs.100).aspx .

If you're not getting any exceptions, I would add a breakpoint somewhere after you're doing composition and look at the Parts property of the container, to see if the parts you expect to be there are there. If they're not, you should be able to use MEFX to figure out why not.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM