I have created a .target file to be imported into .csproj files. This target file imports MSBuild.ExtensionPack.tasks. When run from the commandline the ExtensionPack task gets executed fine, but if I run the build from inside visual studio the target still runs but it skips the extension task.
Here is the target file:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0">
<PropertyGroup>
<TPath>$(MSBuildProjectDirectory)\..\Contrib\ExtensionPack\4.0\MSBuild.ExtensionPack.tasks</TPath>
</PropertyGroup>
<Import Project="$(TPath)"/>
<Target Name="FindWSFiles">
<MSBuild.ExtensionPack.FileSystem.FindUnder TaskAction="FindFilesAndDirectories" Path="$(MSBuildProjectDirectory)" SearchPattern="*WS*">
<Output ItemName="AllFoundItems" TaskParameter="FoundItems"/>
</MSBuild.ExtensionPack.FileSystem.FindUnder>
<Message Text="$(MSBuildProjectDirectory)" Importance="high"/>
<Message Text="===== Found Files and Directories =====" Importance="high"/>
<Message Text="AllFoundItems:%0d%0a@(AllFoundItems,'%0d%0a')"/>
</Target>
<Target Name="GenerateWSBin" BeforeTargets="CoreCompile" DependsOnTargets="FindWSFiles">
<Message Text="GenerateWSBin" Importance="high" />
</Target>
<Target Name="GenerateWSHooks" BeforeTargets="CoreCompile" DependsOnTargets="FindWSFiles">
<Message Text="GenerateWSHooks" Importance="high"/>
</Target>
</Project>
How can I get the MSBuild.ExtensionPack task to execute inside of visual studio?
Ah this was a silly mistake on my part. I forgot to include Importance="high"
inside <Message Text="AllFoundItems:%0d%0a@(AllFoundItems,'%0d%0a')" />
This caused the output to be suppressed inside visual studio.