首页 > 解决方案 > TFS 构建成功,但为什么没有将任何内容部署到目标系统文件夹

问题描述

我正在尝试在 VS 2017 中创建 TFS 版本。这是一个 Web 部署。我已经能够成功创建并运行构建,但是当我检查目标系统的文件夹时,没有任何更新。另一方面,如果我按下 Visual Studio 中的“发布”按钮,我可以让它工作。正如您在下面看到的,我已经验证了我的连接。

我的 TFS 进程中是否缺少任何东西,特别是在我缺少的 MSBuild 参数中?或者它是我在 Visual Studio 中发布配置文件中的内容?另外,有什么地方可以检查一些日志吗?我检查了 Inetpub 下的日志,但什么也没看到。

以下是我的发布配置文件配置:

<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <WebPublishMethod>MSDeploy</WebPublishMethod>
    <LastUsedBuildConfiguration>KFSS_DEV</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <SiteUrlToLaunchAfterPublish />
    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
    <ExcludeApp_Data>False</ExcludeApp_Data>
    <MSDeployServiceURL>bushknapp03dev.chicagobooth.edu</MSDeployServiceURL>
    <DeployIisAppPath>kiltsfiles-dev.chicagobooth.edu</DeployIisAppPath>
    <RemoteSitePhysicalPath />
    <SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
    <MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
    <EnableMSDeployBackup>True</EnableMSDeployBackup>
    <UserName>gsb\ssa-ap-devapps</UserName>
    <_SavePWD>True</_SavePWD>
    <PublishDatabaseSettings>
      <Objects>
        <ObjectGroup Name="KiltsFileSelectionSystemConnectionString" Order="1" Enabled="False">
          <Destination Path="" />
          <Object Type="DbDacFx">
            <PreSource Path="Data Source=bushkndb01dev;Initial Catalog=KiltsFileSelectionSystem;Integrated Security=True" includeData="False" />
            <Source Path="$(IntermediateOutputPath)AutoScripts\KiltsFileSelectionSystemConnectionString_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
          </Object>
          <UpdateFrom Type="Web.Config">
            <Source MatchValue="Data Source=bushkndb01dev;Initial Catalog=KiltsFileSelectionSystem;Integrated Security=True" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
          </UpdateFrom>
        </ObjectGroup>
        <ObjectGroup Name="KiltsFileSelectionSystemEntities" Order="2" Enabled="False">
          <Destination Path="" />
          <Object Type="DbDacFx">
            <PreSource Path="Data Source=bushkndb01dev;Initial Catalog=KiltsFileSelectionSystem;Integrated Security=True;Application Name=EntityFramework" includeData="False" />
            <Source Path="$(IntermediateOutputPath)AutoScripts\KiltsFileSelectionSystemEntities_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
          </Object>
          <UpdateFrom Type="Web.Config">
            <Source MatchValue="metadata=res://*/KiltsFilesModel.csdl|res://*/KiltsFilesModel.ssdl|res://*/KiltsFilesModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=bushkndb01dev;initial catalog=KiltsFileSelectionSystem;integrated security=True;multipleactiveresultsets=True;App=EntityFramework&quot;" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
          </UpdateFrom>
        </ObjectGroup>
        <ObjectGroup Name="TelerikVSXConnectionString" Order="3" Enabled="False">
          <Destination Path="" />
          <Object Type="DbDacFx">
            <PreSource Path="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\TelerikVSX.mdf;Integrated Security=True;User Instance=True" includeData="False" />
            <Source Path="$(IntermediateOutputPath)AutoScripts\TelerikVSXConnectionString_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
          </Object>
          <UpdateFrom Type="Web.Config">
            <Source MatchValue="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\TelerikVSX.mdf;Integrated Security=True;User Instance=True" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
          </UpdateFrom>
        </ObjectGroup>
        <ObjectGroup Name="ApplicationServices" Order="4" Enabled="False">
          <Destination Path="" />
          <Object Type="DbDacFx">
            <PreSource Path="Data Source=bushkndb01dev;Initial Catalog=aspnetdb;Integrated Security=True" includeData="False" />
            <Source Path="$(IntermediateOutputPath)AutoScripts\ApplicationServices_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
          </Object>
          <UpdateFrom Type="Web.Config">
            <Source MatchValue="Data Source=bushkndb01dev;Initial Catalog=aspnetdb;Integrated Security=True" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
          </UpdateFrom>
        </ObjectGroup>
      </Objects>
    </PublishDatabaseSettings>
    <PrecompileBeforePublish>True</PrecompileBeforePublish>
    <EnableUpdateable>True</EnableUpdateable>
    <DebugSymbols>False</DebugSymbols>
    <WDPMergeOption>DonotMerge</WDPMergeOption>
  </PropertyGroup>
  <ItemGroup>
    <MSDeployParameterValue Include="KiltsFileSelectionSystemConnectionString-Web.config Connection String">
      <UpdateDestWebConfig>False</UpdateDestWebConfig>
    </MSDeployParameterValue>
    <MSDeployParameterValue Include="$(DeployParameterPrefix)KiltsFileSelectionSystemEntities-Web.config Connection String" />
    <MSDeployParameterValue Include="$(DeployParameterPrefix)TelerikVSXConnectionString-Web.config Connection String" />
    <MSDeployParameterValue Include="ApplicationServices-Web.config Connection String">
      <UpdateDestWebConfig>False</UpdateDestWebConfig>
    </MSDeployParameterValue>
  </ItemGroup>
</Project>

这是我的 TFS 构建的结果:

我在 KFSS_DEV 下设置了我的发布配置文件,验证了与目标系统的连接。

在此处输入图像描述

在此处输入图像描述

此外,这是 TFS 构建过程:

在此处输入图像描述

标签: tfsmsbuildvisual-studio-2017

解决方案


尝试将日志记录详细程度设置为,并在构建定义中diagnostic添加参数。/p:OutDir="xxxxx"

顺便说一句,建议从 XAML 构建迁移到新构建


推荐阅读