Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide shorter path to an unmanaged API. #1548

Merged
merged 1 commit into from
Oct 30, 2017
Merged

Provide shorter path to an unmanaged API. #1548

merged 1 commit into from
Oct 30, 2017

Conversation

sunahe
Copy link
Contributor

@sunahe sunahe commented Aug 29, 2017

This should avoid DirectoryNotFoundException if CurrentDir+RelattivePath is longer than max path length.

This should avoid DirectoryNotFoundException if CurrentDir+RelattivePath is longer than max path length.
@sunahe
Copy link
Contributor Author

sunahe commented Aug 29, 2017

Should fix #1544

@ericstj
Copy link
Member

ericstj commented Sep 8, 2017

/cc @dsplaisted

@@ -42,8 +43,9 @@ internal static bool GetFileDependsOnNETStandard(string filePath)
{
// on Windows use CLR's unmanaged metadata API.
// Create the metadata dispenser and open scope on the source file.
var filePathAbsolute = Path.GetFullPath(filePath);
Copy link
Member

@ericstj ericstj Sep 8, 2017

Choose a reason for hiding this comment

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

@dsplaisted do you think we should do this here or in https://github.com/dotnet/sdk/blob/master/src/Tasks/Common/src/ItemUtilities.cs#L113?

Also, it may be better to first check IsPathRooted first for performance. The MSBuild code this is based off of does that: https://github.com/Microsoft/msbuild/blob/ab090d1255caa87e742cbdbc6d7fe904ecebd975/src/Tasks/AssemblyDependency/ReferenceTable.cs#L407-L414

@ericstj
Copy link
Member

ericstj commented Sep 8, 2017

Thanks for this contribution!

@nguerrera
Copy link
Contributor

@dotnet-bot test this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants