CustomCommand Icons - embed in assembly?

Teetow wrote on 10/2/2007, 6:11 AM
If I add my icons to a folder named "Icons" in the MSVS project, and refer them as "Icons/myIcon.png", I see them whenever I launch Vegas from within MSVS. If I launch Vegas separately, they icons don't show. I suspect this is because MSVS sets the working directory to my project directory, while launching Vegas directly sets the working directory to wherever Vegas is stored.

Now, this gives me an idea for a feature request. Is it possible to have CustomCommands use images embedded in the DLL rather than raw files on disk? It certainly would look more "professional" to distribute a self-contained DLL rather than scattered icon files.

Comments

ForumAdmin wrote on 10/2/2007, 6:46 AM
Good idea... I've added this feature request to our list.

But, for now, you can make your IconFile property smart about resolving the path relative to your assembly. For example:


public string IconFile
{
get
{
return Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Icons/myIcon.png");
}
}


And you'd need to copy the icon directory to where your assembly resides.