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)
- Put the following files here: c:\some\path
Nuget.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<activePackageSources>
<clear />
</activePackageSources>
<packageSources>
<clear />
</packageSources>
<disabledPackageSources>
<clear />
</disabledPackageSources>
</configuration>
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);
- 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
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
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)
Nuget.config
build.ps1
from here: https://raw.githubusercontent.com/cake-build/cake/develop/build.ps1
build.cake
Invoke-Expression "c:\some\path\build.ps1 -Script C:\some\path\build.cake -Verbosity Diagnostic"
Output Log
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