If you use Application.StartupPath in a referenced dll, the path points to the path of the IDE.
Is there anyway to get the path of the actual application?
Just to be clear, this is at design time.
ETA: I've posted the solution below:
ETA2:
Because it's related, I thought i'd post a snippet of another useful design-time service. Like the solution below, this example is for a UITypeEditor:
Public Overrides Function EditValue(ByVal context As System.ComponentModel.ITypeDescriptorContext, ByVal provider As System.IServiceProvider, ByVal value As Object) As Object
Dim typeDiscovery As ITypeDiscoveryService = TryCast(provider.GetService(GetType(ITypeDiscoveryService)), ITypeDiscoveryService)
Dim types As ICollection = typeDiscovery.GetTypes(GetType(MyType), False)
End Function
types will contain all types derived from MyType. Change the second parameter to True to exclude searching the GAC. Pass Nothing as the first parameter to get a list of all types.