Windows Phone Developers

Tuesday, November 25, 2008

The type or namespace name 'ComVisible' could not be found (are you missing a using directive or an assembly reference?)

The type or namespace name 'ComVisibleAttribute' could not be found (are you missing a using directive or an assembly reference?)

This error occurs when you are trying to use ComVisibleAttribute in a class without a reference to System.Runtime.InteropServices namespace

[ComVisible(true)]

public interface IAddinVSTO

{

void SayHello();

}

Should have a reference to System.Runtime.InteropServices namespace like shown below

using System.Runtime.InteropServices;

[ComVisible(true)]

public interface IAddinVSTO

{

void SayHello();

}




ComVisibleAttribute Error Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

No comments:

Post a Comment