-
Notifications
You must be signed in to change notification settings - Fork 274
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
Find-Match crashes if Onedrive synced file is missing on harddisk - Find-Match : Cannot convert value "4199968" to type "VstsTaskSdk.FS.Attributes" due to enumeration values that are not valid. Specify one of the following enumeration values and try again. #763
Comments
This issue has had no activity in 90 days. Please comment if it is not actually stale |
Issue is not fixed |
This issue has had no activity in 90 days. Please comment if it is not actually stale |
The issue is not fixed! |
Lets see if actually providing the fix speeds up the process. |
thx! |
Since the tasks actually don't care about the actual files you package with it, you can grab a copy of the files from my repo and put that in your own custom task if you need them, or use them to patch another task that depends on these changes. |
@AndreyIvanov42 please reopen and merge. |
* Adds RecallOn* file attributes Fixes #763 * Update powershell/CompiledHelpers/VstsTaskSdk.cs --------- Co-authored-by: Denis Rumyantsev <v-denisr@microsoft.com>
* Adds RecallOn* file attributes Fixes microsoft#763 * Update powershell/CompiledHelpers/VstsTaskSdk.cs --------- Co-authored-by: Denis Rumyantsev <v-denisr@microsoft.com>
Environment
azure-pipelines-task-lib version: 0.11.0
Issue Description
Find-Match crashes if Onedrive synced file is missing on harddisk
Expected behaviour
Find-Match is working properly
Actual behaviour
Find-Match : Cannot convert value "4199968" to type "VstsTaskSdk.FS.Attributes" due to enumeration values that are not valid. Specify one of the following enumeration values and try again. The
possible enumeration values are "None,Readonly,Hidden,System,Directory,Archive,Device,Normal,Temporary,SparseFile,ReparsePoint,Compressed,Offline,NotContentIndexed,Encrypted,IntegrityStream,Virtual,
NoScrubData,FirstPipeInstance,OpenNoRecall,OpenReparsePoint,PosixSemantics,BackupSemantics,DeleteOnClose,SequentialScan,RandomAccess,NoBuffering,Overlapped,Write_Through".
Steps to reproduce
The file
https://github.com/microsoft/azure-pipelines-task-lib/blob/21dac986b4c7478eb2ed8ffbd60e4fad62904438/powershell/CompiledHelpers/VstsTaskSdk.cs
contains the enum Attributes
The constants:
FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS
4194304 (0x400000)
and
FILE_ATTRIBUTE_RECALL_ON_OPEN
262144 (0x40000)
are missing.
That's the reason why this cast failes:
$attributes = [VstsTaskSdk.FS.Attributes]$findData.fileAttributes
see https://docs.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants?redirectedfrom=MSDN
After adding the two constants to the enum Find-Match is working properly
The text was updated successfully, but these errors were encountered: