Skip to content

Commit

Permalink
Updating to include publish profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
sayedihashimi committed Mar 6, 2013
1 parent 9c4d98e commit af521ef
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
11 changes: 10 additions & 1 deletion PublishOnlyOne/ProjA/ProjA.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\PublishProfiles\siteone - FTP.pubxml" />
<None Include="Properties\PublishProfiles\siteone - Web Deploy.pubxml" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
Expand All @@ -76,6 +75,11 @@
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>

<PropertyGroup>
<DeployOnBuild Condition=" '$(DeployProjA)'!='' ">$(DeployProjA)</DeployOnBuild>
</PropertyGroup>

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
Expand All @@ -97,11 +101,16 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>

<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<Target Name="Custom" AfterTargets="Build">
<Message Text="DeployOnBuild: $(DeployOnBuild)" Importance="high"/>
<Message Text="DeployProjA: $(DeployProjA)" Importance="high"/>
</Target>
</Project>
4 changes: 4 additions & 0 deletions PublishOnlyOne/publish-ProjA.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
echo This command will fail because ProjB does not have a publish profile named 'siteone - Web Deploy'
echo This script assumes that the Web Deploy password is set at %password%
%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe PublishOnlyOne.sln /p:Configuration=Release /p:VisualStudioVersion=11.0 /p:DeployOnBuild=true /p:PublishProfile="siteone - Web Deploy" /p:Password=%password%

4 changes: 4 additions & 0 deletions PublishOnlyOne/publish-sln.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
echo This command will fail because ProjB does not have a publish profile named 'siteone - Web Deploy'
echo This script assumes that the Web Deploy password is set at %password%
%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe PublishOnlyOne.sln /p:Configuration=Release /p:VisualStudioVersion=11.0 /p:DeployOnBuild=true /p:PublishProfile="siteone - Web Deploy" /p:Password=%password%

0 comments on commit af521ef

Please sign in to comment.