Tuesday, September 29, 2009 7:26 PMVB.net newbie question: I am writing a number of console applications, all of which need to use a set of common functions and subroutines that are compiled directly into the applications, not into a separate DLL.
I assume that each separate console application needs to be a separate project, and that the commonly used functions and subroutines need to be in a separate module, but how can such a module be shared between multiple projects so that only one copy of the shared module and its code is required, without creating a separate DLL?
Tuesday, September 29, 2009 9:01 PMI thought that I had found the answer, but it doesn't seem to work...
I created a module with the shared functions and subroutines in the project for one of the console applications. Then in the Solution Explorer, I right click on the project for a different console application and select Add->Existing Item..., choose the .vb file with the shared functions, then click the Add As Link from the Add button drop down list. After doing that, the linked file does show up in the project, but references to the functions in that file still show up as being undeclared in the main module for the project. What am I doing wrong?
Tuesday, September 29, 2009 9:09 PMArrrggghhh!!! Stupid me, it didn't occur to me at first that I specifically needed to *save* the code for the module with the common functions before those functions would be picked up in *other* projects where that module is added as a linked file. After saving the linked module, all is now fine. DUH!
Sorry for answering my own question.
- Marked As Answer by kamyers1 Tuesday, September 29, 2009 11:52 PM