Freigeben über


Msbuild Dll Probing Search Path Custom

How do we make the Msbuild look in the current directory for the dlls before looking into Gac and other places .

Add something like this in your project file:

Soln 1 :  

<PropertyGroup>

<AssemblySearchPath>$(AssemblySearchPath);$(MSBuildProjectDirectory)</AssemblySearchPath>

</PropertyGroup>

or

Soln 2 :

Try this works as well .

<ItemGroup>
<CustomTaskInput Include="MyDll.dll"/>
</ItemGroup>

<Target Name="MYTarget" Inputs="@CustomTaskInput" Outputs=”abc.txt”>
<CustomTask />
</Target>

It works now, It probes the current directory for all the dll’s. Very bad that it is documented nowhere. Searched all over Msdn.

Comments