473,398 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Multiple Projects, single code file

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
Nov 19 '05 #1
1 2068
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" <jg**************@blah.leevalley.com> wrote in message
news:u5**************@TK2MSFTNGP10.phx.gbl...
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

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Hamed | last post by:
Hello Every where in .NET books is mentioned that VS.NET is a seamless cross platform environment. We have two groups of programmers that some are VB programmer but others prefer to use C#. Is it...
2
by: Mark | last post by:
Is there a realistic way for some developers on our team to work with multiple projects in a single solution under VSS source control, and have other developers only working with a single project...
3
by: Harry Whitehouse | last post by:
I'm developing a small class which will be used in a number of distinct C# projects. This small class is undergoing constant change/refinement as I try to employ it in the different projects. ...
3
by: Carl Johansen | last post by:
I have a big ASP website (used by several thousand car dealers) that is a collection of lots of small and medium-sized applications. Now I want to start adding ASP.NET applications to it. I have...
6
by: UJ | last post by:
I have a couple of files (type definitions, constants, ...) that I want to use in multiple projects. How do I make it so that I have only one copy of the file for multiple projects? If I do add...
1
by: David Herbst | last post by:
I have a solution that contains one main web project, ten sub web projects and a controls library project all in a single web application. I followed the steps in the following MS KB: How To...
10
by: eswanson | last post by:
I have broken up my web site into smaller web site projects. When I look at the precompiled files, it always has the virtual directory in them ie: <preserve resultType="3"...
3
by: Claudio Pacciarini | last post by:
Hi everyone, I have a question about .NET code sharing and reuse, and also about application design best practices / guidelines. Currently, we have many different .NET projects in source...
2
by: Jonathan Kacprowicz | last post by:
I am trying to create a build process using MSBuild that will build my multiple projects all with the same AssemblyVersion and AssemblyFileVersion. I have tried using the AssemblyInfo task from...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.