views:

79

answers:

1

I am writing an add-in for Expression Web 3 in VS2008

The solution has a Windows Installer setup project in which the ApplicationFolder is tagged to hold some ancillary files.

I need to be able to access those files during the add-in's startup, but naturally the Application object as well as the AppDomain reference paths to Expression Web not to the Add-In.

There is a tickle in the back of my head that the solution involves reflection but thats as far as I can get... has anyone dealt with this or have any suggestions?

A: 

If your addin's assembly is in the same place as the files you want to get to, you could try:

string assemblyPath = Assembly.GetExecutingAssembly().Location;
string containgFolder = System.IO.Path.GetDirectoryName(assemblyPath);

You could then get at whatever files you want from containingFolder.

cpalmer
thanks but still a bit of a struggle as during debug the assemblyPath is to \myVisualStudioProjectPath\bin\debug rather than the path selected at installation time.That makes technical sense but doesn;t quite get what I need...
Serexx