I want to create unit tests for one of my project’s classes but I’m getting a following error when I right click on the class source code and choose Create Unit Tests button:
The following error was encountered while reading module ‘Microsoft.Office.Tools.Common.v9.0’: Could not resolve type reference: [office]Microsoft.Office.Core.IRibbonExtensibility.
My project is an Outlook add-in and everything compiles correctly. Does anyone have any suggestion what this error might be and how could I avoid it?
Edit
After following suggestions from Ruffles’ answer the error has changed to:
The following error was encountered while reading module ‘Microsoft.Office.Tools.Outlook.v9.0’: Could not resolve type reference: [Microsoft.Office.Interop.Outlook]Microsoft.Office.Core.FormRegionStartup.
Actually if all you need is test your class, you should just create an empty test. And fill it with testing cases you need.
The only thing you’ll get from adding it with add test for this class is some generated test cases that you’ll remove anyway. And if I got it right the goal is to write unit tests, not to be able to create unit test by clicking on them with right mouse button :-).