I have 2 version of Visual Studio (2013 and 2015) on my computer, and since I installed VS2013 it was not able to connect to any nuget.org package source.
I do not connect to internet through a proxy.
I tried to clean the nuget cache and reinstall the nuget package manager in both version of visual studio already.
C:\Users{user}\AppData\Roaming\NuGet\nuget.Config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<activePackageSource>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</activePackageSource>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
When I tried to restore or install any package, VS keeps loading and after some minutes the message is:
With VS2015:
[nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json.
Error al enviar la solicitud.
No es posible conectar con el servidor remoto.
Se produjo un error durante el intento de conexión ya que la parte conectada no respondió adecuadamente tras un periodo de tiempo, o bien se produjo un error en la conexión establecida ya que el host conectado no ha podido responder 10.115.8.100:8080
With VS2013:
Unable to connect to the remote server
Please check that whether it has the nuget.org package source in your VS IDE, you could add it back if it doesn't have.
Reference:
VS2015 nuget package manager not finding packages
Please also make sure that you use the latest update and NuGet version:
Related
I'm using nuget.exe 3.4.4 and trying to download a nuget package with is protected (private) (access only allow for certain members of the team). But it gives me Unable to resolve package_name error. Public repositories can be download without issue. if I use jfrog.exe to download the same package which is protected, it works without issue.
Is there a restriction in nuget to download protected packages?
Command
A:\Nuget\3.4.4\nuget.exe restore C:\Temp\tmp\project.json -NoCache -NonInteractive -PackagesDirectory A:\Packages -ConfigFile C:\Temp\tmp\nug.config
project.json
{"dependencies": {"nuget_package_name": "package_version"}, "frameworks": {"45": {}}}
nu.config
<?xml version='1.0' encoding='utf-8'?>
<configuration>
<packageSources>
<add key="Artifactory0" value="https://myartifactory_server.com/artifactory/api/nuget/package_name" />
</packageSources>
<packageSourceCredentials>
<Artifactory0>
<add key="Username" value="username" />
<add key="ClearTextPassword" value="password" />
</Artifactory0>
</packageSourceCredentials>
</configuration>
I'm answering my own question, to help if anyone face this issue in future
Artifactory version: 6.8.7
Buy setting force authentication flag to 1 for that repository helps to solve this issue
I have tried to setup the Continuous Integration (CI) in VSTS for the ASP.NET core project developed using Devextreme.
I have checked the NuGet.config file in the project, seems the devextreme-controls-netcore is referred from the local machine.
NuGet.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="devextreme-controls-netcore" value="C:\Program Files (x86)\DevExpress 17.1\DevExtreme\System\DevExtreme\Bin\AspNetCore" />
</packageSources>
</configuration>
I have created a build definition in VSTS for this project and queued a build. I am getting error while restoring the packages.
Log file from VS:
2017-11-17T11:26:33.0089440Z ##[section]Starting: Restore
2017-11-17T11:26:33.0279221Z ==============================================================================
2017-11-17T11:26:33.0279221Z Task : .NET Core
2017-11-17T11:26:33.0279221Z Description : Build, test and publish using dotnet core command-line.
2017-11-17T11:26:33.0279221Z Version : 1.0.2
2017-11-17T11:26:33.0279221Z Author : Microsoft Corporation
2017-11-17T11:26:33.0279221Z Help : [More Information](https://go.microsoft.com/fwlink/?linkid=832194)
2017-11-17T11:26:33.0279221Z ==============================================================================
2017-11-17T11:26:34.6038344Z [command]"C:\Program Files\dotnet\dotnet.exe" restore d:\a\3\s\DevExtremeAspNetCoreApp\DevExtremeAspNetCoreApp.csproj
2017-11-17T11:26:42.2434595Z Restoring packages for d:\a\3\s\DevExtremeAspNetCoreApp\DevExtremeAspNetCoreApp.csproj...
2017-11-17T11:26:42.2434595Z Restoring packages for d:\a\3\s\DevExtremeAspNetCoreApp\DevExtremeAspNetCoreApp.csproj...
2017-11-17T11:26:42.2434595Z C:\Program Files\dotnet\sdk\2.0.2\NuGet.targets(102,5): **error : The local source 'C:\Program Files (x86)\DevExpress 17.1\DevExtreme\System\DevExtreme\Bin\AspNetCore' doesn't exist.** [d:\a\3\s\DevExtremeAspNetCoreApp\DevExtremeAspNetCoreApp.csproj]
2017-11-17T11:26:42.6496133Z ##[error]Error: C:\Program Files\dotnet\dotnet.exe failed with return code: 1
2017-11-17T11:26:42.6496133Z ##[error]Dotnet command failed with non-zero exit code on the following projects : d:\a\3\s\DevExtremeAspNetCoreApp\DevExtremeAspNetCoreApp.csproj
2017-11-17T11:26:42.6536144Z ##[section]Finishing: Restore
How to build the devextreme-controls-netcore is VSTS to setup CI.
Please suggest a solution to fix this issue.
First, based on this thread: DevExtreme.AspNet.Core is not available in NuGet repository, the core package is published on their private NuGet repository (https://nuget.devexpress.com/{feed-authorization-key}/api), so you can retrieve the packages from that private NuGet repository if you have the authorization key.
Secondly, you can add the related packages (in C:\Program Files (x86)\DevExpress 17.1\DevExtreme\System\DevExtreme\Bin\AspNetCore) to the source control, then map it to the build agent (Get source) and change the value in NuGet.config.
Another way is as Daniel said that, upload it to your VSTS package feed.
You're referencing a local path (C:\Program Files (x86)\DevExpress 17.1\DevExtreme\System\DevExtreme\Bin\AspNetCore). If that path doesn't exist on your build agent, the build will fail.
The best solution is going to be to set up a Packages feed in VSTS, upload your packages to that, and update your project to pull the packages from the private package feed.
I created a nuget.config and selected it in the VSTS build step "nuget restore".
Example:
<configuration>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
<packageSources>
<add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
<add key="DevExpress package source" value="https://nuget.devexpress.com/{yourKeyHere}/api" />
</packageSources>
</configuration>
I have an internal feed setup for NuGet. When I try to build one of my projects (via a TFS build server), I get an error that NuGet cannot find version xxx of package yyy.
I go to the NuGet package folder on the server and the correct package/version is there. However, the package/version does not exist in the NuGet cache folder:
C:\Users[user account]\AppData\Local\NuGet\Cache
If I copy the correct package/version to this cache folder, then the build succeeds.
Any ideas?
Possible duplicate with NuGet fails to find existing package . If there are some service issues related to search and package restore functionality. It is possible cause of your package restore failure.
If there is a cached version of this package, NuGet will access there and the restore will be working fine.
The solution is updating your nugget to the latest version (At least 3.4+) You can also refer a similar issue in GitHub: Package restore intermittently fails with "Unable to find version 'x' of package 'y'"
Check Nuget.config in your Project. It should have the path to the Source that is your NuGet package folder on the server should be present in the nuget.config file.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<packageRestore>
<!-- Allow NuGet to download missing packages -->
<add key="enabled" value="True" />
<!-- Automatically check for missing packages during build in Visual Studio -->
<add key="automatic" value="True" />
</packageRestore>
<activePackageSource>
<!-- this tells that all of them are active -->
<add key="All" value="(Aggregate source)" />
</activePackageSource>
<packageSources>
<add key="PrivatePackages" value="\\TestPath\nuget" />
</packageSources>
</configuration>
I have a private nuget server which I am trying to pull packages from (eventually Azure build agent but I am trying this locally first).
I am using the 2.7 NuGet meaning I do not need .NuGet folder (along with .exe and .targets). I have a nuget.config in my solution directory.
I know the nuget.config is being picked up, as it locates my remote repository but the credentials supplied in the config are not used.
Here is my config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
<packageSources>
<add key="https://www.nuget.org/api/v2/" value="https://www.nuget.org/api/v2/" />
<add key="myrepo" value="http://myrepo:81/nuget/myfeed" />
</packageSources>
<disabledPackageSources />
<packageSourceCredentials>
<myrepo>
<add key="Username" value="user" />
<add key="ClearTextPassword" value="pass" />
</myrepo>
</packageSourceCredentials>
</configuration>
What would cause nuget to ignore these credentials? I have checked with Fiddler and no credentials are being sent, and the server responds with a 401 (correctly):
Error 1 NuGet Package restore failed for project MyProject: The remote server returned an error: (401) Unauthorized.. 0 0
Use the 'Manage NuGet Packages' dialog !
Do not rely on building/rebuilding in Visual Studio expecting that it will restore the missing packages. Open the 'Manage NuGet Packages' for a project (right click on a failing project and choose the option) and you will see a message "Some packages are missing for this project..." with a 'Restore' button. Restoring using that button will resolve these authentication issues.
Description: After installing Firebird Client and DDEX for Visual Studio 2010 (.NET 4.0) I am unable to add new connection to firebird from Visual Sutio 2010 (Professional)->Server Explorer->Data Connections->Add Connection.
performed steps:
- installed firebirdclient (NETProvider-2.6.0.msi -> C:\Program Files\FirebirdClient)
- added assembly (FirebirdSql.Data.FirebirdClient.dll) to gac
proof:
C:\Program Files\FirebirdClient>gacutil /i
firebirdsql.data.firebirdclient.dll
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Assembly successfully added to the cache
got DDEX 2.0.5, -> C:\Program Files\FirebirdClient\DDEX205
added FirebirdSql.VisualStudio.DataTools.dll to gac (somebody wrote it might help)
C:\Program Files\FirebirdClient\DDEX205>gacutil
/i FirebirdSql.VisualStudio.Data
Tools.dll
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Assembly successfully added to the cache
edited VS2010 version of FirebirdDDEXProvider32
#=".NET Framework Data Provider for
Firebird"
"DisplayName"="Provider_DisplayName,
FirebirdSql.VisualStudio.DataTools.Properties.Resources"
"ShortDisplayName"="Provider_ShortDisplayName,FirebirdSql.VisualStudio.DataTools.Properties.Resources"
"Description"="Provider_Description,
FirebirdSql.VisualStudio.DataTools.Properties.Resources"
"CodeBase"="C:\Program
Files\FirebirdClient\DDEX205\FirebirdSql.VisualStudio.DataTools.dll"
"InvariantName"="FirebirdSql.Data.FirebirdClient"
"Technology"="{77AB9A9D-78B9-4ba7-91AC-873F5338F1D2}"
installed that (the whole file) as well
- in C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config
in I added
<section name="firebirdsql.data.firebirdclient" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
in I added
<add name="FirebirdClient Data Provider" invariant="FirebirdSql.Data.FirebirdClient" description=".Net Framework Data Provider for Firebird" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c" />
I can connect via FbConnection to a firebird db
in Visual Studio 2010 IDE I can server explorer -> Data Connections -> Add Connection and choose Firebird Data Source but I never get any further! As soon as I press a key in any field the windows disapears (or if I choose a language, dialect whatever, windows disapears...).
can anybody help me?
OMG
C:\Program
Files\FirebirdClient>gacutil /l
Firebirdsql.data.firebirdclient
Microsoft (R) .NET Global Assembly
Cache Utility. Version 4.0.30319.1
Copyright (c) Microsoft Corporation.
All rights reserved.
The Global Assembly Cache contains the
following assemblies:
Firebirdsql.data.firebirdclient,
Version=2.6.0.0, Culture=neutral,
PublicKeyTo ken=3750abcc3150b00c,
processorArchitecture=MSIL
Number of items = 1
Version is 2.6.0.0 not 4.0.0.0
=>
it runs on .NET 4.0 but the assembly version IS 2.6.0.0
After this restart visual studio and it WORKS!
in Visual Studio 2010 IDE I can server explorer -> Data Connections -> Add Connection and choose Firebird Data Source but I never get any further! As soon as I press a key in any field the windows disapears (or if I choose a language, dialect whatever, windows disapears...).
make sure edit the .NET framework file called Machine.config at C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config
for windows 7 64 bit also edit C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config
First you must obtain accurate values to be placed in the Machine.config file, via gacutil:
c:\>gacutil -l FirebirdSQL.Data.FirebirdClient
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
FirebirdSQL.Data.FirebirdClient, Version=2.6.0.0, Culture=neutral, PublicKeyTo
ken=3750abcc3150b00c, processorArchitecture=MSIL
sample of adding the provider:
<DbProviderFactories>
<add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
<add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
<add name="FirebirdClient Data Provider" invariant="FirebirdSql.Data.FirebirdClient" description=".Net Framework Data Provider for Firebird" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient, Version=2.6.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL" />
</DbProviderFactories>