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

Error when clicking Add Prig Assembly #78

Open
gorgsenegger opened this issue Oct 7, 2016 · 3 comments
Open

Error when clicking Add Prig Assembly #78

gorgsenegger opened this issue Oct 7, 2016 · 3 comments

Comments

@gorgsenegger
Copy link

gorgsenegger commented Oct 7, 2016

I get the following error on a German Windows 7 Professional with an English edition of Visual Studio 2013 Premium Update 5 when I right click on a referenced assembly and choose Add Prig Assembly:


Ausnahme beim Festlegen von "CurrentDirectory": "Die Syntax für den
Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.
"
In C:\ProgramData\chocolatey\lib\Prig\tools\Import-PrigSetupSession.ps1:149
Zeichen:17

  •             [System.Environment]::CurrentDirectory = $PWD
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : NotSpecified: (:) [], SetValueInvocationException
  • FullyQualifiedErrorId : ExceptionWhenSetting

The English translation of the error message is something like
Exception when setting CurrentDirectory: The syntax for the file name, directory name or the volume label is wrong.

I also get the same error when I then right click on a prig file and choose Edit Prig Indirection Settings.

@urasandesu
Copy link
Owner

I have never tested in German Windows, sorry 😨
It seems that the error message indicates the problem that depends on the locale. I'll try checking.

@urasandesu
Copy link
Owner

Please accept my apology for the delay in reporting.

I have prepared German Windows and tried it(I could not get Windows 7 and Visual Studio 2013, so I tried the step in Windows 10 and Visual Studio 2015). However, I could not reproduce the issue. Could you give me additional information? For example,

  • Your *.sln file path
  • The assembly that you want to Add Prig Assembly

By the way, I guess that the problem depends on the file path, but I cannot believe that $PWD returns invalid path, because the API is one of standard in PowerShell. If it is true, we probably should report that to MS PowerShell team, shouldn't we? 😅

@iforapsy
Copy link

I have gotten this error when $PWD is set to a network path. In those cases, $PWD will be of the form Microsoft.PowerShell.Core\FileSystem::\\file-system-server\file-system. I moved forward by changing the line from

[System.Environment]::CurrentDirectory = $PWD

to

[System.Environment]::CurrentDirectory = Convert-Path $PWD

However, later in the script, it attempts to load a DLL from this path. This will fail because Windows prevents loading DLLs from network paths for security reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants