Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Support long paths in CoreCLR runtime on Windows #3433

Merged
merged 1 commit into from
Mar 1, 2016

Conversation

JohnChen0
Copy link

The CoreCLR runtime is updated to support long file paths on Windows.
Pending updates to mscorlib.dll, the following scenarios are supported:

  • Run managed apps from a long path.
  • Load CoreCLR runtime and framework from a long path.
  • Load user assemblies from a long path.
  • Run CrossGen from a long path, with its input/output from a long path.
  • Generate debug log file at a long path.

The following scenarios are not yet supported, and will be fixed in
future commits:

  • Mscorlib.dll and framework assemblies are not yet long path compatible.
    Note that until mscorlib.dll is fixed, most of the runtime changes can't
    actually be used.
  • Support on non-Windows platforms.
  • Support for debugging and error reporting.
  • Tools such as ilasm or ildasm.

The CoreCLR runtime is updated to support long file paths on Windows.
Pending updates to mscorlib.dll, the following scenarios are supported:
* Run managed apps from a long path.
* Load CoreCLR runtime and framework from a long path.
* Load user assemblies from a long path.
* Run CrossGen from a long path, with its input/output from a long path.
* Generate debug log file at a long path.

The following scenarios are not yet supported, and will be fixed in
future commits:
* Mscorlib.dll and framework assemblies are not yet long path compatible.
  Note that until mscorlib.dll is fixed, most of the runtime changes can't
  actually be used.
* Support on non-Windows platforms.
* Support for debugging and error reporting.
* Tools such as ilasm or ildasm.
@JohnChen0
Copy link
Author

@ramarag @gkhanna79 @JeremyKuhne PTAL

@gkhanna79
Copy link
Member

LGTM

@JeremyKuhne
Copy link
Member

lgtm


// Copy the directory path
::wcsncpy_s(m_hostDirectoryPath, m_hostPath, lastBackslashIndex + 1);
m_hostDirectoryPath.Set(m_hostPath, m_hostPath.Begin(), lastBackslash + 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can probably use the functionality of CopySystemDirectory like in :

if (SUCCEEDED(CopySystemDirectory(CoreClrFolder, CoreClrFolder)))

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I didn't realize CopySystemDirectory really means "get path from file name". It seems to be mis-named.

For this particular case, I still need to find the location of the last backslash, since I need it to create m_hostExeName below. Given that, there seems to be no more advantage to use CopySystemDirectory.

@ramarag
Copy link
Member

ramarag commented Mar 1, 2016

Except for the above comment, LGTM

JohnChen0 pushed a commit that referenced this pull request Mar 1, 2016
Support long paths in CoreCLR runtime on Windows
@JohnChen0 JohnChen0 merged commit ce83861 into dotnet:master Mar 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants