2017/02/15
NuGet package source設定
建置Jenkins的時候, 如果有自建的NuGet Server, 在建置CI Job時會因為找不到NuGet Server而Build失敗, 通常我們會在Jekinkes上裝Visual Studio然後設定完NuGet的Package Source後, 再重新建置就會成功
但這裡有個方法可以解決這個問題
到Jenkins主機上, 在%ProgramData%\NuGet\下, 新增NuGetDefaults.config, 把自建的NuGet Server加進去就OK了
PS C:\ProgramData\nuget> Get-ChildItem .\NuGetDefaults.config | select fullname
FullName
--------
C:\ProgramData\nuget\NuGetDefaults.config
PS C:\ProgramData\nuget> cat .\NuGetDefaults.config
<configuration>
<packageSources>
<add key="mynuget" value="http://nuget.mynuget/nuget" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
PS C:\ProgramData\nugget>
Updated:
可以直接用 nuget command line 做設定
訂閱:
張貼留言 (Atom)
-
一個糖果有一個糖果紙 一個糖果1元 現在商店在作促銷 3個糖果紙可以換1個糖果 請問 15元最多可以吃幾個糖果?
-
內容取自 Producthunt =============================== "What's a tool that changed your life?" - us to freelancers on Twitt...
-
## Use appcmd ### List application pool (find the apppool name) ``` C:\Windows\System32\inetsrv\appcmd.exe list apppool ==== the result ==...
沒有留言:
張貼留言