Multiple Projects, single code file

J

Jody Gelowitz

Within ASP.NET, is it possible to use a single .vb file and have it shared
(or accessed) between multiple projects without having that file being
copied to each project folder?

ie.
C:\Projects\MyProject1 (project 1)
C:\Projects\MyProject2 (project 2)
C:\Projects\CommonFiles\MyCommonFile.vb (common file directly accessed
and compiled from Project1 and Project2)

The error that I get when manually editing the project file to do this is:
"The file '...{filename}' could not be added to hte project. The specified
path contains invalid characters, is an absolute path, or is a path outside
of the project directory."

I realize that another option would be to take what is in "CommonFiles" and
compile that into its own assembly, then reference that assembly between the
2 projects. But, I would like to explore the option of having each project
point to a common file and include that code into each compiled assembly
first.

Thanks,
Jody
 
J

Juan T. Llibre

What you need to do is compile
MyCommonFile.vb and place it in the GAC.

There it will be available to all applications.
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top