Add New Item

  • Thread starter Thread starter Guido Rooms
  • Start date Start date
G

Guido Rooms

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
 
* "Guido Rooms said:
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.
 
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.
 
Guido Rooms said:
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
 
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".
 
* "Guido Rooms said:
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.
 
Guido Rooms said:
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
 
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
 
Back
Top