Another try to fix the build.

This commit is contained in:
Robin Krom 2021-01-28 21:49:02 +01:00
parent 6831505ead
commit 5899d97ec2
3 changed files with 8 additions and 13 deletions

View file

@ -104,7 +104,7 @@
</ItemGroup>
<!-- Add MSBuild.Community.Tasks to use the TemplateFile Task-->
<ItemGroup Condition="Exists('$(ProjectDir)$(ProjectName).Credentials.template')">
<ItemGroup>
<PackageReference Include="MSBuildTasks" Version="1.5.0.235" GeneratePathProperty="true" DevelopmentDependency="true" />
</ItemGroup>

View file

@ -1,6 +1,10 @@
<Project>
<Import Project="$(PkgMSBuildTasks)\tools\MSBuild.Community.Tasks.Targets" Condition="Exists('$(ProjectDir)$(ProjectName).Credentials.template')"/>
<PropertyGroup Condition="Exists('$(ProjectDir)$(ProjectName).Credentials.template')">
<MSBuildCommunityTasksPath>$(PkgMSBuildTasks)\tools\</MSBuildCommunityTasksPath>
</PropertyGroup>
<Import Project="$(MSBuildCommunityTasksPath)MSBuild.Community.Tasks.Targets" Condition="Exists('$(ProjectDir)$(ProjectName).Credentials.template')"/>
<Target Name="ProcessTemplates" BeforeTargets="PrepareForBuild" Condition="Exists('$(ProjectDir)$(ProjectName).Credentials.template')">
<Message Text="Processing: $(ProjectDir)$(ProjectName).Credentials.template" Importance="high"/>

View file

@ -28,22 +28,13 @@ stages:
vmImage: 'Windows-latest'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
displayName: NuGet restore
inputs:
command: 'restore'
restoreSolution: '$(solution)'
feedsToUse: config
- task: MSBuild@1
displayName: Generate templates
displayName: Restore nuget packages and generate credential templates
inputs:
solution: '$(solution)'
platform: $(buildPlatform)
configuration: $(buildConfiguration)
msbuildArguments: '/t:PrepareForBuild'
msbuildArguments: '/restore /t:PrepareForBuild'
- task: MSBuild@1
displayName: Build and package