Im new to Azure Devops and I have existing app consisting of portal service(web app) and desktop app in .NET which is in one solution in visual studio. What is the best way to build/publish such structured solution?
When I select asp.net as step, it builds successfully and forms zip. But I dont think the .NET serilog app is added.
When I select .NET Desktop I get message at the end:
##[warning]Directory 'D:\a\1\a' is empty. Nothing will be added to build artifact 'drop'.
I would like to publish to On prem IIS server. Below is
trigger:
- main
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'