I am able to read packages from NuGet.org but I am not able to read only certain packages from our private NuGet server - Klondike.
I tracked requests which VS2015 made to download package and query string which VS2015 sends to NuGet source is:
?$filter=IsAbsoluteLatestVersion&searchTerm='Package-ID'&targetFramework='net'&includePrerelease=true&$skip=0&$top=126
Problem is with parameter targetFramework
. When VS2015 uses targetFramework='net'
than it cannot read packages for framework net461
, they are skipped.
When I executed request in Postman and set targetFramework='net461'
then I am able to find package.
Also I noticed that VS2015 sporadically changing target framework from net
to net461
.
My question is: Do I need to configure my VS2015 or I have to change my NuGet package?
NuGet package is created form .NET Core 2.0 project and here is configuration:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
<Company>Stackoverflow</Company>
<Authors>kat1330</Authors>
<Description>Package consists banch of functionalities.</Description>
<PackageTags>rules, rule engine</PackageTags>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<IncludeSymbols>true</IncludeSymbols>
<IncludeSource>True</IncludeSource>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\cert.snk</AssemblyOriginatorKeyFile>
<DelaySign>true</DelaySign>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<ApplicationIcon>favicon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
</ItemGroup>
</Project>
UPDATE: Version of NuGet package manager is: 3.5.0.1484. It is latest what is offered on Visual Studio 2015 for me.