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

Dependent folders' names incorrectly truncated #11

Open
jnpwly opened this issue Nov 26, 2018 · 1 comment
Open

Dependent folders' names incorrectly truncated #11

jnpwly opened this issue Nov 26, 2018 · 1 comment

Comments

@jnpwly
Copy link

jnpwly commented Nov 26, 2018

We have a solution that contains several different projects. Only one of these projects needs to be precompiled prior to packaging by OctoPack. During the processing carried out by OctoPack.Precompile, a list of NormalizedFiles is created, from the @(CollectedFiles). However, this line in the OctoPack.Precompile.targets file is, I think, inadvertently truncating paths that are outside the project folder heirarchy:

<DestinationPath>$(OctoPackPrecompileIntermediateOutputPath)$([System.String]::Copy('%(FullPath)').Substring($(ProjectDir.Length)))</DestinationPath>

For example, my .csproj is dependent on other projects within our solution, and has project references such as:

    <ProjectReference Include="..\DSSCommon\DSSCommon.csproj">
      <Project>{1606CFDC-D60A-4920-8FEB-E5C09168AA54}</Project>
      <Name>DSSCommon</Name>
    </ProjectReference>

This results in files being copied into a directory such as obj\Release\PrecompiledIntermediate\mmon. I suspect the use of $(ProjectDir.Length) when making a relative path is the cause of this issue.

@LorandBiro
Copy link
Owner

It's not clear for me how to reproduce this issue.
Linked files should be supported. (You can see that a few lines below the referenced code.) Also there's a simple unit test that checks whether the path is properly determined. Clearly your situation is different than what I prepared for.

Could you create and share a sample repository that I can check?

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

No branches or pull requests

2 participants