dotnet/msbuild

Solution project passthrough doesn't support calling Build directly

Open

#3,020 opened on 2018年2月22日

GitHub で見る
 (3 comments) (3 reactions) (0 assignees)C# (1,364 forks)batch import
Area: Solution (.sln)help wantedtriaged

Repository metrics

Stars
 (5,062 stars)
PR merge metrics
 (平均マージ 11d 7h) (30d で 125 merged PRs)

説明

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

コントリビューターガイド