3,765 questions
0
votes
1
answer
61
views
How to give input to Roslyn Analyzers in a NuGet Package?
In our team, we use a "NamingAnalyzer" that automatically warns and fixes about the use of names specified in a dictionary. Our code base kept mixing two languages together.
Now we want to ...
2
votes
1
answer
102
views
Using Directory.packages.props GlobalPackageReference only seems to work with ManagePackageVersionsCentrally
I have a legacy monolithic application with 180 projects. All of these projects are in the SDK format, although some of them still use the .NET 4.8 target framework.
I want to add a package reference ...
0
votes
0
answers
25
views
How to include extra runtime files in nuget package?
I have a class library project targeting .net standard 2.0 that I pack into a nuget package; we'll call it Package.A.
Inside of the project, it has a folder called Special with the following folder + ...
-1
votes
1
answer
69
views
Publish Failed, but able to build successfully, and run
My project is able to build and run, but when I want to publish the project, I get this :
Warning As Error: Detected package downgrade: System.Net.NameResolution from 4.3.0 to 4.0.0. Reference the ...
2
votes
2
answers
140
views
Dotnet Restore cannot find .NET 9 packages (NU1102) even though they exist in internal Artifactory NuGet
We use an internal Artifactory NuGet feed inside our organization.
Here is my NuGet.Config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<...
1
vote
1
answer
108
views
Conflict between Microsoft.AspNetCore and System.Security.Cryptography.Pkcs
I'm running into a conflict when trying to include both of the following packages in a project:
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="10.0.0" /&...
-3
votes
0
answers
42
views
MediatR Nuget package versions creating problems
I am getting a version mismatch error when using MediatR in my .NET project.
What happened:
Yesterday my project worked correctly with no errors.
Today I updated some NuGet packages by mistake.
After ...
1
vote
1
answer
86
views
Adding package reference System.Linq.AsyncEnumerable cause CS0518/CS0656 compile error
When I added the following package reference to my project:
<ItemGroup>
<PackageReference Include="System.Linq.AsyncEnumerable" Version="10.0.0" />
</ItemGroup&...
0
votes
0
answers
130
views
Native DLL not found in output directory when using NuGet package in Visual Studio / C# / .NET Core project
I have created a NuGet package containing a .NET Core library for Tesseract OCR, which I then added to my C# project via the NuGet Package Manager in Visual Studio.
After building the solution, a ...
0
votes
0
answers
20
views
Visual Studio: 3rd party SDK not being found when trying to load it via custom project type
I have a 3rd party SDK which was installed via VSIX / NuGet package.
Let's call it FoodFight/CoolKids for Windows.
I'm working on a VSIX that does a wizard implementation of this SDK as part of its ...
0
votes
2
answers
76
views
.NET 4.6 to 4.8 update - package and updated file location under references
I am trying to update a legacy ASP.NET 4.6 app to .NET 4.8. The app contains 2 class library projects as well.
I'm now using VS2022 for the updating instead of VS2017/2019 that I was using before.
For ...
0
votes
1
answer
162
views
How to target both `.net8.0-windows` and `.net8.0` in Azure DevOps Pipeline for NuGet Package Creation
We have a Visual Studio solution which has multiple class library projects. Historically these class libraries were built only to .NET 8.0. Some of the library projects have Windows-specific features, ...
1
vote
0
answers
59
views
Copying DLLs from transitive nuget dependency that uses non-standard folder layout
So I have a package that I'm generating in C#. This package depends on another nuget package (that I don't own), and is meant for C++, so the folder layout is alien.
I'm currently handling this by ...
2
votes
0
answers
69
views
C# and VB: How to enable specific version dependency for a project auto generating a NuGet package
Recently, I've worked on upgrading all of the projects in our main application to SDK style projects. This was done in order to enable the feature to auto generate a NuGet package for each project on ...
0
votes
0
answers
75
views
Unable to find NuGet packages from local repo associated to virtual repo in Artifactory
I'm unable to find NuGet packages originally deployed to a local repository in JFrog Artifactory from a virtual repository. The local repo is bound/associated to the virtual repo.
For the local repo, ...
0
votes
1
answer
96
views
Error about a file not being there even when its there under the bin folder
I have an ASP.NET website (not ASP.NET application) with the target framework set to .NET 4.8. I recently updated the packages using Nuget.
Now, when I Start without Debugging in VS 2022, I get the ...
0
votes
0
answers
26
views
While installing VS template from a private nuget source, it is giving error that template not exists. I can see the template under the source
C:\Users\pradeep.tyagi>dotnet new install GM.MicroService.Template::1.1.2482
The following template packages will be installed:
GM.MicroService.Template::1.1.2482
Warning: GM.MicroService.Template::...
1
vote
1
answer
133
views
Visual Studio insists downloading source files from GIT Repo for local Dev-builds in local NuGet-feed
Setup
We have internal NuGet packages consumed in other solutions, that we would like to package and debug locally in those other solutions, before we push both the code changes to Git and NuGet ...
0
votes
0
answers
44
views
Build error during publishing in MS Visual Studio Professional 2019
I'm getting build error as mentioned below while publishing web project to root directory. Anybody facing same issue?
Publish has encountered an error.
Build failed. Check the Output window for more ...
0
votes
0
answers
69
views
The located assembly's manifest definition does not match the assembly reference launch darkly
I created a nuget package library called FeatureLibrary.
I added this nuget package in a another project. At run time getting below error.
"Description": "Unhandled exception in ...
0
votes
1
answer
105
views
'ServiceCollection' exists in both nuget packages
I do have multiple projects in one solutions. Some of them are in .NET Core 2.1, 3.1 and 5.0. My main project is in .NET 5.0 and it has multiple projects as dependencies (.NET Core 2.1, 3.1).
I get ...
0
votes
1
answer
86
views
How to find the version of a NuGet package that supports a specified .NET Framework version
Lets assume my project based on .NET Framework 4.0 and requires the NuGet package GuardClauses.
Currently GuardClauses' latest version is 5.0.0, which supports .NET Framework 4.6.1 and higher. So ...
0
votes
1
answer
135
views
How to match app.config version numbers to packages.config
I've had this several times now with different packages (Latest was System.ValueTuple) installed using the nuget package manager in Visual Studio.
After doing some upgrading of various packages I find ...
1
vote
0
answers
103
views
Microsoft.Direct3D.D3D12 and "MakeAppx.exe pack"
I develop an DirectX12 application. When I create a MSIX package with the nuget Microsoft.Direct3D.D3D12, MakeAppx.exe pack exists with an error 0x8007007b.
Publishing package without this nuget works ...
1
vote
0
answers
79
views
Unable to load the service index for source https://api.nuget.org/v3/index.json — "An existing connection was forcibly closed by the remote host"
I'm facing an issue while trying to restore NuGet packages in Visual Studio. The error message is as follows:
Unable to load the service index for source https://api.nuget.org/v3/index.json.
An error ...
0
votes
0
answers
32
views
Dotnet pack package structure
I have a github workflow that builds a nuget package using the OctopusDeploy/create-nuget-package-action@v3 action. I need to refactor this to use the dotnet pack command, but I am getting a different ...
0
votes
0
answers
47
views
Nuget not finding packages in our UNC Path based Nuget feed unless in root (i.e. not subfolders)
Our build machine is adding our own nuget packages to a UNC based nuget feed (i.e. \\myserver\packages) using the nuget add command... e.g.
nuget add OurPackage.1.2.3.nupkg -source \\myserver\packages
...
0
votes
0
answers
34
views
Limit nuget packages to target version of solution
I have VS solution with approx 50 projects. The application runs in PROD environment and it targets framework NET 8.0. I regularly check for nugets updates to keep my app up-to-date and without ...
1
vote
1
answer
148
views
OpenXml Dependency Loading issue
Loading all these package dependencies with repetitive try/ catch blocks:
$libPath = ".\packages\DocumentFormat.OpenXml.3.3.0\lib\netstandard2.0"
$libFPath = ".\packages\DocumentFormat....
1
vote
1
answer
267
views
Unable to load MailKit.dll file in PowerShell
I have installed the MimeKit and the MailKit in my PC using:
Install-Package -Name 'MimeKit' -Source "https://www.nuget.org/api/v2" -SkipDependencies
Install-Package -Name 'MailKit' -Source &...
0
votes
0
answers
52
views
.NET multi-targeted NuGet package: only .NET 4.5 DLL gets correct version from pipeline, .NET Standard 2.0 keeps default
I'm creating a NuGet package in an Azure DevOps pipeline from a multi-targeted .NET library that targets .NET Standard 2.0 and .NET 4.5. The pipeline sets the version dynamically using a variable (...
0
votes
0
answers
75
views
Dependent SignalR scripts not being created with package VS2022 package install
I am supporting an ASP.NET MVC 5-based web project in Visual Studio 2022. I am attempting to add SignalR support, following the instructions at https://enlightsolution.com/asp-net-mvc-5/signalr-with-...
0
votes
0
answers
43
views
Can't open Nuget package manager in Visual Studio 2022
I am using Visual Studio 2022 v17.13.5. I have many desktop (Winforms) and ASP.NET MVC web application projects. For some time now, I have a problem with Visual Studio and it is affecting all the ...
0
votes
0
answers
141
views
What is the preferred way to use a nuget package in a project targeting .Net Framework containing only binaries?
I have a nuget package that was packed using the binaries published from an .net 8 project. I have used nuget pack command. Basically this is a tool(Authentication tool), which will be used by many ...
0
votes
1
answer
64
views
NU1100 error while debugging WinUI 3 Application
Unable to resolve 'Microsoft.NETCore.App.Runtime.win-x86 (= 8.0.14)' for 'net8.0-windows10.0.19041'. PackageSourceMapping is enabled, the following source(s) were not considered: Microsoft Visual ...
6
votes
2
answers
5k
views
Visual Studio: NU1008 Central Package Management problem
All of a sudden my solution which is 3 or 4 years old...is throwing errors. I was never using this feature. My solution has 10 projects in it, and I had made no code changes, visual studio updates, ...
0
votes
0
answers
185
views
Exclude specific NuGet package dll's from being added as project reference
I'm creating a nuget package in a project built in SDK style. The project targets net472 & net8.0 and uses the nuget package IKVM 8.11.2.
When I install IKVM, it generates the IKVM dll's and also ...
0
votes
0
answers
428
views
How to force the newer NuGet package version when there's a version conflict due to transitive references
I have a solution with 5 projects:
Project 1-3 are SDK-style projects with PackageReference.
Project 4 is a legacy .csproj project with packages.config (.NET Framework 4.7.2. WebForms + MVC 5 project ...
0
votes
1
answer
1k
views
How to permanently remove an unused transitive NuGet package
After switching from System.Data.SqlClient to Microsoft.Data.SqlClient in one of my solutions I am unable to permanently remove unused System.Data.SqlClient from the solution as it keeps getting ...
1
vote
0
answers
395
views
MSBuild can't copy system.diagnostics.diagnosticsource 9.0.2 due to badly formatted path
After updating my NuGet package of system.diagnostics.diagnosticsource from 6.0.2 to 9.0.2 my build pipeline in Azure DevOps (self-hosted agent) can no longer build my solution, as the path to ...
0
votes
0
answers
36
views
Max unique snapshot option not working on Nuget snapshot version
I have a scenario where we are using nuget snapshot repo in jfrog and we are using snapshot versions for the develop branch builds.
The requirement is that for develop branch build the version will ...
2
votes
1
answer
1k
views
Can you now force nuget to update versions of transitive packages with transitive pinning?
There's a lot of older posts about the way that NuGet defaults to the lowest compatible version for transitive packages, and thus creates vulnerabilities in your code. It looks like until recently, ...
0
votes
1
answer
96
views
Specify latest package version in create-release-action
I have a github action that creates a release for Octopus deploy using the "OctopusDeploy/create-release-action@v3" action.
- name: Create Octopus Release
uses: OctopusDeploy/create-...
0
votes
1
answer
84
views
Unable to Create a Nuget package and Getting NU5012: Unable to find
I am unable to create a nuget package using below azure devops yml pipeline
Variables
buildPlatform: 'x86'
buildConfiguration: 'Debug'
- task: NuGetCommand@2
displayName: 'NuGet Pack'
inputs:
...
1
vote
0
answers
621
views
Getting a 401 error when attempting to build a Visual Studio Solution
For the past couple of days, I've been trying to run a company-made solution in Visual Studio. Normally, you build and everything works. In this case, I am getting a:
Retrying 'FindPackageByIdAsync' ...
0
votes
0
answers
191
views
How to create nuget package for MAUI class library?
What should we pack in nuget package for a MAUI class library such that no private, internal or implementation detail is embeded in nuget package i.e. the user should not be able to navigate to the ...
0
votes
3
answers
1k
views
Cannot install Plugin.Firebase.CloudMessaging in .NET MAUI project (Path Too Long Error)
I'm trying to integrate Firebase Cloud Messaging (FCM) into my .NET MAUI app, but I keep running into an issue when installing the Plugin.Firebase.CloudMessaging package via NuGet.
Issue:
When ...
0
votes
1
answer
355
views
Create a Nuget package with just a resources file using dotnet pack
A couple years ago, I set up my build to create separate packages for a main library a number of language resource files.
Project structure:
- proj
- localization
- lib.nuspec
- lib.de....
0
votes
2
answers
240
views
Make a NuGet package that depends on another, but do not include it inside
I want to make a NuGet package A that depends on NuGet package B.
Projects that will use package A will always have package B as a direct dependency.
Hence, I believe that package B does not need to ...
1
vote
1
answer
156
views
How does the "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" package resolves types which are in "Microsoft.AspNetCore.dll"?
I have a class library project which has the following extension method -
public static async Task DoSomethingAsync(this WebApplication app)
{
//
}
I was curious how a class library project is ...