0

I have created one build definition for one of csproj as below.

enter image description here

I am getting nuget restore related error in build process with this definition, can anyone please help me to resolve this issue?

enter image description here

[Update]

As per suggestion provided in comment I have updated to "**\*.sln" then it has worked but i am getting errors as below

enter image description here

Arun Rana
  • 8,426
  • 14
  • 67
  • 107
  • 1
    Did you try to put the .sln file instead of "packages.config"? – Shayki Abramczyk Aug 06 '18 at 13:27
  • As i put .sln it's succeed but error in build solution task for all assembly in that csproj. like Error CS0246: The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?) – Arun Rana Aug 06 '18 at 13:41
  • @ShaykiAbramczyk It has worked but not i am getting few other errors , please see my updated question – Arun Rana Aug 06 '18 at 14:17
  • Are you using host build agent or your own agent, suggest you also add system.debug=true in your variable to get more detail log info for troubleshooting. – PatrickLu-MSFT Aug 07 '18 at 11:30
  • host build , will check with debug= true – Arun Rana Aug 07 '18 at 11:31

1 Answers1

0

For the new issue, add a powershell script task in your build definition to import the certification.

$pfxpath = 'pathtoees.pfx'
$password = 'password'

Add-Type -AssemblyName System.Security
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
$cert.Import($pfxpath, $password, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]"PersistKeySet")
$store = new-object system.security.cryptography.X509Certificates.X509Store -argumentlist "MY", CurrentUser
$store.Open([System.Security.Cryptography.X509Certificates.OpenFlags]"ReadWrite")
$store.Add($cert)
$store.Close()

Refer to this question for details: Visual studio team services deploymen/buildt certificate error

Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60