Compileing to diffrent file extensions

B

Brian Henry

Hi everyone,

What I am doing in my application is I have a base app, then a bunch of
plug-in dll files. Well this gets confuseing to diferentiate between the
real plug-ins and the actual link libraries that are not to be used as
plugins (in reality they are both DLL files) is there anyway I could make
VS.NET compile my VB.NET DLL plug-in projects into a diffrent extension but
still be DLL files? (i dont feel like changeing tens of extensions by hand
each build) I'd like the extension to be something like .bdbPlugin instead
of .DLL for the plug-ins so i could also associate a file type with them and
give them custom icons with the file type association in windows... thanks!
 
H

Herfried K. Wagner [MVP]

* "Brian Henry said:
What I am doing in my application is I have a base app, then a bunch of
plug-in dll files. Well this gets confuseing to diferentiate between the
real plug-ins and the actual link libraries that are not to be used as
plugins (in reality they are both DLL files) is there anyway I could make
VS.NET compile my VB.NET DLL plug-in projects into a diffrent extension but
still be DLL files? (i dont feel like changeing tens of extensions by hand
each build) I'd like the extension to be something like .bdbPlugin instead

AFAIS, you cannot do that, and I would not do it. Choose a name like
"MySample1.PlugIn.dll" or something like that.
of .DLL for the plug-ins so i could also associate a file type with them and
give them custom icons with the file type association in windows... thanks!

Did you ever see that for another application? I don't see much sense
in hiding the user the fact that the file actually contains code that
can be executed.
 
B

Brian Henry

many applications do this to distinguish the different types of libraries
they may have created... it's a lot more prevelant in C++, which I am use to
doing it there. VB.NET seems to have more of a strangle on what you compile
files into. In C++ a lot of files that we and other companies make are
really compiled DLL files passed off as a diffrent type (AOL, Adobe, and MS
do this for some file types) to name a few.
 
H

Herfried K. Wagner [MVP]

* "Brian Henry said:
many applications do this to distinguish the different types of libraries
they may have created... it's a lot more prevelant in C++, which I am use to
doing it there. VB.NET seems to have more of a strangle on what you compile
files into. In C++ a lot of files that we and other companies make are
really compiled DLL files passed off as a diffrent type (AOL, Adobe, and MS
do this for some file types) to name a few.

Basically, that should not be a problem for .NET assemblies too, but VS
doesn't support changing the extension of the output. All you can do is
writing an add-in that creates a copy of the DLL with the new name after
completing the build. I didn't test it, but it may work.
 
C

Chris Dunaway

Did you ever see that for another application? I don't see much sense
in hiding the user the fact that the file actually contains code that
can be executed.

Lots of apps do this. Just look at Windows Screen savers. They have a
..scr extension, but are nothing more than .dlls.

Also in Windows, control panel applets. They have an extension of .cpl but
are just a .dll.

How about PhotoShop plugins. They have different extensions (.8bf for
example), but are just .dll's

That's a very common thing to do, but I like your suggestion about the
naming, though.

The only way I can think to do it with .Net would be to use a custom build
action in a setup project that renames the file.
 
H

Herfried K. Wagner [MVP]

* Chris Dunaway said:
Lots of apps do this. Just look at Windows Screen savers. They have a
.scr extension, but are nothing more than .dlls.

They are executables...
Also in Windows, control panel applets. They have an extension of .cpl but
are just a .dll.

ACK.

;-)
 
S

Steve McLellan

Hi,

Under project settings have a look at Linker, and under the General tab
there's an 'Output File' field. Change the extension to whatever you fancy.

Steve
 
B

Brian Henry

no clue what you're talking about here, there is no linker properties in
VB.NET project settings... and the only output file field i see is a static
field
 
H

Herfried K. Wagner [MVP]

* "Brian Henry said:
no clue what you're talking about here, there is no linker properties in
VB.NET project settings... and the only output file field i see is a static
field

That's simply not supported. VB.NET will always take the assembly name
+ ".dll" or ".exe" (depending on the project type) for the output.
 
H

Herfried K. Wagner [MVP]

Addendum:
That's simply not supported. VB.NET will always take the assembly name
+ ".dll" or ".exe" (depending on the project type) for the output.

I had a quick look at the CTP March 2004 version of Whidbey and I didn't
find an option to do that there too ;-(.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top