-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix #1435 - calculation of ResolvedPath for project references #1442
Conversation
The old implementation combined the relative `<ProjectReference Include="..." />` path with the directory of the `ProjectAssetFile`. Corrected this to combine the relative project reference with the current's project path.
The code before the change does look wrong. I'm trying to understand why this wasn't reported sooner. The repro steps in #1435 don't seem out of the ordinary. @dsplaisted @livarcocc |
@nguerrera this was being tracked with #479 |
@natidea #1435 says the build is failing due to this. @BrunoJuchli Do you have anything custom reading this ResolvedPath ? |
@nguerrera In my case there's no project.json involved. This pertains a direct-reference, not a transitive one. The csproj of the project being built contains a Full source code here: https://github.com/BrunoJuchli/StaticProxy.Fody/tree/7d8b924d90759cb3248803514ba631463358494a/ note: there's two solutions. The relevant is StaticProxy.Fody.sln And yes, there's something custom reading the resolved path: Fody. The (Not that the reason for bringing this issue up is not to make Fody work, or work any better, it's just how I stumbled upon the issue of there being an invalid path). I also doubt that this change is correct. As stated in the entry-post I'm unsure whether |
@natidea @nguerrera
Hence only the consumers will "fail", but a standard build-config without any custom code won't "fail" - it just produces invalid output for external consumers. |
…0200508.1 (dotnet#1442) - Microsoft.AspNetCore.Analyzers: 5.0.0-preview.5.20256.9 -> 5.0.0-preview.5.20258.1 - Microsoft.AspNetCore.Mvc.Analyzers: 5.0.0-preview.5.20256.9 -> 5.0.0-preview.5.20258.1 - Microsoft.AspNetCore.Components.Analyzers: 5.0.0-preview.5.20256.9 -> 5.0.0-preview.5.20258.1 - Microsoft.AspNetCore.Mvc.Api.Analyzers: 5.0.0-preview.5.20256.9 -> 5.0.0-preview.5.20258.1 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
See #479 and #1435 for error description and analysis of the problem. In short:
The old implementation combined the relative
<ProjectReference Include="..." />
path with the directory of theProjectAssetFile
.Corrected this to combine the relative project reference with the current's project path.
Questions:
Path.GetFullPath
)