[Mono-devel-list] [PATCH] Reworked unified Locale classes

stephen at covidimus.net stephen at covidimus.net
Wed Jun 15 16:00:26 EDT 2005


>> in MCS we have:
>>
>>                <File
>>                    RelPath = "CryptoConvert.cs"
>>                    Link =
>> "..\class\corlib\Mono.Security.Cryptography\CryptoConvert.cs"
>>                    SubType = "Code"
>>                    BuildAction = "Compile"
>>                />
>>
>> Maybe that would work.

>This does not work in VS.NET. Files has to be in the directory or
>subdirectories of the project.

For the record, that is not correct; the grandparent is right.  It's a
common misconception that VS.Net requires all files to be in subdirectories
of the project dir, b/c by default VS.Net copies files there when you add
them, but that Link attribute in the <File> element above _does_ reference
another file elsewhere rather than making a local copy, and VS.Net knows
what to do with it.  Files that exist within a subdirectory of the project
dir don't have a Link attribute; its sole use is to link in files from other
directories.  VS shows a little shortcut overlay on the icon in Solution
Explorer to show that it's a link to another place.  Other than that,
working with the file is the same as any non-linked file in VS.  It's like
making a symlink within the folder that only VS can see.

To link a file into your project, rather than copying it there, you just
have to select "Link File" instead of "Open File" in the "Add Existing Item"
dialog.  The full procedure, starting w/ the context menu on a project, is
this:

Add->Add Existing Item -- Select File -- Click _down arrow_ next to Open
button->Link File.






More information about the Mono-devel-list mailing list