title: Azure - Exclude Azure function project from pipeline
body: <p>I'm deployng my net core 2.2 app with azure pipeline</p>
  
  <p>yml:</p>
  
  <pre><code>trigger:
  - dev
  
  pool:
    vmImage: 'windows-latest'
  
  variables:
    solution: '**/*.sln'
    buildPlatform: 'Any CPU'
    buildConfiguration: 'Debug'
  
  steps:
  - task: NuGetToolInstaller@1
  
  - task: UseDotNet@2
    displayName: 'Use dotnet sdk 2.2'
    inputs:
      version: 2.x
      includePreviewVersions: false
  
  - 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:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
      platform: '$(buildPlatform)'
      configuration: '$(buildConfiguration)'
  
  - task: VSTest@2
    inputs:
      platform: '$(buildPlatform)'
      configuration: '$(buildConfiguration)'
  
  # code coverage
  - task: DotNetCoreCLI@2
    inputs:
      command: test
      projects: '**/*Tests/*.csproj'
      arguments: '--configuration $(buildConfiguration) --collect "Code coverage"'
  
  
  - script: dotnet -d ef -v migrations script --output $(Build.ArtifactStagingDirectory)\SQL\$(scriptName) --context $(dbContext)  --idempotent --project src\WorkFlowManager.EntityFrameworkCore\WorkFlowManager.EntityFrameworkCore.csproj
  
  - task: PublishBuildArtifacts@1
  </code></pre>
  
  <p>And now i've added to the solution an azure function project that i want to exclude from the build, because this last project is developed using net core 3.1 .</p>
  
  <p>I'm trying to exclude it from the pipeline with something like that:</p>
  
  <pre><code>variables:
    solution: |
      '**/*.sln'
      '!**/*Project.AzureFunction*.csproj'
    buildPlatform: 'Any CPU'
    buildConfiguration: 'Debug'
  </code></pre>
  
  <p>But the build does not works:</p>
  
  <pre><code>Starting: VSBuild
  ==============================================================================
  Task         : Visual Studio build
  Description  : Build with MSBuild and set the Visual Studio version property
  Version      : 1.166.0
  Author       : Microsoft Corporation
  Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/visual-studio-build
  ==============================================================================
  ##[error]Solution not found using search pattern ''**\*.sln'
  '!**\*WorkFlowManager.Functions.EnelGenerator*.csproj'
  '.
  Finishing: VSBuild
  </code></pre>
  
  <p>Any ideas?</p>