Skip to content

Restore fails, if lock is disabled, but lock file exists #10599

Answered by nkolev92
uladz-zubrycki asked this question in Q&A
Discussion options

You must be logged in to vote

If I have lock mode disabled

The error message Invalid restore input where RestorePackagesWithLockFile property is set to false but a packages lock file exists suggests that you are trying to disable lock files altogether, and not locked mode.

The opt in experience for lock files is the existence of a lock file or that property being true.

Setting that property to true + having a lock file is not usually a state you'd want to be in on purpose.
If you want to disable lock files, deleting the file is a necessity.

That being said, I think you are looking for RestoreLockedMode which is what controls the locking functionality.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@uladz-zubrycki
Comment options

@kartheekp-ms
Comment options

Answer selected by nkolev92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #10597 on February 24, 2021 21:45.