错误:无法找到项目输出组'来自Web(活动)的内容文件的输出'

ERROR: Cannot find outputs of project output group 'Content Files from Web (Active)'

I just tried to implement automate build of our project on server, I use devenv to build vdproj project on jenkins. Everything is fine when I use devenv command line in local vm. Project is using VS2017 to build and also using 2017 to develop.

But things get weird when I use same command line on server

devenv c:\jenkins\workspace\ABC\ABC.sln /Rebuild Release /Project WebInstaller\WebInstaller.vdproj /ProjectConfig Release

When I run it on server, it failed when validate vdproj project, error message shows:

------ Starting pre-build validation for project 'WebInstaller' ------

WARNING: All custom dialogs must precede the 'Installation Folder' dialog.

ERROR: Cannot find outputs of project output group 'Content Files from Web (Active)'. Either the group, its configuration, or its project may have been removed from the solution.

ERROR: Cannot find outputs of project output group 'Primary output from Web (Active)'. Either the group, its configuration, or its project may have been removed from the solution.

------ Pre-build validation for project 'WebInstaller' completed ------

Just don't know why this happen, I download same workspace from jenkins and build local, it works fine.

There's may be a clue that I find Web project always cannot build when build solution.

devenv /Rebuild Release /Project Web\Web.csproj c:\jenkins\workspace\ABC\ABC.sln

The message shows nothing is build after run this on server:

Microsoft Visual Studio 2017 Version 15.0.27004.2002.

Copyright (C) Microsoft Corp. All rights reserved.

========== Rebuild All: 0 succeeded, 0 failed, 0 skipped ==========

It builds nothing for Web Project.

Does anyone encounter same issue or has any thoughts on this?

Our project suffered the same issue, in Visual Studio 2015.

Build Server: Windows 10 Pro, build 1607. CI Agent: CruiseControl.NET. VS: Visual Studio Pro, Update 3 with VS Installer Projects Extension. IIS: Not installed.

The problem manifested in solution files that contained Assembly project(s), WinForms project(s), Web project(s), and Setup project(s) when built using the task in CC.NET. The project builds without fail when from within the IDE on the CI server (and all developer machines).

Examination of 'Diagnostic' build logs provided no information as to why this one project was being skipped.

[Devenv (rather than MSBuild) is required to build the setup project(s). We don't have mixed solutions without setup projects, so it is not clear if this issue would manifest using MSBuild tasks.]

After much frustration over this and establishing that a test solution made with freshly created, empty projects of the various types would build correctly, we compared the solution and project files.

Long, painful story short, setting the <UseIIS> tag to 'True' in the web project(s) seems to fix the issue for our environment.

  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <UseIIS>True</UseIIS>

It is unclear why this worked for us.

Of course, our files are checked into source control with this tag as 'False' (developers typically use IISExpress, and no, setting the <UseIISExpress> tag to 'True' did not help), so automating a change to this element became another step for the CI server.

For God's sake thanks so much!!! This methods also works for me and now jenkins can build my vdproj project successfully. This issues block me over two months and hope this may help someone else.Thanks for help! But still hope if anyone knows why this may affect server build actions and hope msbuild can handle vdproj one day instead of devenv.