Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Multiple Projects, single code file

Reply
Thread Tools

Multiple Projects, single code file

 
 
Jody Gelowitz
Guest
Posts: n/a
 
      03-11-2005
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


 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      03-11-2005
What you need to do is compile
MyCommonFile.vb and place it in the GAC.

There it will be available to all applications.



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"Jody Gelowitz" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
resolve single line with multiple items into mutliple lines, single items ela Perl Misc 12 04-06-2009 06:47 PM
How Code behind file and single file are process. archana ASP .Net 1 02-28-2007 03:17 PM
Compiling multiple pages to a single code-behind page in VS2005 LiveCycle ASP .Net 1 11-21-2006 04:26 PM
multiple web applications - single webservice - multiple databases Philip Gray ASP .Net Web Services 0 08-25-2005 09:25 AM
Text files read multiple files into single file, and then recreate the multiple files googlinggoogler@hotmail.com Python 4 02-13-2005 05:44 PM



Advertisments