Skip to content

PublishAot publish will fail if filepaths are too long on Windows #32044

Open
@nagilson

Description

@nagilson

Trying to publish a new console application where the files are too long appear to cause an invalid rpc file to be generated when PublishAot is used.

To repro.. create a test in the sdk that does a publish with PublishAot and give it an absurdly long name. I have one already in this commit ef50ea6 where you can observe the test passes when the name is made shorter 7d7f707. (DesiredPublishPropertiesImplySelfContainedForFrameworkDepedentDefaultFrameworks)
There are a few more changes in there, take the 2nd commit and use the old name listed above.

The errors will be something like

LINK : fatal error LNK1104: cannot open file 'bin\Release\net8.0\win-x64\native\DesiredPublishPropertiesImplySelfContainedForFrameworkDepedentDefaultFrameworks.exe

and

"foo.rsp" exited with code -2147483645.

cc @LakshanF Thanks for taking a look at this with me.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions