473,581 Members | 2,491 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using common classes and enums for all projects in a Solution

Hi All,
I am using VS.2008 and I have one windows apllication project and two web
project in my solution.

How can i use common classes and enums for all projects ?

I add "Solution Items" folder in my Solution and create a class in that
folder but i can not reach that class from any of the projects ..

Thanks in advance.
Jun 27 '08 #1
4 2015
On Jun 11, 10:45 am, "Nariban Barkan" <SomeFunny...@s .comwrote:
I am using VS.2008 and I have one windows apllication project and two web
project in my solution.

How can i use common classes and enums for all projects ?

I add "Solution Items" folder in my Solution and create a class in that
folder but i can not reach that class from any of the projects ..
Create a class library project, and then add a reference to that
project from each of the others.

Jon
Jun 27 '08 #2
Note that if you are using web-references (i.e. asmx etc) then things
get more interesting. I just answered something very similar over in:
microsoft.publi c.dotnet.framew ork ("Annoying Web Service Compilation
Issue").

Marc
Jun 27 '08 #3
Thanks ....
Jun 27 '08 #4
On Jun 11, 4:45*am, "Nariban Barkan" <SomeFunny...@s .comwrote:
Hi All,
I am using VS.2008 and I have one windows apllication project and two web
project in my solution.

How can i use common classes and enums for all projects ?

I add "Solution Items" folder in my Solution and create a class in that
folder but i can not reach that class from any of the projects ..

Thanks in advance.
For what's it worth I do find that method of sharing code useful in
one particular case. That is to share the assembly level attributes
for product and version information. From each project in the
solution you can "link" in a file from outside the project by clicking
the down arrow on the Add button in the Add Existing File dialog box
and chosing Add as Link.
Jun 27 '08 #5

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

Similar topics

1
2271
by: Vincent V | last post by:
Hey i am just starting a new project and from the start i want to make sure my app is as Object Orientated as possible I have a couple of questions in relation to this Question 1: Should i Struction my solution in numerous projects ie 1. Webpage Files(ui) 2. Classes
3
1462
by: Jeremy S | last post by:
I wrote an ASP.NET application and pretty much separated out various layers of functionality into individual class files (e.g., dal.cs for all db access). It's currently all in one VS.NET project and gets compiled into one dll. I want to re-use some of the classes in other projects - so what all do I need to do to get these classes into their...
5
1654
by: Derek Martin | last post by:
I am creating a windows service and have added a reference to a DLL project that I have created. That DLL file is correctly referenced in both a windows app and a web app, all in the same solution, so I thought I could do the same for a service project. However, after successfully adding the reference and making sure the namespaces were...
3
1878
by: Marty | last post by:
Hi, I am building a solution with 2 projects within it. There is several common classes (.vb) files between the two projects. How can I seperate common classes from private classes for each project in the same solution? How do I set them in the project explorer? Thank you
7
4347
by: Adrian Hawryluk | last post by:
Can one define a partial class (first part containing constants like enums) and then define the rest of the class elsewhere? I ask this because I've had in the past needed to defined two classes (call them A and B), each dependent upon the other. Class A requires the enum type defined in Class B. An example follows: <header file="A.h">...
1
1520
by: Matt Owens | last post by:
Hi, Im setting up a new project in which I'd like to share code across numerous other projects, specifically a control library and an array of common objects. Im not really sure how best to go about this, i've done this two ways in the past and both have proved a little problematic. 1) Create a new solution in a common area with a common...
2
2697
by: Roy Chastain | last post by:
I have some 'base' schema definitions that are going to be in several projects in the future. The processing of resulting classes created by XSD will be consistent across the new projects. I have created a schema with these base definitions and common code to process these elements. I have managed to finally get include to work so that...
83
4152
by: liketofindoutwhy | last post by:
I am learning more and more Prototype and Script.aculo.us and got the Bungee book... and wonder if I should get some books on jQuery (jQuery in Action, and Learning jQuery) and start learning about it too? Once I saw a website comparing Prototype to Java and jQuery to Ruby... but now that I read more and more about Prototype, it is said...
4
1206
by: Nariban Barkan | last post by:
Hi All, I am using VS.2008 and I have one windows apllication project and two web project in my solution. How can i use common classes and enums for all projects ? I add "Solution Items" folder in my Solution and create a class in that folder but i can not reach that class from any of the projects .. Thanks in advance.
0
7857
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7788
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...
0
8137
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. ...
0
8163
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...
1
5667
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3799
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...
1
2297
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
1
1397
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1127
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.