We are trying to setup CI in Visual studio environment using TFS.
Environment:
Windows 10
Microsoft Visual Studio 2017
MSVSTFS V 16.12
NuGet V 4.0
Getting below error:
https://api.nuget.org/v3/index.json:
Unable to load the service index for source https://api.nuget.org/v3/index.json.
An error occurred while sending the request.
The remote name could not be resolved: 'api.nuget.org'
Went through many links shared in the community by the developers which were of truly great help to understand the issue.
Some of my workarounds:
http://skolima.blogspot.ru/2012/07/nuget-proxy-settings.html
This explained about NuGet.config settings to be done
NuGet Behind Proxy
Very resourceful stackoverflow chain, I followed the steps of creating a NuGet.config like exactly mentioned here and my config file looked of the form:
I am behind a company's firewall and we are trying to setup CI/CD pipeline.
In TFS:
I am sure this a firewall proxy setting issue. Since I am able to access "api.nuget.org" out of the network.
Can someone suggest what is missing in NuGet.config to which i am pointing? Any other inputs free to share.
Yes, if you want to use Nuget behind Proxy, you should follow the steps in Nuget.config
Since you have post the workaround above, however still get the error info in TFS.
You should make sure you also changed the Nuget.config in your build agent/server. Win+R and enter
%appdata%\nuget to get the file location.
Try to build directly through visual studio on the server instead of through TFS. This will narrow down if the issue is related to your environment or TFS side.
Moreover, you could also Verbose Output to get more detail log info for troubleshooting: Enable Verbose Debug Mode for TFS Build vNext
Related
I have following tools installed on my machine:
TFS 2017
Visual Studio 2017
MSBuild 14.0
In my application, I'm using some C#6 elements like string interpolation ($).
When I try to build it, controller says that it could not resolve the symbol.
Builds fail for both XAML and standard definitions.
In build logs, there's an information that it uses correct MSBuild 14.0 path: C:\Program Files (x86)\MSBuild\14.0\bin, but still failes to resolve C#6 elements.
I would really appreciate if you would help me with this problem, I've searched entire internet and found nothing :/
If you guys need any information, I'll be more than happy to provide it. Thank you.
TFS with XAML build is just using MSBuild to run the build. You could first try to use MSBuild command to run the build test locally, which will narrow down the issue.
If it works well on your dev machine and not works from a TFS server build. Very likely the environment problem.
To make sure the build successful, you should keep your build server environment the same with your local environment. Please double check this.
For trouble shooting, you could try to remote to your build agent, manually run your build and test on your build agent.
As for how to enable C#6, you could also refer this similar question, modify TFSBuildServiceHost.exe.config file which may do the trick. How do I enable C# 7 builds in Team Foundation Server 2015?
If you still get error, please include detail build failed logs here.
In Visual Studio 2017 I'm trying to connect to the nuget server to update some stuff, but I'm getting this error:
[nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json.
An error occurred while sending the request.
Unable to connect to the remote server
My work PC is behind some proxy because in Connections > Lan Settings > Use Automatic Configuration Script, there's this address: http://autoproxy.SomeDomain.com/autoproxy.cgi
If I uncheck this, I won't have access to the internet.
The odd thing is that I can see the contents of https://api.nuget.org/v3/index.json in a browse, but VS2017 cannot connect to it.
What alternatives do I have? Can I download the nuget package manually and just update using VS2017?
What alternatives do I have? Can I download the nuget package manually and just update using VS2017?
To resolve this issue, you can try to add proxy settings into Nuget.Config file which store in C:\Users\<user name>\AppData\Roaming\NuGet.
Refer to this link for details: Nuget Config Section & Nuget Proxy Settings.
Besides, if above not help you. Since you can access the contents of https://api.nuget.org/v3/index.json in a browse, you can create a local feed for those packages, so that you can save the downloaded the nuget package and just update using VS2017.
How to create you local feed and how to use the local feed, please check the details from my another answer.
Hope this helps.
Open the Windows "Proxy Settings" and verify that the proxy settings are set to automatic or if you use a .dat configuration that it is valid and not cached (somehow).
If none works try explicitly setting a new and valid proxy in the nuget.config file to force it going to the one you know that works.
I have a Visual Studio solution which initially came from the company's VSTS Git repo. The solution contains multiple projects including web and webapi projects. They use the local web server and local SQL Server.
When I am not connected to my company's network, Visual Studio 2017 gets stuck while loading one of the projects. I went through the *proj files and didn't see anything referencing something outside my local paths. I turned off NuGet's checking for downloading missing packages or trying to download packages as one of NuGet's sources is a company server.
I am unable to find the reason why VS gets stuck. While being stuck and I connect to the company's network using VPN, it continues loading the projects.
Is there a way to troubleshoot this and find the cause? Can VS create some kind of a useful log file?
I am facing an issue of permsission related to .nuget while I am using build definition of TFS 2013.
I have already applied 'Enable NuGet Package Restore' option in my Visual Studio solution.
(I am using latest version of NuGet package manager.)
I am getting an error mentioned as given screenshot.
Thanks in advance!
Your build service was set to run with LOCAL SERVICE account. Right click on C:\Builds and make sure it has full permissions on that folder. Alternatively run the build service as a domain user account (e.g. DOMAIN-NAME\tfsbuild) or NETWORK SERVICE.
I've read other articles similar to this such as this one but I have been unable to resolve this on my TFS 2013 config. I upgraded TFS 2012 Update 3 to TFS 2013 then moved it to another server as I needed a setup with SQL Server 2012. I didn't have any issues with TFS 2012 but after upgrading to TFS 2013 I'm getting an error in the build system. The builds complete as "Partially Succeeded" as the actual builds complete but I get the following error:
An error occurred while copying diagnostic activity logs to the drop location. Details: Internal Server Error
There is a similar inquiry on Microsoft Connect here but I don't know how the OP resolved it.
I've checked permissions, added full control permissions to the user that the build service runs under, NETWORK SERVICE, etc. I added this permission to various areas, I'm not sure exactly which one needs it i.e. the build folder, the drop folder, the TFS application tier area, or what. I don't see any helpful information in the Windows Event Logs or TFS debug log. I'm out of ideas on how to resolve this.
Any help would be appreciated. And this TFS setup does not use Active Directory as I'm the sole user/developer in this config and small biz.
Thank you
EDIT
I installed SQL 2012, Visual Studio 2013, TFS 2013 to a new server, added one solution ran a build and the exact same errors occurred. I'll have to open a case on Microsoft Connect.
if this is a share folder, configure the share in the ComputerSettings. in the "Shared Folder" configure the Share in the Security Tab and the Publishment Options
I never found a fix to this issue, however, after moving to a new server and installing SQL 2014 and TFS 2013 Update 2 and following this guide http://msdn.microsoft.com/en-us/library/ms404869.aspx all is working perfect.