Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,873
    • Issues 3,873
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 20
    • Merge requests 20
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #21440
Closed
Open
Created Nov 13, 2020 by Ansgar Röber@Isengart

VCEnd is not a valid batch label for C# project Pre-/Post-Build event

Unlike Microsoft.CppCommon.Targets (VS 2019, line 132), which wraps incoming commands with :VCEnd, Microsoft.Common.CurrentVersion.targets (VS 2019, line 1325), which seems to be used for CSharp projects, does not add :VCEnd.

This leads to an unnecessary additional error message when generating these commands by using CMake as the VS generator adds jumps to VCEnd which does not exist for C# projects.

I think the generator should be fixed to either remove these jumps for C# projects or add the label itself somehow.

The attached sample project contains C# and C++ projects with failing prebuilt event. When generating for VS and executing the build the CSharp project will generate the following additional error message (caused by the VS generator)

The system cannot find the batch label specified - VCEnd

Files:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets

CmakeIssue.7z

Edited Nov 13, 2020 by Ansgar Röber
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking