12,026 questions
3
votes
1
answer
222
views
C# library - Create NuGet package with Sdk type Microsoft.NET.Sdk.Web
I'm quite familiar with NuGet package generation, but this is the first time I'm trying to generate a package with a Microsoft.NET.Sdk.Web sdk type instead of the typical Microsoft.NET.Sdk.
I know ...
0
votes
1
answer
577
views
Local source 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages' does not exist
I am following this tutorial for creating a custom Visual Studio extension. I just installed the Visual Studio extension development workload, and I'm using Visual Studio 2022 version 17.12.
I just ...
0
votes
1
answer
34
views
Configuring a NuGet package that copies files into the build directory of the referencing project
I have a collection of .NET framework 4.8 projects that all contain the same set of XSD files for XML validation. I've created a very basic XML validation NuGet package in .netstandard 2.0 that ...
0
votes
1
answer
101
views
Unable to find a version of System.Threading.Tasks.Dataflow that is compatible with Dse 2.10.4 System.Threading.Tasks.Dataflow' (>= 4.6.0 && < 5.0.0)'
I am currently attempting to upgrade the our own Nuget package in our WCF service, but I am encountering a compatibility issue as detailed below:
Error: Unable to find a version of 'System.Threading....
2
votes
0
answers
77
views
How do I sign NuGet package built by CI/CD (e.g. GitHub or GitLab)
I'm new to this, so please bear with me. I couldn't find documentation on my question:
I'd like to build a .NET project on GitHub or GitLab using CI/CD and have it published to NuGet.org.
Is it ...
-1
votes
1
answer
416
views
dotnet restore will not ask for credentials
I have a project that uses an authenticated NuGet feed on Azure DevOps. I can restore NuGet packages in the solution just fine, but it seems when I try to use dotnet to restore it doesn't want to ...
0
votes
2
answers
555
views
Using dotnet pack to create a nuget from a csproj. I want all .pdbs (including dependents) in snupkg file but not in the .nupkg file
This is in ADO pipeline, but I can't get it to work properly locally either.
I am using dotnet pack to create a nuget package from a .csproj file (that builds several dependent DLLs). If I include ...
1
vote
1
answer
213
views
F# - unwanted reference to FSharp.Core 9.0 after paket clear-cache causes build error
I recently ran a somewhat bold paket clear-cache and my F# application started behaving strangely. Some of my projects that were referencing an older version of FSharp.Core now reference the new v9.0.
...
2
votes
1
answer
3k
views
Vulnerability in System.Text.Json and System.Text.RegularExpressions after update to .NET 9
I have updated the sdk to .NET 9 and I started getting these warnings (that are escalated to error due to a setting):
Package 'System.Text.Json' 8.0.0 has a known high severity vulnerability, https://...
8
votes
1
answer
912
views
In nuget manager show only top level packages when updating
I just updated to vs2022 17.12.0 and I just noticed that when updating nuget packages there is a new column for the Package level. Is there a way to disable this and show only the top-level packages ...
3
votes
2
answers
92
views
Is it safe to import nuget package with wildcard instead of patch version in production?
I would like to import some third party nuget package into my project. The latest package version is 2.3.4.5
Would it be safe if I import this packages as 2.3.* so that I benefit from patches to be ...
0
votes
0
answers
51
views
Roslyn script not executing properly from library/nuget
I am trying to use C# Roslyn scripting in a project. I have written some class which has code reading a file which contains the script, execute it and return the result. If this class is present in ...
0
votes
1
answer
45
views
Update .NET *.csproj PackageReference from float versioning to strict one (like 1.* -> 1.0.4)
I've got a kind of 'rolling update' policy for nugets:
<ItemGroup>
<PackageReference Include="AutoMapper" Version="12.*" />
...
</ItemGroup>
In addition, I ...
0
votes
1
answer
528
views
Cannot upgrade nuget package System.Diagnostics.DiagnosticSource from 8.0.0 to 8.0.1
At this point, this is a somewhat rhetorical question, because I already have the answer, which I will post later for anyone else who has this same problem.
I have a project that has been using System....
0
votes
1
answer
201
views
How do I enable step through debugging of nuget dependencies in dotnet 8.0 app running inside a docker container in VSCode?
Following this guide https://www.youtube.com/watch?v=ds2bud0ZYTY "Debugging .NET Core in Docker with VSCode by That DevOps Guy", I have VSCode remote debugging my net8 application that is ...
1
vote
1
answer
783
views
Unable to update Nuget package microsoft.identity.serviceessentials.aspnetcore to ver 1.28.1
I'm updating the nuget package microsoft.identity.serviceessentials.aspnetcore 1.26.0 to
ver 1.28.1. however I get the below error message in Package Manager Console.
Unable to find package Microsoft....
9
votes
2
answers
12k
views
FileNotFoundException: Could not load file or assembly "System.Runtime version=8.0.0.0"
I have been working on a .NET 8 project in Visual Studio for months. Everything was working well until one day out of nowhere, without changing anything in the code/OS/VS the project started throwing ...
4
votes
1
answer
781
views
How to mark NuGet packages on Azure DevOps feed as deprecated to use nuget search or dotnet list package --deprecated?
In Azure DevOps Builds, checks for deprecated and vulnerable nuget packages work great using:
dotnet list "HappySolution.sln" package --deprecated --source https://api.nuget.org/v3/index....
0
votes
0
answers
43
views
How can my package add files to the consumer's project?
I'm pretty sure in the past I have seen files added to my project when I add a nuget package reference. How is this done?
https://github.com/mrpmorris/Morris.AspNetCore.Authentication.Metamask.Blazor/...
0
votes
1
answer
152
views
Application upgrade from Xamarin to MAUI is resulting in a NuGet restore loop error
I started an internship this week and have just received my first piece of work - upgrading a super old legacy Xamarin app to MAUI. I have never worked with dotnet or c sharp before so I am just going ...
1
vote
0
answers
40
views
Nuget Package include runtimeconfig
I have a Dotnet exe application (App1) which I am trying to create a nuget package.
This package is used in another application(App2) which includes the above Nuget Package and invokes its dll's. This ...
0
votes
3
answers
363
views
--no-build option doesn't work with dotnet pack command
I'm using following Azure devops pipeline tasks to create nuget package.
task-1 : build the projects
task-2 : Digital sign the binaries.
task-3 : Without rebuilding the binaries, Create nuget package ...
1
vote
0
answers
157
views
How to prepare a NuGet package containing native dlls for both x86 and x64 and the respective .NET wrapper?
After doing my research I have come up with a solution, but it has some minor problems which I want to resolve.
The NuGet package consists of a single C# project:
<Project Sdk="MSBuild.Sdk....
0
votes
1
answer
452
views
Stop xunit from generating global usings
I'm testing with xunit on multiple frameworks (.Net 8 & .Net Core 3.1). The problem is that it keeps auto-generating this GlobalUsings file in my obj folder:
// <auto-generated/>
global ...
0
votes
2
answers
185
views
How can i create single nuget package out of two class libraries?
I have two class library projects (ClassLibA and ClassLibB) in my solution, and I would like to package them together into a single NuGet package, rather than creating separate packages for each ...