473,662 Members | 2,704 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to share the source .cs file between muti project?

I have a Class CTest in test.cs but two or more projects need this class. So
how to share the SOURCE FILE(test.cs, not using dll file) in these projects?
Nov 15 '05 #1
3 3465
>I have a Class CTest in test.cs but two or more projects need this class. So
how to share the SOURCE FILE(test.cs, not using dll file) in these projects?


In Project 2, go to the solution explorer, go to the project in
question, right-click and go "Add existing item".

Then in the browser window, go to the file in question, highlight it,
and then don't just click on the "Open" button, but check out the
"drop-down" list of the Open button - choose "Link file".

That way, you just create a link to that existing file - you won't
have two copies of the file in two directories, but just a link back
to the original location of that file

Marc

=============== =============== =============== =============== ====
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)i nova.ch
Nov 15 '05 #2
thanks

"Marc Scheuner [MVP ADSI]" <m.********@ino va.SPAMBEGONE.c h> дÈëÓʼþ
news:hr******** *************** *********@4ax.c om...
I have a Class CTest in test.cs but two or more projects need this class. Sohow to share the SOURCE FILE(test.cs, not using dll file) in these
projects?
In Project 2, go to the solution explorer, go to the project in
question, right-click and go "Add existing item".

Then in the browser window, go to the file in question, highlight it,
and then don't just click on the "Open" button, but check out the
"drop-down" list of the Open button - choose "Link file".

That way, you just create a link to that existing file - you won't
have two copies of the file in two directories, but just a link back
to the original location of that file

Marc

=============== =============== =============== =============== ====
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)i nova.ch

Nov 15 '05 #3
Hi,

You can either:

a) Employ your source control system's "Share" feature (Microsoft VSS
definitely has one)
b) Add the file as a linked item to one of these projects (I believe only VS
..NET 2003 supports this)

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"thxBruin" <js****@163.com > wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
I have a Class CTest in test.cs but two or more projects need this class. So how to share the SOURCE FILE(test.cs, not using dll file) in these projects?


Nov 15 '05 #4

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

Similar topics

0
4432
by: Alex | last post by:
Hi, Whan I trying to open a NEW Visual Basic ASP.NET project(I got Windows 2003 server),then I got an error: The default web access for this project is set to file share,but the project folder at: "http://localhost/webapplnew" cannot be opened with the path: "c:\inetpub\wwwroot\webapplnew".The error returned was: Unable to create web project webapplnew.The file path "c:\inetpub\wwwroot\webapplnew" does not correspond to the
2
2707
by: Brad Wood | last post by:
Using VS2003, I can't add an existing class to a project w/o the IDE creating a copy of it. I want multiple projects to be able to share a central copy of a class. I can't compile the shared class into a library because one of the executables that uses the class needs to be a self contained executable that will be downloaded and immediately executed on a PDA. I can't GAC the shared library so that both applications can use it because...
1
1477
by: Hughs Man | last post by:
I am not develop an VB .NET application within a team. The source code is place into the server and user connect to the share for development When I load the project, VB.NET told me that "The project location is not fully trusted by the .NET runtime......" How can I correct this stuff ? And is there any source control tools in Visual studio 2003.
3
2133
by: Fábio | last post by:
Whats the rules to create a ASP.NET project using file share?? i don't want to use server extensions!!! I'm inside a intranet and i have total access to the web server!!! what i need to do??? Thanks Fabio
5
2048
by: Richard K | last post by:
Is it possible to share a single source file among two or more Projects in a Solution? I'm not talking about a DLL, just a .vb file that might contain a class or module with common code to be compiled into each project. That way this code can be updated once instead of makiing duplicate changes to identical code within each project. I have tried putting the source in a common folder, then using Add Existing Item to add it to each...
15
5802
by: Neo | last post by:
Hello All, I found that ASP.net website only accepts code withing site directory. This creates big hurdle in shairng code. How to share code between two websites, like the way share between two non-website code? -Pravin
10
2098
by: =?Utf-8?B?SmFrb2IgTGl0aG5lcg==?= | last post by:
We have a complex VS solution with several web projects. The reason is the applications share a lot of business logic that change often and we want to observe the implications of all changes. But the webprojects also share some user controls so we would like to have a common folder where all common UI is placed. What we have come up with so far is to create a CommonUI folder and in IIS, from each web application, link the CommonUI as a...
0
2091
by: Steve | last post by:
Hello- Platform: - web server using IIS 6 connecting to UNC share on separate file server - Both servers are Windows 2003 with dotNetFramework 2.0 General: - basic ASP.NET pages work fine in this situation
1
1803
by: ThomasD | last post by:
I am using TraceSource to log errors and such. I have a custom tracelistener I use for this, and this is setup in the app.config like this: <system.diagnostics> <trace autoflush="true"/> <sources> <source switchValue="All" name="Application" > <listeners>
0
8345
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8768
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8547
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7368
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4181
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.