Is there a way to add extra global search paths?

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, Alex.Davies, melvyn.harbour

Is there a way to add extra global search paths?

Postby DevInn » Mon Nov 22, 2010 10:43 pm

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?
DevInn
 
Posts: 5
Joined: Sun Nov 21, 2010 8:25 pm

Postby Alex.Davies » Tue Nov 23, 2010 10:43 am

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
Alex.Davies
 
Posts: 335
Joined: Tue Dec 02, 2008 12:23 pm
Location: Cambridge, uk

Postby DevInn » Tue Nov 23, 2010 1:30 pm

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.
DevInn
 
Posts: 5
Joined: Sun Nov 21, 2010 8:25 pm

Postby Alex.Davies » Tue Nov 23, 2010 2:56 pm

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
Alex.Davies
 
Posts: 335
Joined: Tue Dec 02, 2008 12:23 pm
Location: Cambridge, uk

Postby DevInn » Tue Nov 23, 2010 3:03 pm

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...
DevInn
 
Posts: 5
Joined: Sun Nov 21, 2010 8:25 pm

Postby Alex.Davies » Tue Nov 23, 2010 3:08 pm

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
Alex.Davies
 
Posts: 335
Joined: Tue Dec 02, 2008 12:23 pm
Location: Cambridge, uk

Postby DevInn » Tue Nov 23, 2010 3:34 pm

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...
DevInn
 
Posts: 5
Joined: Sun Nov 21, 2010 8:25 pm


Return to SmartAssembly 5

Who is online

Users browsing this forum: No registered users and 1 guest