Skip to content

Solution project passthrough doesn't support calling Build directly #3020

@rainersigwald

Description

@rainersigwald

Steps to reproduce

With a simple solution

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2010
MinimumVisualStudioVersion = 15.0.26124.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "proj1", "proj1\proj1.csproj", "{41A1218F-E59D-4AC9-9741-AC6356D0880B}"
EndProject
Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Release|Any CPU = Release|Any CPU
                Release|x64 = Release|x64
                Release|x86 = Release|x86
        EndGlobalSection
        GlobalSection(ProjectConfigurationPlatforms) = postSolution
                {41A1218F-E59D-4AC9-9741-AC6356D0880B}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {41A1218F-E59D-4AC9-9741-AC6356D0880B}.Release|Any CPU.Build.0 = Release|Any CPU
                {41A1218F-E59D-4AC9-9741-AC6356D0880B}.Release|x64.ActiveCfg = Release|Any CPU
                {41A1218F-E59D-4AC9-9741-AC6356D0880B}.Release|x64.Build.0 = Release|Any CPU
                {41A1218F-E59D-4AC9-9741-AC6356D0880B}.Release|x86.ActiveCfg = Release|Any CPU
                {41A1218F-E59D-4AC9-9741-AC6356D0880B}.Release|x86.Build.0 = Release|Any CPU
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
        EndGlobalSection
        GlobalSection(ExtensibilityGlobals) = postSolution
                SolutionGuid = {4CDA96E1-5FDA-460E-811F-4C2D0BF46566}
        EndGlobalSection
EndGlobal

Attempt to build the Build target of the project explicitly

msbuild simple_proj.sln /t:proj1:Build

Expected behavior

Builds the Build target in proj1.csproj

Actual behavior

C:\Users\raines\source\repos\simple_proj\simple_proj.sln.metaproj : error MSB4057: The target "proj1:Build" does not exist in the project. [C:\Users\raines\source\repos\simple_proj\simple_proj.sln]

Environment data

MSBuild 15.5.180.51428

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: Solution (.sln)Issues related to parsing .sln files or building solutionshelp wantedIssues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.triaged

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions