Reporter | Alexander Groß (alexandergross) |
---|---|
Created | Nov 3, 2010 3:26:24 PM |
Updated | Feb 16, 2012 12:47:44 PM |
Priority | Major |
Type | Bug |
Fix versions | Next |
State | Open |
Assignee | Alexey Kuptsov (alexey.kuptsov) |
Subsystem | Quick Fixes |
Affected versions | 5.1.1 |
Fixed in build | No Fixed in build |
When you add a reference by usitng the Alt+Enter quick fix, ReSharper adds following snippet to the project file:
Compare this to what VS will add when you use the "Add reference" dialog:
The important difference is the <HinPath> element that contains information where VS/MSBuild finds the assembly on disk. Without <HinPath>, VS selects some DLL that matches the reference. The "automatic search" behavior has caused a lot of problems for us when opening a clean solution (no bin\Debug directories) or if we run builds on the CI server. One typical thing we see is references with with a yellow warning symbol that turns off when we build the solution for the first time. Most often, it doesn't build at all because VS was not able to find the references DLL.
External references should only be pulled from the "lib" and "tools" folders in the project's root directory, and we do not want VS to pull assemblies from any other path (except the GAC).
<Reference Include="Machine.Specifications, Version=0.3.0.0, Culture=neutral, PublicKeyToken=5c474de7a495cff1, processorArchitecture=MSIL" />
Compare this to what VS will add when you use the "Add reference" dialog:
<Reference Include="Machine.Specifications"> <HintPath>..\..\..\..\tools\Machine.Specifications\Machine.Specifications.dll</HintPath> </Reference>
The important difference is the <HinPath> element that contains information where VS/MSBuild finds the assembly on disk. Without <HinPath>, VS selects some DLL that matches the reference. The "automatic search" behavior has caused a lot of problems for us when opening a clean solution (no bin\Debug directories) or if we run builds on the CI server. One typical thing we see is references with with a yellow warning symbol that turns off when we build the solution for the first time. Most often, it doesn't build at all because VS was not able to find the references DLL.
External references should only be pulled from the "lib" and "tools" folders in the project's root directory, and we do not want VS to pull assemblies from any other path (except the GAC).