create-package | Ultimate starter kit for JS , JSX , TS , TSX modules | Frontend Framework library
kandi X-RAY | create-package Summary
kandi X-RAY | create-package Summary
Ultimate starter kit for JS, JSX, TS, TSX modules
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 create-package
create-package Key Features
create-package Examples and Code Snippets
Community Discussions
Trending Discussions on create-package
QUESTION
What is the method to create a web application nuget package with TeamCity?
I'm totally confused after .NET became a thing. What I'm attempting to do, is to create a nuget package with a .Net Framework 4.8 webapplication in it.
The ways things worked before, seems to be outdated or deprecated. In TeamCity, the meta runners that were used previously are either deprecated or not functioning very well.
When I'm googling f.ex. msbuild https://docs.microsoft.com/en-us/nuget/create-packages/creating-a-package-msbuild I get stuff about .Net Core and .Net Standard, nothing about .Net Framework. And the stuff is often 10 years old or more.
I might have gone stupid after how nuget works in .NET, since everything is tied to projects and you can actually avoid having code shipped (the cs files) with the web application.
...ANSWER
Answered 2021-Feb-08 at 08:27The closest I've gotten so far, is by making a comprehensive .nuspec file, then run in the project directory of the web application after the project has been built with all necessary dependencies.
However, the build output will log warnings:
QUESTION
I have defined and created a content-only package to share JSON schemas between different projects. I packaged it using nuget.exe
, and could successfully add it to .Net Framework 4.6 library project.
But when I tried to add it to the DotNet Core 3.1 library project (NUnit tests) the following error occurred:
...ANSWER
Answered 2020-Aug-10 at 05:52The NU1212
error does point to dotnet tool install
, it does not seem to be caused by your package directly. Are you sure that your are adding your package correctly via the NuGet package manager or console? It is not reproducible in a .NET Core 3.1 library or NUnit project type.
As @Perry Qian-MSFT suggested, you should always make sure that the old NuGet package is removed completely before you add a new one, especially if you did not change the package version in the NuSpec. It is a common issue that the old, cached package is used instead. To clear all NuGet package caches use one of the following commands.
- In
dotnet.exe
uselocals --clear all
- In
nuget.exe
uselocals -clear all
- In Visual Studio >= 2017 go to Tools > NuGet Package Manager > Package Manager Settings and click Clear All NuGet Cache(s)
Question is how do I create DotNet Core 3.1 library compatible content-only Nuget package?
NuGet 4.0+ with PackageReference
uses contentFiles
, see this reference.
Content files are included in a package using the element, specifying the content folder in the target attribute. However, such files are ignored when the package is installed in a project using PackageReference, which instead uses the element.
You can keep copying the files to the content
directory for compatibility, but you have to copy them to the contentFiles
directory, too. You have to make sure that they are located under contentFiles\any\any\
, otherwise they will not be extracted to projects with any target framework.
QUESTION
I'm creating a nuget package that is refercing a number of different packages for the platforms.
I don't sem to be able to reference Xam.Forms.Platform. from the various ItemGroups as well as packages I've added via nuget for specific platforms.
I'm using this as a reference : https://docs.microsoft.com/en-us/nuget/guides/create-packages-for-xamarin and my csproj is this
...ANSWER
Answered 2020-Jul-28 at 03:29try to change your TargetFrameworks
become like this
QUESTION
I use Poetry to build tar.gz. and .whl of my package. Cython docs recommend to distribute cython generated c files along with pyx ones. http://docs.cython.org/en/latest/src/userguide/source_files_and_compilation.html#distributing-cython-modules
What should I add to build.py
or pyproject.toml
to generate c/cpp files by calling poetry build
and poetry build -f sdist
?
I tried this (from Create package with cython so users can install it without having cython already installed):
build.py:
...ANSWER
Answered 2020-Feb-29 at 23:32The current version of poetry
(1.0.5) ignores custom build.py
when building an sdist, so there's no chance without modifying poetry
first. In the meantime, you can use third-party projects like taskipy
to replace the poetry build
command with a custom one, e.g.
QUESTION
I am trying to run packagedeployer using PowerApps Deploy Package and getting an error "You cannot call a method on a null-valued expression". This is a CRM Package solution that is created using Dynamics 365 SDK templates. Please find below the link with details
...ANSWER
Answered 2020-Feb-20 at 08:41"You cannot call a method on a null-valued expression"
The information is not enough to solve the problem, but i can suggest a way you can troubleshoot.
First, set the system.debug
value to "true" in your pipeline Vatiables
,
and then run the build again and you shall see the detailed exception message in the debug information(with ##[debug] before them) in the log information.
Most likely you will see it's a ps1 file that raised the error since the error message you cannot call a method on a null-valued expression usually occurs in ps script and it should points out in which line which char you got the error.
Then, add a PowerShell Script
task down below your PowerApps Deploy Package
task, add an Inline
script using the Get-Content method:
QUESTION
Having a problem publishing a package with only build utilities. Being precise: I followed the nuget guideline which files have to be where. So I created a simple [project][2] in which I just want deploy the .props
and .targets
files in the build folder for third-party projects. When I pack it with dotnet pack Teronis.Packaging.ProjectBuildInPackage.csproj --configuration Release)
the .nupkg file does contain all necessary files:
ANSWER
Answered 2020-Jan-12 at 10:41After a little journey I found the solution. So there were two issues to solve.
First the source path: Do not use any nuget cache as feed source. Here for me (nuget locals all -list
):
QUESTION
I am working on creating a sample Nuget package to test out the process of creating an internal Nuget package for use in another project of mine. My end goal is to create a simple Nuget package, which can be installed onto another simple C# project, and tested out.
I have been following the Microsoft tutorial to create & publish a package using VS: https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-visual-studio-net-framework
I successfully created & published my package on nuget.org, called MyNugetPackage
, and attempted to install it onto my other C# project called TestingMyNugetPackage
. I received an error in the NuGet package console stating:
Package does not support any target framework
This error makes sense, because I had read about supporting multiple .NET
versions and specifying the version under the lib
folder, and I definitely did not do that when creating my package:
https://docs.microsoft.com/en-us/nuget/create-packages/supporting-multiple-target-frameworks
This idea of lib
folder makes sense to me and I think I understand how to add my target .NET
version to it. However, I cannot find this folder anywhere! It's not anywhere in the C# project directory. I assume I may need to create it on my own, but I'm not sure where to put it.
Many tutorials and SO questions I have read about this topic talk about how to use the lib
folder, but no one ever says where it is. I'm a complete beginner to this and I know I am missing something obvious here, but I'm not sure what it is.
Edit: I did try to change my .nupkg
file to a .zip
file and extracting the contents in attempt to view the lib
folder. This did work in extracting the contents, but I did not see any lib
folder after expanding entire project tree and searching for lib
.
Here is a quick layout of my C# solution tree:
Solution titled MyNugetPackage
with a MyNugetPackage.sln
file, a MyNugetPackage.csproj
file, and a simple class Logger.cs
that just has a public void Print(string text) { Console.WriteLine(text); }
method:
ANSWER
Answered 2019-Nov-25 at 21:00A NuGet package (.nupkg) is just a zip file. If you are trying to view the contents of this file, open it like a zip file (using 7zip or something). Alternatively change the extension to zip. In the package you will find the "lib" folder as well as the .nuspec, and package folder (among other contents). But this is the resulting package that is built when you Pack your project, changes here would have no affect on your code.
If you're just trying to target one or more frameworks. In VS, edit your project file (.csproj). This file is an XML with a PropertyGroup that contains either a "TargetFramework" OR a "TargetFrameworks" element. To target a single framework add a TargetFramework element, to target multiple use the TragetFrameworks instead.
To target a single .Net framework:
QUESTION
I have a two-part project. Part one is a set of C# bindings that wrap a native .dll or .so library. This produces a NugGet package, which is then consumed by the other project.
The other is a Xamarin Forms project that consumes those C# bindings. The UWP portion of my Xamarin project has no issue finding the native library inside the NuGet package. The Android project, however, cannot find it. Indeed, opening the APK reveals that the native .so file never makes it in.
I'm using NuGet's mechanism for including arch-specific libraries, by including each platform-specific .dll-or-.so in a /runtimes/platform-arch/native/
folder. My folder structure looks like this for the bindings project:
...and I can confirm that the folder structure is properly preserved in the resulting .nupkg
file, with a runtimes
folder at the root of the package, and a series of subfolders underneath it.
I generate the NuGet package by using the new built in .csproj mechanisms, without any .targets files. My csproj for the NuGet project looks like this:
...ANSWER
Answered 2019-Nov-18 at 08:59Generally speaking you need to share more info in your Q, such as your code and packaging files.
does NuGet simply not understand that a Xamarin.Android project needs native libraries copied into the APK?
Yes it does. You need to package your NuGet in a way that MSBuild includes this file in the final APK.
For Android, this is done with AndroidNativeLibrary
And a working example here https://github.com/mfkl/libvlc-nuget/blob/master/build/VideoLAN.LibVLC.Android.targets
I have noticed that this only works if I build in an x64 configuration, and I am compiling on an x64 machine.
You likely need to modify your targets file to handle the 3 possibles cases AnyCPU
, x86
and x64
. Your target should run before the actual build, with BeforeTargets="BeforeBuild"
.
You can use something like
QUESTION
I have a C++/CLI DLL that interfaces a third party native DLL. I want to pack this as Nuget.
I followed this official MS guide, this blog post and read through this other question.
So here is what I did:
First, I created the proper nuspec file:
...ANSWER
Answered 2019-Apr-16 at 07:44Turned out that the official MS documentation was not usable here.
This question was/is listed as "related" here and the accepted answer there made it work for me. I used the example project on Github as a reference.
So here is how I got it to work:
- Opened the project properties, went to Configuration Properties / General, selected All Configurations and All Platforms, and as Output Directory, I specified:
$(ProjectDir)bin\$(Platform)\$(Configuration)\
- Rebuilt the project for x86 and x64 in Release mode
- Adapted the Nuspec to be like this:
QUESTION
I'm busy adding support for multiple .net frameworks and platforms. The different frameworks seem to work. But if the right platform specific dll is used I don't really know how to check this. Now it seems that the MSIL/Any CPU version is always used...
First the nuget package
I followed the descriptions at:
https://docs.microsoft.com/en-us/nuget/create-packages/supporting-multiple-target-frameworks
And I'm also using .targets and .props files.
For the code look at Pullrequest Opensource project: https://github.com/lucascebertin/Serilog.Sinks.Burst/pull/1
Using the nuget package
When using the Nuget package everything seems to work. But currently I do 2 checks to see if the right platform dll is used. Note: The platform choice is MSIL/Any CPU, x86, and x64.
I do a diff between the dll in my package and the extracted/copyied one in the bin folder of the using project: Looks like the MSIL/Any CPU dll version is copyied.
The second check is from code to see which dll is used runtime:
...ANSWER
Answered 2019-Apr-09 at 11:58There is usually no need to include any architecture-specific folders in your package unless it contains any assemblies that specifically target ARM, x86, or x64. This typically applies only to native (non-.NET) assemblies that your C# code may wrap.
If your package contains only managed assemblies, the most common thing to do is to build against Any CPU in release mode.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install create-package
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