views:

114

answers:

3

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.

+1  A: 

Have a read of this thread - there's a fair bit of information that you may need.

Pete OHanlon
+1  A: 

That sounds a lot like the issue described here:

http://social.msdn.microsoft.com/forums/en-US/vsto/thread/064ab7fd-a397-46ae-be84-192acc394a29

Is it worth trying the suggestions listed there?

Ruffles
+1  A: 

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 youll get from adding it with add test for this class is some generated test cases that youll 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 :-).

Yaroslav Yakovlev