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

Support for linked files #6

Closed
robertbell opened this issue Sep 6, 2017 · 2 comments
Closed

Support for linked files #6

robertbell opened this issue Sep 6, 2017 · 2 comments

Comments

@robertbell
Copy link

As part of the precompilation process, the OctoPack.Precompile.targets file has a NormalizedFiles step which takes all of the collected files and makes the paths relative to the project.

This works great until one of your included files is a linked file.

The script to perform the conversion is:

"@(CollectedFiles->'%(FullPath)'->Substring($(ProjectDir.Length)))

This assumes that the collected file resides in the project directory, and would work for the following include:

<Content Include="Locale\Web.config" />

but would not work for:

<Content Include="..\Web.Shared\Content\bootstrap-custom\css\bootstrap-theme.min.css">
   <Link>Content\bootstrap-custom\css\bootstrap-theme.min.css</Link>
</Content>

as the length of the path containing directory is different to ProjectDir.Length.

An example compiler error:

C:\[Redacted Path]\packages\OctoPack.Precompile.2.0.1\build\OctoPack.Precompile.targets(51,5): error MSB3030: Could not copy the file "nt\bootstrap-custom\css\bootstrap-theme.min.css" because it was not found. [[Redacted Path]]

Please could you advise if you're aware for a workaround to this? I'd love to use your library.

@LorandBiro
Copy link
Owner

Being late is a strong understatement here, but I made it work, or at least for the test case I implemented. I'm gonna close the issue.

@LorandBiro
Copy link
Owner

LorandBiro commented Sep 26, 2018

Released in v2.1.0.

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