Restore fails, if lock is disabled, but lock file exists #10599
-
DescriptionHi! It's more like a question than an issue actually. If I have lock mode disabled, but
EnvironmentMicrosoft Visual Studio Community 2019 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi! Given this is a question about using the product, I'm moving it to the Discussions area. |
Beta Was this translation helpful? Give feedback.
-
The error message 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. That being said, I think you are looking for |
Beta Was this translation helpful? Give feedback.
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.