473,786 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Add New Item

Hello All,

I'd like to keep some files (modules) which are to be used in many
projects/solutions in a separate folder, not belonging to any project or
solution, such that I can add (link) them to any project with "Add Existing
Item".
The problem is that when I try to create such a file with "Add New Item",
the new file is always saved in the current project folder and that there
seems to be no option available to save it elsewhere...

Any suggestions?
TIA
Nov 20 '05 #1
7 1449
* "Guido Rooms" <gu*********@sk ynet.be> scripsit:
I'd like to keep some files (modules) which are to be used in many
projects/solutions in a separate folder, not belonging to any project or
solution, such that I can add (link) them to any project with "Add Existing
Item".
The problem is that when I try to create such a file with "Add New Item",
the new file is always saved in the current project folder and that there
seems to be no option available to save it elsewhere...


In the dialog used to add the existing file, have a look at the dropdown
button that is used to add the file -- you can choose to reference the
file only there.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
The problem is not adding an existing item, but adding a *new* item.
Visual Studio creates the new file in the project folder, and there seems to
be no option to change that behaviour.
The only way to get the new file into the folder where you want it, is to
use "Save As" on the file, and then to delete it from the project folder in
file explorer to get rid of the redundant copy...

Thanks for your reply anyway.

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:2i******** ****@uni-berlin.de...
* "Guido Rooms" <gu*********@sk ynet.be> scripsit:
I'd like to keep some files (modules) which are to be used in many
projects/solutions in a separate folder, not belonging to any project or solution, such that I can add (link) them to any project with "Add Existing Item".
The problem is that when I try to create such a file with "Add New Item", the new file is always saved in the current project folder and that there seems to be no option available to save it elsewhere...


In the dialog used to add the existing file, have a look at the dropdown
button that is used to add the file -- you can choose to reference the
file only there.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #3
"Guido Rooms" <gu*********@sk ynet.be> schrieb
The problem is not adding an existing item, but adding a *new*
item. Visual Studio creates the new file in the project folder, and
there seems to be no option to change that behaviour.
The only way to get the new file into the folder where you want it,
is to use "Save As" on the file, and then to delete it from the
project folder in file explorer to get rid of the redundant
copy...


If you use the button Herfried mentioned, the file is *not* copied to the
project folder. The project will only have a *link* to the file in the other
directory.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4
Herfried is talking about adding an *existing* item, he is *not* talking
about adding a *new* item, which is exactly what *I* am talking about.
Right?

In the dialog box for adding a *new* item, there is no down arrow on the
"Open" button. Moreover, you cannot specify a path. If you do so, you get an
error message saying you are using illegal characters.

Perhaps you had better read my original post again. Please, reread the
second sentence.
"New" is not the same as "Existing".

"Armin Zingler" <az*******@free net.de> wrote in message
news:40******** *************** @news.freenet.d e...
"Guido Rooms" <gu*********@sk ynet.be> schrieb
The problem is not adding an existing item, but adding a *new*
item. Visual Studio creates the new file in the project folder, and
there seems to be no option to change that behaviour.
The only way to get the new file into the folder where you want it,
is to use "Save As" on the file, and then to delete it from the
project folder in file explorer to get rid of the redundant
copy...
If you use the button Herfried mentioned, the file is *not* copied to the
project folder. The project will only have a *link* to the file in the

other directory.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5
* "Guido Rooms" <gu*********@sk ynet.be> scripsit:
Herfried is talking about adding an *existing* item, he is *not* talking
about adding a *new* item, which is exactly what *I* am talking about.
Right?


I don't see the problem. Just create a dummy file with notepad, save it
to the appropriate folder and then add a reference to it.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #6
"Guido Rooms" <gu*********@sk ynet.be> schrieb
Herfried is talking about adding an *existing* item, he is *not*
talking about adding a *new* item, which is exactly what *I* am
talking about. Right?

In the dialog box for adding a *new* item, there is no down arrow on
the "Open" button. Moreover, you cannot specify a path. If you do so,
you get an error message saying you are using illegal characters.

Perhaps you had better read my original post again. Please, reread
the second sentence.
"New" is not the same as "Existing".


That's why I said you should add the existing, not a new file. I didn't know
the file does not exist, so I thought you are doing the wrong step. Seems I
misunderstood you. Well, I don't know how to achieve it.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #7
On Fri, 4 Jun 2004 10:40:08 +0200, Guido Rooms wrote:
The problem is that when I try to create such a file with "Add New Item",
the new file is always saved in the current project folder and that there
seems to be no option available to save it elsewhere...

Any suggestions?
TIA


One workaround would be to create a project that exists in your modules
folder. Then include that project in your solution. When you need to
create a new item, create it in the 'modules' project. Then you can do an
add existing in the 'real' project using the link option. Its an extra
step, but it should work.

HTH

--
Chris

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
Nov 20 '05 #8

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

Similar topics

13
1715
by: tuvok | last post by:
I have an Item object which allocates memory in its ctor and frees it in its dtor. I want to add such items to a vector. But the program crashes. Why? How do I fix it? #include <vector> class Item { public:
2
5643
by: Ash Jones | last post by:
I trying to do nested items in a collection. I've got an item which one of the properties is subitems, which is a collection of item. can do the root level but if i do a subitem at design time i get an object not set error. it's like a menuitem or treenode which can have subitems of the same type. cant find any help on nested items. is there anyone out there that help? Many thanks,
7
3945
by: Devron Blatchford | last post by:
Hi there, I have created an owner draw menu item using DrawItem and MeasureItem in VB.NET. This seems to work well. I was wondering how I can do mouse over effects in these menus. Basically the same as the dot net menus where they get highlighted when the mouse moves over them. Does anyone have any VB dot net examples or suggestions on how I could do this?
3
2911
by: Dean Slindee | last post by:
In a checked listbox, I am allowing drag/drop of the items within (resequencing). Problem is, when dropping a checked item, the checked state always reverts to unchecked (unwanted). Anyone know how to set the checked state of a checked listbox item in code. Here is the drag/drop code, which works fine, except for unchecking the dropped item: Private Sub clbQueryItems_DragDrop(ByVal sender As System.Object, ByVal e As...
18
4750
by: JohnR | last post by:
From reading the documentation, this should be a relatively easy thing. I have an arraylist of custom class instances which I want to search with an"indexof" where I'm passing an instance if the class where only the "searched" property has a value. I expected to get the index into the arraylist where I could then get the entire class instance. However, the 'indexof' is never calling my overloaded, overrides Equals method. Here is the...
3
4879
by: Steve Long | last post by:
I hope this isn't too stupid of a question but I'm looking for a way to change an item in a listview control when the mouse moves over it. I'd like to change its color and underline it for a probable internet link. Is there a way to do that? I've looked through the help and can't find anything that, well, helps. Perhaps I'm using the wrong control. Any help would be appreciated. Thanks Steve
6
22179
by: George | last post by:
Hi all, How can I get the value stored from the selected item and subitems of a listview? Thanks in advance, George
1
1324
by: HKSHK | last post by:
Hi guys, I have a problem with the combo box I'm writing on. What I want is custom items, which are fine so far, but when I select one the combo box shows the project name ("WindowsApplication1+ListItems")... What's wrong? The source code is below. Thanks in advance! Best regards,
3
8731
by: Bmack500 | last post by:
I have a sub, and a class. The sub is like this: Sub dothis() Dim aInfoListX As New infoWrapperClass aInfoListX.params = ReadConfig() Dim sqlCMD As New SqlCommand aInfoListX.sqlCmd = sqlCMD aInfoListX.sqlConn = New SqlClient.SqlConnection(aInfoListX.params.sqlserver) End Sub
0
9647
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10163
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
10108
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
8988
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...
1
7510
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5397
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...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4064
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
3
2894
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.