簡體   English   中英

當我使用管道在azure devop上構建csproj文件時,為什么沒有創建bin和obj文件夾?

[英]Why are bin and obj folders not getting created when I am building a csproj file on azure devops using pipeline?

我正在使用管道在Azure開發運營上構建C#點網項目。 構建成功運行,但是在構建之后,我需要在工件中查看項目的bin和obj文件夾,在此處需要拾取編譯的dll,但是不會創建bin和obj文件夾。 以下是管道yaml代碼中的build命令:

- task: VSBuild@1
  inputs:
   solution: 'C#\Ignify.eComIntegration\EventLogger\EventLogger.csproj'
   msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package 
   /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true 
   /p:PackageLocation="$(build.artifactStagingDirectory)"'
   platform: '$(buildPlatform)'
   configuration: '$(buildConfiguration)' 

另外,下面給出的是csproj文件中的代碼的一部分:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>d:\a\1\s\C#\Ignify.eComIntegration\EventLogger\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

請建議如何做才能創建文件夾。

您的構建任務只是創建一個要部署在$(build.artifactStagingDirectory)文件夾中的包。 您需要添加其他構建步驟來復制其他文件: 復制文件任務 像這樣:

- task: CopyFiles@2 displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' inputs: Contents: | **\\bin\\** **\\obj\\** TargetFolder: '$(Build.ArtifactStagingDirectory)'

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM