找不到MSBuild发布配置文件.pubxml.user文件

时间:2020-08-21 21:48:29

标签: asp.net-mvc msbuild teamcity publish-profiles

我有这个解决方案(Project1),它有2个Web应用程序项目和3个从属库项目。主要的Web应用程序项目使用发布配置文件进行构建和部署就可以了,但是,第二个Web应用程序项目是一个API(以下标记),其发布配置文件的名称与主项目相同,但是当然它们将位于不同的位置。不幸的是,该项目将使用VS2019中的发布配置文件进行构建和部署,但是,当使用MSBuild命令(TeamCity服务器)时:

MSBuild.exe /m /p:DeployOnBuild=True /p:PublishProfile=Test /t:Rebuild

我收到以下错误:

CopyAllFilesToSingleFolderForAspNetCompileMerge:
    Creating directory "obj\Debug\AspnetCompileMerge\Source".
    Copying all files to temporary location below for package/publish:
    obj\Debug\AspnetCompileMerge\Source.
    Copying bin\KuderCore.API.dll to obj\Debug\AspnetCompileMerge\Source\bin\Project1.API.dll.
    Copying bin\KuderCore.API.pdb to obj\Debug\AspnetCompileMerge\Source\bin\Project1.API.pdb.
    Copying Areas\HelpPage\HelpPage.css to obj\Debug\AspnetCompileMerge\Source\Areas\HelpPage\HelpPage.css.
    Copying Content\bootstrap-theme.css to obj\Debug\AspnetCompileMerge\Source\Content\bootstrap-theme.css.
    Copying Content\bootstrap-theme.min.css to obj\Debug\AspnetCompileMerge\Source\Content\bootstrap-theme.min.css.
    Copying Content\bootstrap.css to obj\Debug\AspnetCompileMerge\Source\Content\bootstrap.css.
    Copying Content\bootstrap.min.css to obj\Debug\AspnetCompileMerge\Source\Content\bootstrap.min.css.
    Copying favicon.ico to obj\Debug\AspnetCompileMerge\Source\favicon.ico.
    Copying fonts\glyphicons-halflings-regular.svg to obj\Debug\AspnetCompileMerge\Source\fonts\glyphicons-halflings-regular.svg.
    Copying Global.asax to obj\Debug\AspnetCompileMerge\Source\Global.asax.
    Copying Properties\PublishProfiles\Test.pubxml.user to obj\Debug\AspnetCompileMerge\Source\Properties\PublishProfiles\Test.pubxml.user.
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VisualStudio\v16.0\Web\Transform\
        Microsoft.Web.Publishing.AspNetCompileMerge.targets(615,5): error : Copying file Properties\PublishProfiles\
        Test.pubxml.user to obj\Debug\AspnetCompileMerge\Source\Properties\PublishProfiles\
        Test.pubxml.user failed. Could not find file 'Properties\PublishProfiles\Test.pubxml.user'
    Done Building Project "Project1\Project1.API\Project1.API.csproj" (Rebuild target(s)) -- FAILED.

Build FAILED.

由于某种原因,MSBuild不会生成.user文件,而是对其进行轰炸。知道发生了什么吗?

0 个答案:

没有答案
相关问题