question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

restore force does not properly clear FileListAbsolute

See original GitHub issue

Description

paket restore -f does not clear obj\release\netstandard2.0<project name>.fsproj.FileListAbsolute.txt, but rather it appears to rely on appending to the file.

For most purposes this does not seem to cause problems, but some corner cases will fail. Specifically, the build target in my build script works, but it fails in doc generation looking for the wrong path to document templates.

Repro steps

I sync my source repos between 2 machines. The root paths on the machines differ.

paket restore on machine 1

go to machine 2, paket restore -f

Expected behavior

All files should be initialized for machine 2

Actual behavior

Paths to both machine 1 and machine 2 are in file

<machine 1 root>\DependentTypes\src\DependentTypes\bin\Release\netstandard2.0\DependentTypes.deps.json
<machine 1 root>\DependentTypes\src\DependentTypes\bin\Release\netstandard2.0\DependentTypes.dll
<machine 1 root>\DependentTypes\src\DependentTypes\bin\Release\netstandard2.0\DependentTypes.pdb
<machine 1 root>\DependentTypes\src\DependentTypes\bin\Release\netstandard2.0\DependentTypes.xml
<machine 1 root>\DependentTypes\src\DependentTypes\obj\Release\netstandard2.0\DependentTypes.fsprojAssemblyReference.cache
<machine 1 root>\DependentTypes\src\DependentTypes\obj\Release\netstandard2.0\DependentTypes.dll
<machine 1 root>\DependentTypes\src\DependentTypes\obj\Release\netstandard2.0\DependentTypes.xml
<machine 1 root>\DependentTypes\src\DependentTypes\obj\Release\netstandard2.0\DependentTypes.pdb
<machine 2 root>\DependentTypes\src\DependentTypes\bin\Release\netstandard2.0\DependentTypes.deps.json
<machine 2 root>\DependentTypes\src\DependentTypes\bin\Release\netstandard2.0\DependentTypes.dll
<machine 2 root>\DependentTypes\src\DependentTypes\bin\Release\netstandard2.0\DependentTypes.pdb
<machine 2 root>\DependentTypes\src\DependentTypes\bin\Release\netstandard2.0\DependentTypes.xml
<machine 2 root>\DependentTypes\src\DependentTypes\obj\Release\netstandard2.0\DependentTypes.fsprojAssemblyReference.cache
<machine 2 root>\DependentTypes\src\DependentTypes\obj\Release\netstandard2.0\DependentTypes.dll
<machine 2 root>\DependentTypes\src\DependentTypes\obj\Release\netstandard2.0\DependentTypes.xml
<machine 2 root>\DependentTypes\src\DependentTypes\obj\Release\netstandard2.0\DependentTypes.pdb

Known workarounds

Manually clear obj folders.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
davkeancommented, Jul 24, 2018

FileListAbsolute is an attempt at listing files produced in past and future builds so that Clean will clean them up. It is not consumed (only produced) during a normal build, you can see its usage here: https://github.com/Microsoft/msbuild/blob/b3f9eeab651c92bade6e4f64d11b59aa39e149cb/src/Tasks/Microsoft.Common.CurrentVersion.targets#L5011. If you have a bug where the documentation generation step is getting the wrong file, it’s unlikely to be from this file.

0reactions
jackfoxycommented, Jul 24, 2018

Come to think of it, bottom up is also an incorrect strategy. The right thing to do is test for path existence, not just pattern matching.

Read more comments on GitHub >

github_iconTop Results From Across the Web

msbuild - What is the proper way to add a file to XYZ.csproj. ...
OK, I found it. Just add the file to the FileWrites item list, like this:
Read more >
Chronic problem checking in even when clearing cache
I unbound the Valid binds in VS 2010 and rebinded and when doing so I was forced to login to the Vault server...
Read more >
'The process cannot access the file' during CI build ...
This has been happening a few times recently. It's odd because BlazorTemplates.Tests doesn't depend on Microsoft.DotNet.Web.Spa.
Read more >
Pro Addins not working anymore once built with MSVS 2019
Solved: Hello, I have a toolbar Addin which stopped working once we moved from Visual Studio 2017 to VS 2019.
Read more >
Troubleshooting NuGet Package Restore in Visual Studio
You may encounter build errors due to missing files, with a message saying to use NuGet restore to download them. However, running a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found