NuPack | NuPack .NET 4.0 produces nuget package at build time | DevOps library
kandi X-RAY | NuPack Summary
kandi X-RAY | NuPack Summary
NuPack is an easy way to produce a nuget package for .NET 4.0+ based on AssemblyInfo or nuspec when building with Visual Studio. It is materialized as a nuget package. When NuPack is reference by a project, no dependency is created, there is only a new build step to automatically pack the project output into a nuget package with project name as id.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of NuPack
NuPack Key Features
NuPack Examples and Code Snippets
Community Discussions
Trending Discussions on NuPack
QUESTION
We recently setup a local nuget server to improve our handling of dependencies within our projects. To package and push our libraries, we use the "new" project format in Visual Studio and a marketplace addon called NuPack-Nuget Packager.
Workflow for development is then to create a new project and pull the required dependencies.
Now we got a strange behavior on all workplaces.
Eg. we have 2 libraries: LibA (Version 1.1.0) and LibB (Version 2.5.0) where LibB depends on LibA and references it as a project reference. I have my project referencing LibB (Version 2.5.0) via Nuget.
When I change LibB (now Version 2.5.1) and push it to our Nuget and update the reference in my project everything appears to work fine, the project builds and has no errors, but at runtime, once code is executed that references LibA (still Version 1.1.0, no changes made) I get a FileNotFound Exception: Assembly LibA, AssemblyVersion 1.1.0 could not be found.
The only workaround for now is to package a new LibA as Version 1.1.1 (no code changes) and push it to the nuget server and update the reference in my project to Version 1.1.1 .
Does anyone know a cause / a solution to this?
EDIT Things that do not solve the problem:
- Clean / Rebuild the solution (neither Dependencies nor Project)
- Update-Package -reinstall in package manager commandline
- Clearing Nuget caches and restoring all dependencies
- Removing and readding nuget reference in project by hand
EDIT Exact error message (Assembly name changed)
System.IO.FileNotFoundException: 'Could not load file or assembly 'Lib.A.Namespace.1.1, Version=1.1.7, Culture=neutral, PublicKeyToken=null'. Das System kann die angegebene Datei nicht finden.'
Translation of the last part: "File could not be found"
EDIT All dependencies are compiled as AnyCPU for NetStandard2.0
...ANSWER
Answered 2018-Dec-19 at 10:04Problem has been identified. NuPack-Nuget Packager is 'at fault' here. For anyone stumbling upon this in the future:
Our problem was the way the NuPack-Nuget Packager works. While the workflow seems to be handy (set Assemblyversion, set output dir, set nuget server, finished), the project will not be build for the package deployment and thus relies on the previous build, which internally still holds the previous AssemblyVersion.
We finally got to the solution after finding out we were pulling obsolete references (found in the User/.Nuget/Packages folder).
We did not come up with a final, one step solution for build, package and deploy yet.
QUESTION
I am using NuPack (https://www.nuget.org/packages/NuPack/) to create a Nuget automatically on build but when I go to upload my Nuget file, it gives me this error:
Invalid package version for a dependency with id 'Newtonsoft.Json' in package 'Float.1.0.0': ''
.
- What is the error telling me?
- How do I fix the issue?
ANSWER
Answered 2017-Oct-12 at 22:04I am not familiar with NuPack, but usually you'd have a a nuspec and need to specify the version of your dependency:
https://docs.microsoft.com/en-us/nuget/schema/nuspec#dependencies
Look for your Newtonsoft.Json entry and provide a version following these guidelines:
https://docs.microsoft.com/en-us/nuget/reference/package-versioning#version-ranges-and-wildcards
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install NuPack
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page