Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / March 2008

Tip: Looking for answers? Try searching our database.

Setting path to assembly in item template

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gary Varga - 05 Mar 2008 12:26 GMT
I have an item template that adds a reference to an assembly. This assembly
will not be in the GAC so I wanted to set the path to the assembly as this
would not be in the project directories.

I discovered that the
VSTemplate\TemplateContent\References\Reference\Assembly element would work
with the path to the assembly file, however, the file exists under the
Program Files directory which may be on any drive and will be "Program Files
(x86)" on a 64 bit Windows installation.

Is there a way to set the Reference Path of the project or, perhaps, another
way to do this?
Signature

Many thanks,
Gary Varga

Michel LAPLANE (MVP) - 06 Mar 2008 17:34 GMT
You must modify also your .csproj file at the <Reference> node in adding the
HintPath Characteristic in the node
Underneath is the explain link in the VS2008 help
   ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.fr/dv_fxgenref/html/1eba3721-cc12-4b80-9987-84923ede5e2e.htm
Enjoy with VS2008
>I have an item template that adds a reference to an assembly. This assembly
> will not be in the GAC so I wanted to set the path to the assembly as this
[quoted text clipped - 11 lines]
> another
> way to do this?
Gary Varga - 07 Mar 2008 08:23 GMT
Thank you for your response Michel. I knew about hint paths but have not been
able to do this with a template. Perhaps I should have been more clear as to
the scenario.

As this is basically a template to distribute, to other people having given
them an MSI to install the templates and the aforementioned assembly, I was
hoping that the template mechanism supported this. Can I set the hint path in
the template?
Signature

Many thanks,
Gary Varga

> You must modify also your .csproj file at the <Reference> node in adding the
> HintPath Characteristic in the node
[quoted text clipped - 16 lines]
> > another
> > way to do this?
Michel LAPLANE (MVP) - 10 Mar 2008 08:41 GMT
There is no way to pass a parameter form MSI to template unless to add
customized action in the MSI.
You can look at the VSI format files recommanded for distributing templates
for Visual Studio. Look in the help.
Anjoy with VS2008
> Thank you for your response Michel. I knew about hint paths but have not
> been
[quoted text clipped - 34 lines]
>> > another
>> > way to do this?
Gary Varga - 10 Mar 2008 11:00 GMT
It appears the solution is to add it under the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx
registry key
(HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx on 64 bit Windows) - please note .Net version is in the path.

If you add a new key set to displayable name and set its (Default) to a
REG_SZ containing the full path to the assembly this will resolve the
situation. Searching for the key provides many resources on the web.
Signature

Many thanks,
Gary Varga

> There is no way to pass a parameter form MSI to template unless to add
> customized action in the MSI.
[quoted text clipped - 39 lines]
> >> > another
> >> > way to do this?
Michel LAPLANE (MVP) - 11 Mar 2008 09:13 GMT
Thanks.
I have learn new think today.
Enjoy with VS
> It appears the solution is to add it under the
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx
[quoted text clipped - 58 lines]
>> >> > another
>> >> > way to do this?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.