views:

433

answers:

2

Hi,

I've created a solution that includes all my projects, including the Dotfuscator projects, and setup projects. Some of the Dotfuscator projects are obfuscating only some assemblies, without affecting any of their references. When building from Visual Studio, this works great. However, when I run a team build, I get the following error:

C:\Program Files\MSBuild\PreEmptive\Dotfuscator\4.0\PreEmptive.Dotfuscator.Targets(20,3): error : Couldn't load external type because its assembly can't be found:

The external assembly is references by the assembly being obfuscated, however it is not part of the obfuscation project.

+1  A: 

The referenced assembly does not have to be part of the Dotfuscator project but it does need to be available for Dotfuscator to read. I suspect that the referenced assembly is either in the same directory as your input assemblies on your workstation, in the path of your workstation or in the GAC. It is probable that the referenced assembly is not on your build server (or is not locatable by Dotfuscator). You can provide User Defined Assembly Load Paths where Dotfuscator will additionally look when attempting to resolve referenced assemblies.

The referenced assembly will be required on the build server for Dotfuscator to successfully obfuscate and the best way is to either ensure the referenced assembly is in the same directory as the input assemblies or to use a User Defined Assembly Load Path.

Also, new in version 4.5.1200 you can have your User Defined Assembly Load Path's searched first rather than the default of searching them last.

Joe Kuemerle
Like I said, the referenced assemblies are other projects in the solution. They are usually automatically copied to the same folder of the input assemblies when I compile using Visual Studio. However, when compiling using Team Build, they don't seem to be there. I also can't use the UserDefined paths, since I don't know the path - TeamBuild changes it every compilation....
SaguiItay
A: 
Steve Johnson