nuspec

Optional or conditional folders in NuGet files tag?

谁说我不能喝 提交于 2019-12-10 13:33:53
问题 I would like to do something that MsBuild has: set up conditions the files referenced in .nuspec file. Basically it would look like this: <files> <file src="myFolder/aaa/*.dll" target="lib\net45" condition="!Exists('bestFolder')" /> <file src="bestFolder/ccc/*.dll" target="lib\net45" condition="Exists('bestFolder')" /> </files> Is there a way to do this? There can be several more folders and files grouped by a specific condition. Also note that some folders should be scanned if they exist.

nuspec contentFiles Example

╄→尐↘猪︶ㄣ 提交于 2019-12-10 13:09:45
问题 Yesterday NuGet 3.3 was released (release notes) and there is a new contentFiles element supported (docs). However, I can't seem to get this working. I'm using the NuGet.exe as the build process. It is updated to v3.3. I have also updated my Visual Studio to 2015 Update 1 and rebooted. Here is my nuspec file (Hello.world.nuspec): <?xml version="1.0" encoding="utf-8"?> <package> <metadata minClientVersion="3.3"> <id>Hello.world</id> <version>1.0.0</version> <title>Greeting library</title>

How to to produce both release and pre-release packages from one nuspec in VSTS?

耗尽温柔 提交于 2019-12-06 15:42:36
Currently my build produces both packages having a newer version every time: Release: Automatic package versioning = Use the build number Pre-release: Additional build properties = Version=$(user.BuildFullVersion)-beta And the only one nuspec has a placeholder to version: <version>$version$</version> I want to increment version manually, that it - repetitive build would produce same version until I increment it manually. How can I achieve that still having single nuspec? Can I adjust package version in the pack tasks like this: Release: $(PackageVersion) = $(PackageVersion) Pre-release: $

How to exclude a subdirectory and contents from a nuget package

允我心安 提交于 2019-12-06 01:34:43
So I've a website that I'm trying to package for Octopus Deploy. I've the following folder structure: Web | Views | WantThis Dontwantthis WantThis1 WantThis2 ... (lots more) Scripts I'm trying to exclude the "Dontwantthisfolder" So my nuspec looks like this: ... <file src="..\Web\Views\**\*.*" exclude="**\Dontwantthis\**" target="web\Views" /> ... It's not working though, I still get the "Dontwantthis" folder. Anyone know how I can achieve this? You're quite close. Try this: <files> <file src="..\Web\Views\**\*.*" exclude="..\Web\Views\DontWantThis\*" target="Web\Views" /> </files> I was able

Packing static content in Nuget for PackageReferece projects

房东的猫 提交于 2019-12-05 12:07:37
I have a Class Library (net47) project and I'd like to pack into a nuget my dll and several files of static content (js, css, images...). I want to use this dll and the content from the consumer projects. These projects will be MVC PackageReference projects. In these projects the local static files are in the wwwroot folder. I have tried this: NuGet ContentFiles Demystified but I get my js and css files referenced (they aren't copied to my project content). In my nuspec I've tried with all build options: EmbeddedResource, Content, None and Compile, but these references are imported always in

How to debug using Nuget source code

放肆的年华 提交于 2019-12-04 15:24:45
As a temporary solution (until we get an internal Symbol server setup), I am trying to build Nuget packages that include all source code for the DLL so that our users can debug its code. I have build the following Nuspec file <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"> <metadata> <id>My Assembly</id> <version>1.0.0</version> <title>My Assembly</title> <authors>Me</authors> <owners>Me</owners> <requireLicenseAcceptance>false</requireLicenseAcceptance> <description>My description</description> <copyright>© Me 2014</copyright>

nuspec contentFiles not added to a project

空扰寡人 提交于 2019-12-02 19:20:53
问题 I have a web project (mvc5) with a project.json inside. Also, I have a nuget package. Inside this package (besides the dll reference) I have some Content files (cshtml files, css, javascript etc). There are 2 goals to achieve: After installing the package to the project I want to get Content Files included to the project. After Building the project I want nuget to restore the content files The nuspec file: <?xml version="1.0"?> <package> <metadata> /.../ <dependencies> <group targetFramework=

Unable to resolve assembly reference issue without frameworkAssemblies

吃可爱长大的小学妹 提交于 2019-11-30 02:38:08
I'm trying to validate that Protocol Buffers is going to work with the new portable runtimes from the ASP.NET team and ideally most other modern environments. The 3.0.0-alpha4 build was created a while ago using profile259, so I would expect some changes to be required in some cases, but I thought I'd give it a try. I'm aware of Oren Novotny's post about targeting .NET Core , and expected to have to make some changes to the Google.Protobuf nuspec file , but the error I'm running into has me stumped. DNX version: 1.0.0-rc1-update1 The scenario I'm currently trying to test is a console app

Unable to resolve assembly reference issue without frameworkAssemblies

我的未来我决定 提交于 2019-11-28 23:34:38
问题 I'm trying to validate that Protocol Buffers is going to work with the new portable runtimes from the ASP.NET team and ideally most other modern environments. The 3.0.0-alpha4 build was created a while ago using profile259, so I would expect some changes to be required in some cases, but I thought I'd give it a try. I'm aware of Oren Novotny's post about targeting .NET Core, and expected to have to make some changes to the Google.Protobuf nuspec file, but the error I'm running into has me

How can I set the 'copy to output directory' property in my nuspec file?

一笑奈何 提交于 2019-11-27 05:28:47
Please consider the following nuspec file: <?xml version="1.0"?> <package > [SOME METADATA] <files> <file src="bin\x64\$configuration$\GR*.filetype" target="content\" /> </files> </package> The above has successfully packaged up the filetype files starting with 'GR' and has added them to my new, referencing, solution. The problem is that I want these files to always be copied to the output directory. Can I do this via nuspec without having to manually amend the properties in my new solution? Leo Liu-MSFT How can I set the 'copy to output directory' property in my nuspec file? Martin pointed