RE: Project References (repost with fixed msdn alias)



Hello Adrian,

Thanks for your posting! I can see the mentioned problem.

Actually, there are two scenarios when we reference an assembly in our
project. These two scenarios cause different modifications into the .csproj
file.

1. If we reference an assembly from some IDE known places. It will only add
the assembly general information into the project file without its
location. For example, if we navigate to .NET tab in the Add Reference
dialog and choose Microsoft.VisualStudio.Tools.Applications.Runtime.9.0,
click OK. The following line will be added into the .csproj file

<Reference
Include="Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0,
Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a,
processorArchitecture=MSIL" />

2. If we reference an assembly from IDE NOT known places. For example, we
navigate to Browse tab in the Add Reference dialog, and go to C:\Program
Files\, choose AjaxControlToolkit, and click OK. Then, the referenced
assembly will appear in the Visual Studio with location information,

<Reference Include="AjaxControlToolkit, Version=3.0.20820.16598,
Culture=neutral, PublicKeyToken=28f01b0e84b6d53e,
processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\Program
Files\AjaxControlToolkit.dll</HintPath>
</Reference>

All the location information is hard written. So the Program Files folder
will not be redirected to Program Files(x86) folder in x64 system machine.
Therefore, the mentioned issue occurs.

So our solution is putting the AjaxControlToolkit assembly in the IDE known
places. So the .csproj file does not keep the location information. It
leaves the job to IDE to find the right place to get that assembly. The
most famous IDE known folder for assemblies is,

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies

In the x64 machine, we need to put the AjaxControlToolkit into
C:\Program Files(x86)\Microsoft Visual Studio
9.0\Common7\IDE\PublicAssemblies

After check out the project from the VSS, IDE reads the .csproj file and
will search the AjaxControlToolkit.dll in C:\Program Files(x86)\Microsoft
Visual Studio 9.0\Common7\IDE\PublicAssemblies by default.

Please let me know if you have any future questions on this. Have a nice
day!


Best regards,
Colbert Zhou (colbertz@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • RE: Trying to get reference from the GAC
    ... I had assumed there was a way to say "look in the GAC" without giving it the ... the system assemblies seems be particularly ... I don't think it is safe to redirect the reference ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.vsnet.general)
  • Re: Assembly.Load(string name)
    ... i had a reference to this assembly from this ... the component and moved it to web app and it work. ... "How the Runtime Locates Assemblies" ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Odd problem with Visual Studio
    ... > If I launch one copy of the IDE, then I can usually compile the project at ... > sharing a couple of the assemblies. ... I did locate one circular reference that ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Hintpath vs referencepath?
    ... described in the IDE's help doc, "Reference Path" are used by the VS.NET ... IDE to load all the assembliy references when the Project is loaded into ... the IDE will build the project, it'll locate the assemblies which is ... For .net framework CLR's runtime assembly locating, ...
    (microsoft.public.dotnet.general)
  • RE: Deploying multiple EXEs using the basic publish mechanism of
    ... What error message did you get when adding reference from the project tab? ... The CLR distinguishes assemblies by file name, ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.general)

Loading