azure-pipelines - Azure Pipeline 和 .NET Framework 项目
问题描述
当我们尝试部署 .NET Framework 应用程序时,我们遇到了以下问题(使用链接项目):
##[warning]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\amd64\Microsoft.Common.CurrentVersion.targets(781,5): Warning : The OutputPath property is not set for project 'Efs.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Release' Platform='Any CPU'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.
我的 .csproj 文件具有以下内容:
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<AzureFunctionsVersion>v1</AzureFunctionsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
yml 文件如下:
variables:
- name: BuildParameters.RestoreBuildProjects
value: >-
**/FunctionAppEfs.csproj
- name: solution
value: >-
Web/FunctionAppEfs/FunctionAppEfs.csproj
- name: buildPlatform
value: >-
Any CPU
- name: buildConfiguration
value: >-
Release
trigger:
branches:
include:
- refs/heads/development
- refs/heads/master
batch: True
name: $(date:yyyyMMdd)$(rev:.r)
resources:
repositories:
- repository: self
type: git
ref: refs/heads/development
jobs:
- job: Phase_1
displayName: Agent job 1
timeoutInMinutes: 0
pool:
vmImage: vs2017-win2016
steps:
- checkout: self
- task: NuGetToolInstaller@0
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: GitVersion@5
inputs:
runtime: 'full'
- task: MSBuild@1
inputs:
solution: '$(solution)'
msbuildArchitecture: 'x64'
msbuildArguments: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: PublishBuildArtifacts@1
displayName: 'Publish artifacts'
inputs:
PathtoPublish: $(build.artifactstagingdirectory)
ArtifactName: 'PublishBuildArtifacts'
...
怎么了?
解决方案
推荐阅读
- javascript - useEffect - 跟踪变量未更改时的无限循环
- amazon-web-services - 指标在普罗米修斯中不可见
- reactjs - 我想在引导反应表2中使用get api id onclick按钮重定向页面
- javascript - 我如何将密钥插入 js 数组以转换为 json
- python - pandas 根据 sep=' ' 拆分不工作
- python - 在 python 中更新一行中的打印结果并同时更新其进度条
- android - 如何通过代码(动态)将子级添加到 GridLayout?
- php - 如何在“测试”环境中启用“开发”包,以便它们在测试期间可用?
- image - 将文件上传到 Message Bird API
- mysql - 在一对多的 MySQL 关系中,我如何确定父母的孩子的属性是否在所有父母中都不是唯一的?