[GH-ISSUE #64] When build is execute nuget.exe is not found #55

Closed
opened 2026-02-26 00:31:38 +03:00 by kerem · 6 comments
Owner

Originally created by @TobiasKi on GitHub (Feb 26, 2016).
Original GitHub issue: https://github.com/hirschmann/nbfc/issues/64

I am in Powershell console and execute Build.ps1. The error is that nuget.exe can not be found as part of a CmdLet, Function or script. But nuget.exe is in the directory from which I execute build.ps1 :(

Originally created by @TobiasKi on GitHub (Feb 26, 2016). Original GitHub issue: https://github.com/hirschmann/nbfc/issues/64 I am in Powershell console and execute Build.ps1. The error is that nuget.exe can not be found as part of a CmdLet, Function or script. But nuget.exe is in the directory from which I execute build.ps1 :(
kerem 2026-02-26 00:31:38 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@hirschmann commented on GitHub (Feb 26, 2016):

nuget.exe should be in the nbfc directory, otherwise it will not work.
From which location did you execute the script?

<!-- gh-comment-id:189310880 --> @hirschmann commented on GitHub (Feb 26, 2016): nuget.exe should be in the nbfc directory, otherwise it will not work. From which location did you execute the script?
Author
Owner

@Hornstrom commented on GitHub (Mar 18, 2016):

I'm also having trouble executing the build script. Navigated to C:\Users\horns\nbfc in powershell where the git command placed the files and did .\build.ps1 to run the script. There is a nuget.exe in that folder. Am I doing something wrong? At the top it says this:

nuget.exe : The term 'nuget.exe' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\horns\nbfc\build.ps1:10 char:1

  • nuget.exe restore
  • - CategoryInfo          : ObjectNotFound: (nuget.exe:String) [], CommandNotFoundException
    - FullyQualifiedErrorId : CommandNotFoundException
    

And at the end it says this:

Suggestion [3,General]: The command nuget.exe was not found, but does exist in the current location. Windows PowerShell
does not load commands from the current location by default. If you trust this command, instead type: ".\nuget.exe". See
"get-help about_Command_Precedence" for more details.

There is something like 85 build errors while it tries to execute the script but I'm guessing thats because nuget dosen't execute correctly?

<!-- gh-comment-id:198307625 --> @Hornstrom commented on GitHub (Mar 18, 2016): I'm also having trouble executing the build script. Navigated to C:\Users\horns\nbfc in powershell where the git command placed the files and did .\build.ps1 to run the script. There is a nuget.exe in that folder. Am I doing something wrong? At the top it says this: > nuget.exe : The term 'nuget.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. > Check the spelling of the name, or if a path was included, verify that the path is correct and try again. > At C:\Users\horns\nbfc\build.ps1:10 char:1 > - nuget.exe restore > - ~~~~~~~~~ > - CategoryInfo : ObjectNotFound: (nuget.exe:String) [], CommandNotFoundException > - FullyQualifiedErrorId : CommandNotFoundException And at the end it says this: > Suggestion [3,General]: The command nuget.exe was not found, but does exist in the current location. Windows PowerShell > does not load commands from the current location by default. If you trust this command, instead type: ".\nuget.exe". See > "get-help about_Command_Precedence" for more details. There is something like 85 build errors while it tries to execute the script but I'm guessing thats because nuget dosen't execute correctly?
Author
Owner

@hirschmann commented on GitHub (Mar 22, 2016):

Like the suggestion says, powershell does not load commands from the current location.
On my system powershell behaves differently (the build script works), so I couldn't reproduce your error.

Nevertheless, I fixed the build script, so it should work on your system: d94512ad56

Thanks for your bug report!

<!-- gh-comment-id:200066883 --> @hirschmann commented on GitHub (Mar 22, 2016): Like the suggestion says, powershell does not load commands from the current location. On my system powershell behaves differently (the build script works), so I couldn't reproduce your error. Nevertheless, I fixed the build script, so it should work on your system: d94512ad560949c2444472b723a756585fe42f6a Thanks for your bug report!
Author
Owner

@TobiasKi commented on GitHub (Mar 30, 2016):

Thanks. With the latest fix in the script nuget.exe can be found. However, when I run the buildscript I get another issue now. It's saying that ".NETFramework,Version=v4.5,Profile=Mono" can not be found. There more details saying that Mono.Posix-Assembly can not be found as well. On my system .NET 4.0 is installed. When I download the package from the link given on your repository landing page, it's saying that I can not continue because it is included in my system already. 3.9.1208.0 on my system as well (seems to be the latest version).

<!-- gh-comment-id:203434975 --> @TobiasKi commented on GitHub (Mar 30, 2016): Thanks. With the latest fix in the script nuget.exe can be found. However, when I run the buildscript I get another issue now. It's saying that ".NETFramework,Version=v4.5,Profile=Mono" can not be found. There more details saying that Mono.Posix-Assembly can not be found as well. On my system .NET 4.0 is installed. When I download the package from the link given on your repository landing page, it's saying that I can not continue because it is included in my system already. 3.9.1208.0 on my system as well (seems to be the latest version).
Author
Owner

@hirschmann commented on GitHub (Mar 30, 2016):

The issue is caused by a litte workaround I used to build the plugins for Linux on Windows (just to see if it works ;)).

Should be fixed now: 6db1df3ec7

<!-- gh-comment-id:203621191 --> @hirschmann commented on GitHub (Mar 30, 2016): The issue is caused by a litte workaround I used to build the plugins for Linux on Windows (just to see if it works ;)). Should be fixed now: 6db1df3ec7cf56615dbfbe64ba37c0e51148cce5
Author
Owner

@TobiasKi commented on GitHub (Apr 4, 2016):

Yes, thank you. It is the fix!

<!-- gh-comment-id:205196728 --> @TobiasKi commented on GitHub (Apr 4, 2016): Yes, thank you. It is the fix!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nbfc-hirschmann#55
No description provided.