Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all 3166 articles
Browse latest View live

The request was aborted: Could not create SSL/TLS secure channel for "https://api.nuget.org/v3/index.json" in VS 2019


Nuget Package - feed (VSTS) :Exception 'System.AggregateException' thrown when trying to add source

$
0
0

I have created a new feed with in Package Release hub (VSTS), installed the credentials, then added the package source.

Now, I am using Visual Studio 2015 to install Micrososft.Aspnet.mvc to a project, however it gives the following error:

Exception 'System.AggregateException' thrown when trying to add source
'https://mysite.pkgs.visualstudio.com/DefaultCollection/_packaging/MyLogUtils/nuget/v3/index.json'.
Please verify all your online package sources are available.    

I need to install NuGet packages normally, so I removed the feed from VSTS. However, the problem persists. How can this problem be resolved?

Nuget package installed but references not resolved

$
0
0

I have a multi-project solution with Prism Nuget packages installed in several projects. I then attempted to add a Prism Mef extensions package to one of the projects using the Nuget Package Manager UI (I have already added it to one of the other projects).

The first time I attempted to add the package, it failed to install one of the dependencies, no specific error reason, just "failed". So, I installed it a second time, all seemed to be fine, no errors reported, but a few of the references did not resolve.

So, I uninstalled the package and all dependencies and installed it again. Again all appeared fine, but more references do not resolve.

I have tried uninstalling and installing the package more times but get the same result every time now.

I have had this problem many times and I know its not specific to the Prism package as I've had it with loads of different packages.

I think its just a major bug with Nuget, but I'm hoping somebody will know an easy way to fix it. I think I usually have better success with the Nuget console, but I find it more effort to use.

I've done some searching online and not really found a good explanation of the cause of the problem or a way to resolve it.

Somebody at work completely refuses to have anything to do with Nuget as he has so many of these issues, but I am determined to make it work!

install-package : Dependency loop detected for package 'Microsoft.Data.Sqlite'

$
0
0

I am trying to install Microsoft.Data.Sqlite with PowerShell's cmdLet install-package:

$pkg = find-package -name Microsoft.Data.Sqlite
install-package -force -scope currentUser -verbose $pkg

The second command takes a long time and then responds with

install-package : Dependency loop detected for package 'Microsoft.Data.Sqlite'.
At line:1 char:1
+ install-package -force -scope currentUser -verbose $pkg
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : Deadlock detected: (Microsoft.Data.Sqlite:String) [Install-Package], Exception
+ FullyQualifiedErrorId : DependencyLoopDetected,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

Why is that and what do I have to do in order to install this package?

Include CSHTM files into nuget packages using visual studio

$
0
0

I'm trying to include some cshtml files like Default.cshtml into another class library project which generate a Nuget package. I have set Content for its Build Action but in the consumer project when I ran the project it still can't find this file! although I can see this file in my visual studio after adding that Nuget package.

How can I include these file in the Nuget package?

Include my Nuget README in my Nuget Package

$
0
0

I maintain a few tiny Nuget Packages.

I have a Nuget README file in the git repository, and the .nupkg file is auto-built by VS, based on the "Package" config, stored in the .csproj file.

Whenever I need to release a new versio of the package, I upload the .nupkg file to nuget, in the web UI, and then it asks me for any documentation, at which point I have to manually upload the README file.

Is there any way to put that README file in the .nupkg so that I don't have to manually upload it every time?

Package requires NuGet client version '2.12'

$
0
0

I am trying to install 'WindowsAzure.Storage 8.0.1' in visual studio 2012, but getting the error

package requires NuGet client version '2.12' or above, but the current NuGet version is '2.8.60318.667'.

on running command "Install-Package NuGet.Client"

Attempting to resolve dependency 'NuGet.Versioning (≥ 3.5.0)'.
Attempting to resolve dependency 'NuGet.Packaging (≥ 3.5.0)'.
Attempting to resolve dependency 'NuGet.Common (≥ 3.5.0)'.
Attempting to resolve dependency 'NuGet.Packaging.Core (≥ 3.5.0)'.
Attempting to resolve dependency 'NuGet.Packaging.Core.Types (≥ 3.5.0)'.
Attempting to resolve dependency 'NuGet.Frameworks (≥ 3.5.0)'.
Attempting to resolve dependency 'NuGet.Repositories (≥ 3.5.0)'.
Attempting to resolve dependency 'NuGet.RuntimeModel (≥ 3.5.0)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 6.0.4)'.
Attempting to resolve dependency 'NuGet.ContentModel (≥ 3.5.0)'.
'NuGet.Client 3.5.0' already installed.

But still I am getting the error.

The 'WindowsAzure.Storage 8.0.1' package requires NuGet client version '2.12' or above, but the current NuGet version is '2.8.60318.667'.

Issue while installing AutoMapper 9.0.0 using Nuget in VS2019 and dotnet core 3.0

$
0
0

I want to install AutoMapper v9.0.0 using nuget package manager. I am using VisualStudio 2019 and the framework is core 3.0 I am getting following error on the console while installing. install-package : Found invalid data while decoding. Some older versions (5.0.1) of AutoMapper get installed but the higher versions failed.

       PM> install-package AutoMapper.Extensions.Microsoft.DependencyInjection 

       **Error: install-package : Found invalid data while decoding.**

How its the package Nito.AsyncEx in Nuget targeting multiple framework

$
0
0

I need to know how is the package Nito.AsyncEx targeting multiple frameworkSslike when i install it in .Net Project or .Net Core its compatible with both of them. Is this package developed in .Net standard or is there some thing else ?

aspdotnet core project build fail on new machin

$
0
0

Hi I am facing a strange problem,

I have create a asp.net core 2.1 web project, it works/build fine on my machine.

Then I have zipped the project folder with .sln file and moved it to new machin, this also have visual studio 2017, .net core 2.1(it is a VM).

I open the project and when build I get:

Error rzc generate exited with code -2147450750. DEVPROJECT_1 C:\Users\abc.nuget\packages\microsoft.aspnetcore.razor.design\2.1.1\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets 121

I have even checked the dependency version and they are the same. Both machine are win 7 service pack 1(machine where it works is 64 bit and new machine or vm is 32 bit OS).

Need some way to solve this.

enter image description here

[UPDATE 1:]

Hi I did he clean build as suggested but same issue

: ------ Rebuild All started: Project: DEVPROJECT_1 , Configuration: Debug Any CPU ------ Failed to load the dll from [C:\Program Files\dotnet\host\fxr\2.1.3\hostfxr.dll], HRESULT: 0x80070057 The library hostfxr.dll was found, but loading it from C:\Program Files\dotnet\host\fxr\2.1.3\hostfxr.dll failed - Installing .NET Core prerequisites might help resolve this problem. http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409 C:\Users\dev.nuget\packages\microsoft.aspnetcore.razor.design\2.1.1\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets(69,5): error : rzc discover exited with code -2147450750. Done building project "DEVPROJECT_1 .csproj" -- FAILED. ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

but when I double click it it redirect me to razor config file and points to this line:

<RazorGenerate
  Debug="$(_RazorDebugGenerateCodeTask)"
  DebugTool="$(_RazorDebugGenerateCodeTool)"
  ToolAssembly="$(_RazorToolAssembly)"
  UseServer="$(UseRazorBuildServer)"
  ForceServer="$(_RazorForceBuildServer)"
  SuppressCurrentUserOnlyPipeOptions="$(_RazorSuppressCurrentUserOnlyPipeOptions)"
  PipeName="$(_RazorBuildServerPipeName)"
  Version="$(RazorLangVersion)"
  Configuration="@(ResolvedRazorConfiguration)"
  Extensions="@(ResolvedRazorExtension)"
  Sources="@(RazorGenerateWithTargetPath)"
  ProjectRoot="$(MSBuildProjectDirectory)"
  TagHelperManifest="$(_RazorTagHelperOutputCache)" />

Copy static files to the project root folder using Nuget

$
0
0

I'm trying to copy some static files css, js etc to the project root folder when it got installed. but every time it just only copies all static files to the bin folder!

Here is .nupkg file:

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
  <metadata>
    <id>...</id>
    <dependencies>
      <group targetFramework=".NETCoreApp2.1">
        <dependency id="Microsoft.AspNetCore.App" version="2.1.5" exclude="Build,Analyzers" />
      </group>
    </dependencies>
    <contentFiles>
      <files include="any/any/wwwroot/styles/theme.css" buildAction="Content" copyToOutput="true" flatten="true" />
    </contentFiles>
  </metadata>
  <files>
    <file src="C:\Projects\Olive\Olive.Microservices.Hub\wwwroot\styles\theme.css" target="content\wwwroot\styles\theme.css" />
    <file src="C:\Projects\Olive\Olive.Microservices.Hub\wwwroot\styles\theme.css" target="contentFiles\any\any\wwwroot\styles\theme.css" />
  </files>
</package>

Why it only copy my css file (theme.css) in the bin folder?

What if two nuget package point to the same Dll

$
0
0

Ok. So I have one solution with three projects

  1. Project-A.csproj(turned into A.nupkg)
  2. Project B.csproj(turned into B.nupkg)
  3. Utils.csproj

Since utils.csproj has a lot of central functions both A and B have reference to utils.dll as a project reference. So basically when I go to /bin folder of either A or B I can see utils.dll. So far so good.

Now, I have another project. LEt's call it consumer.csproj which does reference both A.nupkg and B.nupkg in the same order mentioned. Also, Utils.dll has some functions which expects certain .json files which it does expect to be at certain location.

Now, when I reference A.nupkg first, it does bring in utils.dll with it and then my consumer project knows that it needs to go to /A/lib when running code does ask for utils.dll. which was OK until when my consumer project did call some B.nupkg functionality which in turn called, utils.csproj functionality which was looking for some json files in a.nupkg/lib folder because now everytime utils.csproj is called, compiler just goes to A.nupkg folder looking for it.

Is there anything I am doing wrong here? If not, what can I do to resolve this issue

Now I

What does "Include copyright notice" actually mean when using binary package?

$
0
0

I know this is not a pure-code question but I'm sure it must be interesting to most developers:

As a developer that works for a company I use third-party libraries (binaries) in my project. For instance, they are obtained from NuGet. I want to distribute my compiled project including the mentioned libraries in binary form. Often their license agreements say something like

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

Other sources such as BSD mention the term 'reproduce':

Redistributions in binary form must reproduce the above copyright notice, 
this list of conditions and the following disclaimer in the documentation and/or other materials 
provided with the distribution.

But how do I fulfill this requirement in practice from a technical perspective? What does including or reproducing actually mean here?

  • Can I ignore it because this kind of text only applies to software in the source code form which shall make sure that the parts that contain the copyright notice are not removed from the source code or
  • Do I really have to display the mentioned copyright notice somewhere to the user (e.g. as part of the installation routine) or
  • Does it suffice to place the copyright notice in some file and simply ship it with the binaries without showing it to the user?

See example license agreement here

Is there any way that I can make video calling system in Xamarin Form [closed]

$
0
0

I want to add video calling features in my app. But I can't find anything helpful. I found a NuGet package OpenTok. There are no documentation or tutorial for that. Can you tell me how can I add video calling features in Xamarin Form app.

Visual Studio Code - Not able to upload nuget packge that is created locally on my computer

$
0
0

So I have written two programs(Main program and Calculatorlib) on Visual Studio Code where I have created package locally for one of the programs(Caluclatorlib)by using the command dotnet pack. The package Calculatorlib_package.3.0.0.nupkg is created locally. However I want to upload this package on visual studio code from my local computer so that I can give Package Reference to Main program.

I don't see any options to upload this on visual studio code. But in Visual studio I see there is an option called "Manage Nuget packages" where we can go and upload locally created packages. Can someone guide me how to do this?


I have a nuget package - where to discuss about it?

$
0
0

I'm planning to publish nuget package, source code will be available on GitHub. As I'm expecting and motivating people to discuss about package, the question is where to start a discussion? I don't have a reputation to create a custom tag on StackOverflow nor I don't want to create a blog just because of that.

Building NuGet packages from Visual Studio

$
0
0

I'm trying to share an internal company assembly via NuGet packages and a private source. This assembly targets .NET Framework 4.6.1. I want these NuGet packages to pack automatically from Visual Studio during the release build. I see I can add <GeneratePackageOnBuild>true</GeneratePackageOnBuild> to .csproj. I'm not sure if this is a .NET Standard-specific property but it seems to partially work. However, when I build, I get

error MSB4044: The "GetPackOutputItemsTask" task was not given a value for the required parameter "PackageOutputPath".

I've been trying to learn how to pass this parameter from within Visual Studio but I don't see a lot of documentation on parameters except when calling it from the command line manually. Is there an easy way to do this from within Visual Studio? Am I going about this wrong?

Edit: This is using a .NET Framework class library. I can run the pack command from the command line giving it the required parameters with /p:PackageOutputPath="path\here". It seems this might have been designed for .NET Core and Standard projects and Visual Studio might not handle packing .NET Framework projects.

How do I remove the codecracker Nuget package?

$
0
0

I installed the Nuget Codecracker.csharp package in VS2015, as a trial. I then uninstalled it using the Solution Explorer "Manage Nuget Packages for Solution" tool. This now shows the packages as being uninstalled - BUT - the solution won't build because several projects complain about missing components of CodeCracker:

"CSC : error CS0006: Metadata file '....\packages\codecracker.CSharp.1.0.1\analyzers\dotnet\cs\CodeCracker.Common.dll' could not be found 21>CSC : error CS0006: Metadata file '....\packages\codecracker.CSharp.1.0.1\analyzers\dotnet\cs\CodeCracker.CSharp.dll' could not be found"

There is no documentation on the Codecracker Github or other websites, and no means of contacting the team other than via a jabber site that is permanently down.

How to clean this up so my solution builds again?

NuGet fails to find existing package

$
0
0

How it's possible that NuGet's Install-Package fails with Unable to find version 'x' of package 'y' when that exact version is released as NuGet to official repository and it shown on the https://www.nuget.org/packages/y page.

Here is specific sample with nuget.org content and NuGet Install-Package command output.

nuget package snapshot

install package failure

UPDATE. Package sources are set to defaults (from nuget.org). Actually you can see the issue just running Install-Package Log4Net.Async -Version 1.3.0.

package sources

UPDATE 2. I want to highlight that it's not about some developer's machine - the same things happening on Visual Studio Online Hosted Build Controller.

UPDATE 3. Here is how NuGet tries to load package and it looks like NuGet API just broken, because all these request fails with the error below.

install-package intercepted http requests

Resource not found for the segment 'Packages'

Also NuGet produces the strange output on NuGet API calls that issues at VS search packages stage, please see here: http://pastebin.com/qveadrZB.

Could not find file 'bin\Antlr3.Runtime.pdb' Error when creating deployment package

$
0
0

I'm getting the following error when tried to create deployment package.

"Copying file bin\Antlr3.Runtime.pdb to obj\Release\AspnetCompileMerge\Source\bin\Antlr3.Runtime.pdb failed. Could not find file 'bin\Antlr3.Runtime.pdb'"

Can someone tell me what is happening and how to solve it

Viewing all 3166 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>