Skip to content

CopyUpToDateMarker path too long #9346

@JanKrivanek

Description

@JanKrivanek

reported by @olgaark:

We’ve recently had to change the IntDir (IntermediateOutputPath) default value for some vc projects (which made it longer by 17 chars max) and now hitting “CopyUpToDateMarker path too long” problem in some of our tests.

Bug 1900392: Unable to read the project file because the expression exceeds the OS max path limit

The item is added in MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets

So two questions:

  1. Can the path be shortened by using short(er) file name? $(MSBuildProjectFile) can be quite long and using it in other paths is often problematic. VC is currently using ShortProjectName in path’s defaults. Can something similar or Windows short 8.3 file name be used in msbuild common targets for paths too?
  2. VC projects override GetTargetPathWithTargetPlatformMoniker target where it is used in the CurrentVersion.targets’ implementation. Do we need to add it in the VC’s override?

The item in question: https://github.com/dotnet/msbuild/blob/main/src/Tasks/Microsoft.Common.CurrentVersion.targets#L392

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions