Is there a way to add extra global search paths?

DevInnDevInn Posts: 7
edited November 23, 2010 9:34AM in SmartAssembly 5
Is there a way to manually add extra global search paths? I've read that:
"You can add extra global search paths when you get prompted for missing references" but I'm missing references and don't see a screen to add the paths... So, is there a way to add paths before it builds and fails?

Comments

  • Hi,
    How are you building your project? The SmartAssembly UI gives you a dialog when it can't find a reference. It has a browse button you should use (this becomes a HintPath in your saproj file).
    Alex
    Developer,
    Red Gate .NET Tools
  • Well, apparently there are multiple versions of the same assembly. It is only finding one version as far as I can tell which may be why I don't get the opportunity to add additional search paths via a dialog. I'm pretty sure if I could specify additional paths it would work.
  • I see, the solution for you then is the MandatoryPath. See here:

    http://www.red-gate.com/supportcenter/C ... 121047.htm

    There is a way to specify global search paths, but it's usually not the right thing to do, a per-assembly MandatoryPath will suit you better in the long run.
    Alex
    Developer,
    Red Gate .NET Tools
  • I've seen the Mandatory Path, but what do I apply it to, the main application? I don't see the specific assembly listed in the project file. Also, there need to be multiple paths...
  • You apply the MandatoryPath to the dependency in the saproj that is being picked up from the wrong place.

    If you really want to do global search paths, you add this to the middle of your SmartAssembly.settings file (in C:\ProgramData\Red Gate\SmartAssembly):

    <DependenciesSearchPaths>
    <SearchPath>C:\Program Files\Microsoft SDKs\Silverlight\v4.0\Libraries\Client</SearchPath>
    </DependenciesSearchPaths>

    This is unsupported and not recommended though.
    Alex
    Developer,
    Red Gate .NET Tools
  • Ok, I'll try to get it working using the Mandatory Path, but thanks for the tip, I mat need it to figure out what I'm doing wrong...
Sign In or Register to comment.