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

[System.IO.FileShare] does not contain a method named 'op_Addition' #178

Closed
lefoimpeur opened this issue Apr 15, 2019 · 7 comments
Closed
Assignees
Labels

Comments

@lefoimpeur
Copy link

lefoimpeur commented Apr 15, 2019

I have another similar issue with "Start-GSDriveFileUpload" :
Start-GSDriveFileUpload : Method invocation failed because [System.IO.FileShare] does not contain a method named 'op_Addition'

@scrthq
Copy link
Member

scrthq commented Apr 15, 2019

Thanks for letting me know, @lefoimpeur ! Couple questions so I can dig in a little better:

  • What's the full command you're running? Feel free to replace anything sensitive with a dummy variable value.
  • Does the command fail immediately or does it appear to be working then fail after some time?
  • How many files are you trying to upload at once or is this a single file?

@scrthq scrthq self-assigned this Apr 15, 2019
@scrthq scrthq added the bug label Apr 15, 2019
@lefoimpeur
Copy link
Author

  • Full command : Start-GSDriveFileUpload -Path $Export_File -Parents $Destination_Folder_ID -Wait
  • Fail immediately
  • Only one file

@scrthq
Copy link
Member

scrthq commented Apr 16, 2019

Thank you for the additional details, @lefoimpeur !! Should have a fix for you by tomorrow night once I have some time =]

@lefoimpeur
Copy link
Author

Hi @scrthq,
Did you have time to work on the fix ?

@scrthq
Copy link
Member

scrthq commented Apr 24, 2019

hey @lefoimpeur - I have the fix for this sorted =], just working on getting a couple other pending fixes/features included that have been delaying this overall. Should hopefully have a new version published tonight with this fix, I'll definitely let you know though!

For reference, the issue is that PS4 doesn't handle adding the enum values for [System.IO.FileShare]. You can replicate the error with the following line, fixed line right after for comparison (validated fix in my PS2.0 VM):

# Current code (works fine in PS5+)
[System.IO.FileShare]::Delete + [System.IO.FileShare]::ReadWrite

# Updating to the following (works in PS2.0+)
[System.IO.FileShare]"Delete, ReadWrite"

scrthq added a commit that referenced this issue Apr 25, 2019
## 2.26.2

* [Issue #177](#177)
  * Added: Fields parameter to Get-GSDriveFileList
* [Issue #178](#178)
  * Fixed: Start-GSDriveFileUpload failing on PowerShell 4.0
* [Issue #179](#179)
  * Added: Ims parameter to both New-GSUser and Update-GSUser
  * Added: Add-GSUserIm function to create correct type for new Ims parameter.
* Miscellaneous
  * Added: Clear-PSGSuiteServiceCache to clear the cache and dispose of any remaining open web clients.
  * Improved overall service caching.
  * Added: Support for Cloud-Identity licenses for Get-GSUserLicense
  * Added: OutputType for all applicable Helper functions (i.e. Add-GSUserIm)
scrthq added a commit that referenced this issue Apr 25, 2019
## 2.26.2

* [Issue #177](#177)
  * Added: `Fields` parameter to `Get-GSDriveFileList`
* [Issue #178](#178)
  * Fixed: `Start-GSDriveFileUpload` failing on PowerShell 4.0
* [Issue #179](#179)
  * Added: `Ims` parameter to both `New-GSUser` and `Update-GSUser`
  * Added: `Add-GSUserIm` function to create correct type for new `Ims` parameter.
* Miscellaneous
  * Added: `Clear-PSGSuiteServiceCache` to clear the cache and dispose of any remaining open web clients.
  * Improved overall service caching.
  * Added: Support for `Cloud-Identity` licenses for `Get-GSUserLicense`
  * Added: `OutputType` for all applicable Helper functions (i.e. `Add-GSUserIm`)
scrthq added a commit that referenced this issue Apr 25, 2019
## 2.26.2

* [Issue #177](#177)
  * Added: Fields parameter to Get-GSDriveFileList
* [Issue #178](#178)
  * Fixed: Start-GSDriveFileUpload failing on PowerShell 4.0
* [Issue #179](#179)
  * Added: Ims parameter to both New-GSUser and Update-GSUser
  * Added: Add-GSUserIm function to create correct type for new Ims parameter.
* Miscellaneous
  * Added: Clear-PSGSuiteServiceCache to clear the cache and dispose of any remaining open web clients.
  * Improved overall service caching.
  * Added: Support for Cloud-Identity licenses for Get-GSUserLicense
  * Added: OutputType for all applicable Helper functions (i.e. Add-GSUserIm)
@scrthq
Copy link
Member

scrthq commented Apr 25, 2019

Hey @lefoimpeur - v2.26.2 is out now with this fix. Please try it out and let me know if you're still having any issues! Thanks for your patience!

@lefoimpeur
Copy link
Author

Hi @scrthq , really good, It works !
Thank you

@ghost ghost removed the pending UAT label Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants