Dllimport fails design time behavoir of other components

I am developing a CF project targeted for a smart device. Since I need to interact with native code compiled into a dll, one of my CF classes uses the Dll-import attribute. Since the targeted environment differs from my developing environment, I only make use of the dll functionality at run time, not design time. I declare the dll methods I am using as static extern functons in the global scope of my CF component. Though, having this Dll-import statement makes this component and all other components in the same project fail to run in design time, however they all will run in run time. I tried to put the Dll I am going to use on several different locations on the computer I am developing on (however, it makes no sence to use it on my developing computer since the Dll is targeted for another device). Is there a special location I need to put the Dll on Or can I condition my Dll-import attribute so it only will be intrepreted in run time since I need my design time code to run Excluding the Dll-import attribute makes the design time constructor run. I am using VS2005. 


namespace CCSystems.PetWinCE
{
   public class CTCanOpen : System.ComponentModel.Component,     System.ComponentModel.IListSource
   {

    [DllImport("CCCanOpen.dll")]
   
public static extern void SetUnmanagedIntSignal(int source, int signalValue);

public CTCanOpen(System.ComponentModel.IContainer container)
{
///
/// This constructor will not run in design time
///
...
}

public CTCanOpen()
{
///
///
 This constructor will run in run time
///
...
}

...



Answer this question

Dllimport fails design time behavoir of other components