473,385 Members | 1,824 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,385 software developers and data experts.

Organising classes in C# in Visual Studio ?

ORC
Hi,

I have made a standalone class file Solution which I will use in several
other Solutions, but how do I insert the MyClass.cs file without having
Visual Studio copying the Solution to the folder that adds the MyClass? I
don't want to compile it to a dll - I better like to have a link or
something to the source code file itself!

Thank you very much for your help!

Ole
Nov 16 '05 #1
5 1115
ORC <or*@sol.dk> wrote:
I have made a standalone class file Solution which I will use in several
other Solutions, but how do I insert the MyClass.cs file without having
Visual Studio copying the Solution to the folder that adds the MyClass? I
don't want to compile it to a dll - I better like to have a link or
something to the source code file itself!


Why, out of interest? This sounds like an ideal candidate to build as a
DLL and link against in other projects.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2
ORC
Because I want my exe file to be the only one to copy to the computers that
will run it, but if it is possible to implement the dll in the exe it would
be OK, but is it possible to do that?

Thanks
Ole

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
ORC <or*@sol.dk> wrote:
I have made a standalone class file Solution which I will use in several
other Solutions, but how do I insert the MyClass.cs file without having
Visual Studio copying the Solution to the folder that adds the MyClass? I don't want to compile it to a dll - I better like to have a link or
something to the source code file itself!


Why, out of interest? This sounds like an ideal candidate to build as a
DLL and link against in other projects.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 16 '05 #3
ORC
OK - figured it out!

Thanks
Ole

"ORC" <or*@sol.dk> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Because I want my exe file to be the only one to copy to the computers that will run it, but if it is possible to implement the dll in the exe it would be OK, but is it possible to do that?

Thanks
Ole

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
ORC <or*@sol.dk> wrote:
I have made a standalone class file Solution which I will use in several other Solutions, but how do I insert the MyClass.cs file without having Visual Studio copying the Solution to the folder that adds the
MyClass?
I don't want to compile it to a dll - I better like to have a link or
something to the source code file itself!


Why, out of interest? This sounds like an ideal candidate to build as a
DLL and link against in other projects.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


Nov 16 '05 #4
Use Visual SourceSafe, and then you can Share the file between the two
projects.
"ORC" wrote:
Hi,

I have made a standalone class file Solution which I will use in several
other Solutions, but how do I insert the MyClass.cs file without having
Visual Studio copying the Solution to the folder that adds the MyClass? I
don't want to compile it to a dll - I better like to have a link or
something to the source code file itself!

Thank you very much for your help!

Ole

Nov 16 '05 #5
Hi,

Select Add Existing Item , browse to it, and in the button next to the file
name select "Link" instead of the default "open"

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"ORC" <or*@sol.dk> wrote in message
news:eU**************@TK2MSFTNGP10.phx.gbl...
Hi,

I have made a standalone class file Solution which I will use in several
other Solutions, but how do I insert the MyClass.cs file without having
Visual Studio copying the Solution to the folder that adds the MyClass? I
don't want to compile it to a dll - I better like to have a link or
something to the source code file itself!

Thank you very much for your help!

Ole

Nov 16 '05 #6

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

Similar topics

2
by: Guy | last post by:
Everytime I try to add a new class or form to .NET C# project, I get the following error Could not run the 'C:\Program Files\Microsoft Visual Studio .NET...
0
by: Gargamel | last post by:
Hi. I wonder if someone can give me some advice on how to best organise my VS.Net projects. Say I have a web app with three main folders as follows: AppName (root) AppName\Admin...
1
by: Jason Carney | last post by:
hello, How do I organise my classes in c++? At the moment I have something like this in a .cpp file class classname { //class definition private: //... public: //...stuff
5
by: Benne Smith | last post by:
Hi, I have three enviroments; a development, a testing and a production enviroment. I'm making a big application (.exe), which uses alot of different webservices. I don't use the webservices...
1
by: SanjayJain | last post by:
using vs2003/c# we have several medium to large projects How should we organise our source files i.e. directories / namespaces / assemblies etc 1. some classes/groups of classes are used in...
7
by: Patrick | last post by:
Hi all, I was playing around with ASP.Net 2.0 and recognized that in case you use Code-Behind/Beside (how is it called in future?) the parser still creates TWO classes one partial class under...
8
by: cd~ | last post by:
I can provide a test app, the news server won't allow me to post the files because they are too large (93KB and 1.2KB) I downloaded the ESRI ArcXml schema and generated the classes from the...
9
by: Terry | last post by:
I am trying to test out the ability of VB6 (VBA access) to instanciate a VB.net Object and call its methods. I came accross the following article in my vs2005 help search:...
1
by: Angus | last post by:
Hello I have written all code for a client server application in C++. It is standard C++ written using Visual Studio v6. Basically C++ and STL. I want to provide a .NET interface for those...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.