Nuget.config not found for version 0.25
- Dominant language
- C#
- Stars
- 4.2k
- Forks
- 778
- Avg merge
- 1h 15m
- Merged PRs (30d)
- 19
Description
### What You Are Seeing?
in Diagnostic log: Nuget.config not found.
### What is Expected?
Nuget.config being next to build.ps1 should be used.
### What version of Cake are you using?
0.25
### Are you running on a 32 or 64 bit system?
windows server 2012 r2, 64bit.
### What environment are you running on? Windows? Linux? Mac?
windows server 2012 r2, 64bit.
### Are you running on a CI Server? If so, which one?
TFS v. 15.117.26615.0 on premise.
powershell task: PowerShell on Target Machines v.1.*
But the error looks like generic.
### How Did You Get This To Happen? (Steps to Reproduce)
1. Put the following files here: c:\some\path\
Nuget.config
```
```
build.ps1
from here: https://raw.githubusercontent.com/cake-build/cake/develop/build.ps1
build.cake
```
#addin nuget:?package=Cake.Git;
Task("Clean")
.Does(() =>
{
Information("Do something");
}
);
RunTarget(target);
```
2. Execute this command (yes being in c:\ as TFS does it also like that):
Invoke-Expression "c:\some\path\build.ps1 -Script C:\some\path\build.cake -Verbosity Diagnostic"
### Output Log
~~~sh
PS C:\> Invoke-Expression "c:\some\path\build.ps1 -Script C:\some\path\build.cake -Verbosity Diagnostic"
Preparing to run build script...
Running build script...
Module directory does not exist.
NuGet.config not found.
Analyzing build script...
Analyzing C:/some/path/build.cake...
Processing build script...
Installing addins...
~~~
So even though latest (0.25 https://cakebuild.net/blog/2018/01/cake-v0.25.0-released) change in cake provided nuget client inside cake.exe, I think it should still look for nuget.config in cake.exe directory or above up to drive directory. The documentation: https://docs.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior#how-settings-are-applied
Contributor guide
Research direction
Reproduce the issue with build.ps1, build.cake, and the provided PowerShell command on Cake 0.25. Trace how Cake reports "NuGet.config not found" during add-in installation, then verify that the NuGet.config beside build.ps1 is discovered according to the documented search behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100