I need to use native c libraries in my library(that supports several Core TFs and .net framework) which is published via nuget. I configured it via .csproj file and runtimes folder. But I noticed that when I consume my NuGet via dotnet add package .. in some cases, the native libraries are not copied into the expected folder after consuming, however when I use the VS UI Nuget package manager->Manage Nuget Packages for Solution, all files are placed into correct places.
So, I assume that Nuget package manager makes more steps than just call dotnet add package .., but it's unclear what exactly happens, any help will be appreciated.
Difference in nugets processing via `dotnet add package ..` vs nugets adding via visual studio UI
1.3k Views Asked by dododo At
1
There are 1 best solutions below
Related Questions in VISUAL-STUDIO
- The current .NET SDK does not support targeting .NET Core 6.0. Brand new WPF Project VS Community 2022 17.9.5
- Dotnet Run is not working but the application is running in Visual Studio
- Is there a way to support Tailwind @apply in Visual Studio?
- How can I eliminate compile warnings using ZLib in Visual Studio
- C++(or Visual Studio) saving the file will not preserve the original file contents
- VS Community 2022 cannot install dotnet-ef when i try to publish
- Visual Studio 2022 convert spaces to tabs on checkout and back to spaces on checkin
- What should I do if Visual Studio has a restriction on creating files with a long name or a long path to these files?
- Command line error D8036 - not allowed with multiple source files with node-gyp and VS2022
- Migrate Old VS 2015 .suo file to the New VS 2022 DocumentLayout.json
- How to make one executable visual studio, that users can run?
- Use tabs instead of spaces in .csproj file in Visual Studio 2022
- Unity - scrollview/dragging breaks after specific scene inactivity
- How to make Visual Studio 2022 project launch Windows Terminal instead of PowerShell?
- Why is 'EDITBIN /STACK:2097152 w3wp.exe' cmd is giving me an LNK1342 error?
Related Questions in .NET-CORE
- Repository manager receives the wrong connection string in .net core
- How can I overwrite the localization strings in a library
- Custom type resolution
- How to enable log to console Cosmos Client SDK requests
- Issue with Entity Framework Core: .Include() and .AsNoTracking() not displaying expected related entities
- Using Python CDK to bundle dotnet 8 code to AWS Lambda function
- How to make Visual Studio 2022 project launch Windows Terminal instead of PowerShell?
- Custom Metrics stop saving in App Insight after one hour
- How to send select input data for form submission?
- When I use built-in DockerFile in Visual Studio, I see no errors, but when I try to create image and container using terminal I get an error
- Failure to Execute the DBCommand: SQLite Err. 1 - C# / .NET / Entity Framework Core
- KeyCloak Handshake causing timeout
- problemas con los CORS en .net core 7 y angular 15
- Access Registed Scoped Services and Transient Services using GetService()
- .NET Core DB vs JSON model design
Related Questions in NUGET
- How do I locally specify the path for nuget in my dockerfile?
- Finding all available versions of a NuGet package within a specific version range
- An error occurred while trying to restore packages: 'Dapper' already has a dependency defined for 'System.Data.SqlClient'
- .NET 6 Custom Nuget package referencing other packages - Do I have to include the other packages myself?
- What is the trigger for JFrog Artifactory to sort a nuget package as "prerelease"?
- Force new version of a different package without referencing it
- dotnet build not able to find nuget package in custom source while Visual Studio manage it
- How to resolve the errors when Nugets need to be downgraded
- How can I copy plug-in DLLs from a sub folder using NuGet
- .NET dependency management: `dotnet add package` vs. Paket?
- Nuget Package downloaded to wrong directory
- How to resolve NuGet Transitive Packages with vulnerabilities
- error NU1101: Unable to find package Telerik.Drawing.Skia.Trial. No packages exist with this id in source(s)
- ASP.NET Core library project that produces NuGet package
- NuGet package doesn't copy file to destination project
Related Questions in NUGET-PACKAGE
- Getting error "The located assembly's manifest definition does not match the assembly reference"
- How can I copy plug-in DLLs from a sub folder using NuGet
- How to add nuget package for offline tfs build task
- How to resolve NuGet Transitive Packages with vulnerabilities
- How install MathNet.Symbolics in ASP.NET 4.8
- NuGet package doesn't copy file to destination project
- Azure Devops pipeline to build .NET Framework Artifact multiple projects
- An error occurred while trying to restore packages. Unable to find version 'x.x.xxxx.xxx' of Moq
- Fail to load package dependency at runtime
- Compatibility Problem after Update from Xamarin.Forms to .Net MAUI
- Increasing the Lifespan of OTP Codes in C# Using PureOtp Library
- Project with referenced nuget package is not able to find files
- .net Unit Test Discovery through nuget package
- Could not load file or assembly 'System.Runtime, when creating nuget spec based on the assembly
- Install local NuGet package in Rider
Related Questions in MANAGE-NUGET-PACKAGES
- Nuget packages suddenly disappeared in my .net maui project
- Overriding Remote Repository in Premake5 script running
- Nuget Source Authentification 401 Authentification
- Add Feed to Nuget in Visual Studio
- nuget local feed stops working when package with two different versions is present
- Download only necessary NuGet packages
- Why is the 'Version' column in Visual Studio NugetPackageManager showing blank for .NET Framework projects?
- What is the significance of the 'Version' column in Visual Studio NugetPackageManager interface? (as distinct from the 'Installed' column)
- Nuget Update failure in Visual Studio 2019
- How do I manage local nuget packages safely?
- Difference in nugets processing via `dotnet add package ..` vs nugets adding via visual studio UI
- Facing NuGet issue "'5.0.0+42a8779499c1d1ed2488c2e6b9e2ee6ff6107766' is not a valid version string." while installing packages
- Getting error when using GitHub Actions to push the nupkg to my GitHub packages
- can't find nuget packages from nuget server
- Long path issue occurred while try to install Nuget package in Visual Studio project
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Actually,
dotnet add packagedoes the same effect as Nuget package manager UI in VS IDE. They simply install a Nuget package into your project and there is no difference. No additional operations will be performed. Like add some xml node inSo I think there is something else wrong in your project.
Please check under tips to troubleshoot your issue:
1) clean nuget caches first or just delete all cache files under
C:\Users\xxx(current user)\.nuget\packages.2) And if the
runtimesfolder does not exist under your project, I think it is controlled bydependency assets. LikeExcludeAssets=runtime or native. It will prevent the function ofruntimesfolder. Please see this official document.So after you finishing installing the nuget package, you should check your
csprojfile, and make sure that there is no such likeunder PackageReference node.
If there is any this node, please delete it.
3) delete
binandobjfolder. Then rebuild your project to test again. Or if you use dotnet command line, you should additionally adddotnet buildcommand. In my side, I rundotnet build -p:platform=xxx;Configuration=Release.