I'm trying to create a command line MSBUILD publish on a Jenkins server with a PreBuildEvent to do a bower install. I already tried several options (see below) but the command line output just says build completed without executing the PreBuildSteps and without showing any errors.
Test1
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>True</ExcludeApp_Data>
<publishUrl>URL</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
<ExcludeFoldersFromDeployment>bower_components</ExcludeFoldersFromDeployment>
<ExcludeFilesFromDeployment>bower.json</ExcludeFilesFromDeployment>
</PropertyGroup>
<Target Name="BeforeBuild">
<Exec Command="bower-installer -silent" />
</Target>
</Project>
Test2
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<PreBuildEvent>
<Command>bower-installer -silent</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<PropertyGroup>
<PreBuildEventUseInBuild>true</PreBuildEventUseInBuild>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>True</ExcludeApp_Data>
<publishUrl>URL</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
<ExcludeFoldersFromDeployment>bower_components</ExcludeFoldersFromDeployment>
<ExcludeFilesFromDeployment>bower.json</ExcludeFilesFromDeployment>
</PropertyGroup>
</Project>
The command I'm executing is the following:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild "<PATH>\website.publishproj" /p:DeployOnBuild=true /p:PublishProfile="<PROFILE>" /p:VisualStudioVersion=14.0
Any help anyone??