views:

54

answers:

2

Hi, I have a 3rd party non-signed assembly that I want to reference in several projects. So I created a snippet to add the reference and the relative imports

I tried the following, and several variations with full paths, without file:// etc, to no avail. Any ideas?

...
<Snippet>
    <References>
        <Reference>
            <Assembly>MyAssemly.dll</Assembly>
            <Url>file://C:\Program Files\MyProduct</Url>
        </Reference>
    </References>
    <Imports>
        <Import>
...
A: 

Local references can be made by adding reference and browsing to the assembly location.

nitroxn
Yes, thanks. I wasnt to do that *in a snippet* definition though.
Mau
+1  A: 

No happy answers here. The URL element is there only for F1 help. The Assembly element must be a simple name or a fully qualified assembly name.

The bigger obstacle is that the <Reference> element still has not been implemented in the C# IDE. It is the subject of this old feedback item. It is closed as "Postponed" which offers some hope that this will actually work some day. They may actually make absolute path names work.

Add your vote to the feedback item, they do pay attention to that.

Hans Passant
Done. Thanks :-)
Mau