nuget-spec

Importing content-only package to DotNet Core 3.1 project in Visual Studio 16.6

守給你的承諾、 提交于 2021-01-29 18:02:38
问题 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: NU1212 Invalid project-package combination for <package name>. DotnetToolReference project style can only contain references of the DotnetTool type Nuget support documentation (package

Restore nuget package in different folder

穿精又带淫゛_ 提交于 2021-01-29 06:42:13
问题 We have some projects (Plugins) which use in several projects, the output of these projects will copy to the specific folder in the target projects (Plugins folder). We pack project with Visual studio 2019 Pack option and after that, we push npkg files to our local NuGet server for further use. The problem is when we want to get these packages, Package Manager should put lib files in the Plugins folder, but unfortunately, the package manager extracts these in the root folder (bin). My

Could not install package '--'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5'

狂风中的少年 提交于 2020-12-30 04:51:24
问题 I created this package, I need it in a project but couldn't install it, this error appears: Could not install package 'Mshwf.NiceLinq 1.0.9'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author I don't know why this happen, in another project (Console) I changed the framework to 4.6 and

Could not install package '--'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5'

流过昼夜 提交于 2020-12-30 04:51:11
问题 I created this package, I need it in a project but couldn't install it, this error appears: Could not install package 'Mshwf.NiceLinq 1.0.9'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author I don't know why this happen, in another project (Console) I changed the framework to 4.6 and

Nuget Package - Referenced Assemblies Are Not Being Included As Project References

99封情书 提交于 2020-01-14 17:52:36
问题 Before I go into the problem, let me quickly explain my goal: I have a template project that I use for each website that I build, which includes base classes, common pages (e.g. contact us), useful utilities (exception logging), etc. I want to make this template reusable and updatable. Previously I was using a Visual Studio Project Template, but I had issues in referencing all of the assemblies I needed, so I turned to Nuget. I was under the impression that this would be easier, and also

Nuget Package - Referenced Assemblies Are Not Being Included As Project References

我只是一个虾纸丫 提交于 2020-01-14 17:51:32
问题 Before I go into the problem, let me quickly explain my goal: I have a template project that I use for each website that I build, which includes base classes, common pages (e.g. contact us), useful utilities (exception logging), etc. I want to make this template reusable and updatable. Previously I was using a Visual Studio Project Template, but I had issues in referencing all of the assemblies I needed, so I turned to Nuget. I was under the impression that this would be easier, and also

nuget package add folder to solution

限于喜欢 提交于 2019-12-24 18:32:08
问题 i have to create a nuget package but i have a problem: i want to add a folder named "Config", this folder contains three XML files. after a search on the web, i have tried two ways (editing my nuspec file) to add this custom folder into my nuget package: 1) <file src="Config\*.*" target="content\Config" /> 2) <file src="Config\*.*" target="Config" /> ... but no one of these seem to work! I have tried to add this package on a Test's solution (Console application), the dll was attached to the

Copy files from a subfolder to root in nuspec

ぃ、小莉子 提交于 2019-12-23 07:27:52
问题 I'm trying to copy a bunch of files from a specific folder into the root of a nuget package. Here's how it looks in my nuspec file: <files> <file src="dist/product1/**/*.*" /> </files> I want the files under dist/product1 be copied to root of nuget package but instead all files go to dist/product1 folder in nuget file, meaning it preserves the folder structure. I tried many variations. Any ideas? 回答1: Using NuGet Package Explorer, I found out that I can use the following syntax. <files> <file

Nuget pack does not honor number of digits on assembly version

我与影子孤独终老i 提交于 2019-12-22 05:14:37
问题 I need nuget pack to generate a package version with only 3 digits (we want to do semantic versioning on it) but when I call it on a csproj which has an AssemblyVersion attribute set to "1.0.0", the resulting nupkg file ends with version "1.0.0.0" in it's metadata (and file name). Why doesn't the command line tool honor the amount of digits specified on the AssemblyVersion attribute? I started this with a call to nuget spec against the csproj file, which generates a stub nuspec file like this

declaring nuget packages that depend on each other in one solution

拜拜、爱过 提交于 2019-12-20 18:15:10
问题 We have solution with a lot of projects and a more or less complex dependency graph between those projects. Now each of those projects should become its own nuget package and the dependency graph of the nuget packages should mirror the on of the projects. I have two questions: Is it possible to achieve this while keeping all projects within the same solution? If so how? Is advisable to keep all projects in the same solution? What would be the a common / "best practice" approach to this? 回答1: