nuget,nuget-package,nuget-package-restore,nuspec , how to create nuspec file in specific folder?


how to create nuspec file in specific folder?

Question:

Tag: nuget,nuget-package,nuget-package-restore,nuspec

I tried to create .nuspec file in a different folder by giving path but it is giving me error

Nuget.exe spec ..\MYDEMOFOLDER
Nuget.exe pack ..\MYDEMOFOLDER\MYPROJECT.csproj
pause

want to create MYPROJECT.nuspec in ..\MYDEMOFOLDER folder location

getting error to create nuspec file 
The package ID '..\MYDEMOFOLDER' contains invalid characters. Examples of valid package IDs in
clude 'MyPackage' and 'MyPackage.Sample'.

Answer:

Unfortunately nuget.exe spec doesn't work like that. It expects a package ID.

If you need to create a nuspec in a given folder, you will need to change to that directory.

pushd ..\MYDEMOFOLDER          // switch to new directory (remember current)
nuget spec MYPROJECT           // create MYPROJECT.nuspec file
nuget pack MYPROJECT.csproj    // pack MYPROJECT.csproj
popd                           // return to previous directory

NOTE: If you're going to pack a project file, you don't need to create a nuspec file, as nuget will create one automatically.


Related:


How to create a powershell script that triggers a NuGet Update-Package –reinstall?


powershell,nuget-package
I have a nuget spec that installs both library file (dll) and two zip packages on a specific folder. Updating the packages is no issue when doing it from Visual Studio 2013 manually. However, when it is being triggered from either our CI servers TeamCity and CCNet, it is only...

how to create nuspec file in specific folder?


nuget,nuget-package,nuget-package-restore,nuspec
I tried to create .nuspec file in a different folder by giving path but it is giving me error Nuget.exe spec ..\MYDEMOFOLDER Nuget.exe pack ..\MYDEMOFOLDER\MYPROJECT.csproj pause want to create MYPROJECT.nuspec in ..\MYDEMOFOLDER folder location getting error to create nuspec file The package ID '..\MYDEMOFOLDER' contains invalid characters. Examples of valid...

C# sqlite Unable to load sqlite3.dll


c#,sqlite,sqlite3,nuget
I have used nuget to install sqlite-net and System.Data.SQLite (x86/x64). I have rebuilt and I have restarted and I still get the following error: Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E). This is the line that triggers it: db = new...

Visual Studio 2013 - Setting up Nuget packages for every project


visual-studio,twitter-bootstrap,templates,nuget
I want all of our future projects to use Bootstrap LESS and other nuget packages. Rather than supply a document to all my team members and hope they remember to set it up, am I able to create a skeleton project then template it so it appears under File ->...

NuGet Package Manager Console Command Fails But Search -> Install Works


nuget
I was just installing a new package thats not in my local cache. I took the command directly from the NuGet site. Executing the command in the PMC failed with the following error: The source at All [(Aggregate source)] is unreachable. Falling back to NuGet Local Cache at C:\Users\Jammer\AppData\Local\NuGet\Cache Install-Package...

Can't reinstall package


visual-studio-2013,nuget
On a new Win8.1 reinstall, with all of my code restored from backup, I'm suddenly now getting a yellow NuGet warning when I issue the command update-package -reinstall -project ui: Skipped reinstalling package 'AeroWizard 2.0.9' in project 'Ui' because the package does not exist in the package source. I'm using...

NuGet restore unable to resolve host 'www.nuget'


.net,visual-studio-2012,nuget
I am trying to use the nuget restore command to restore NuGet packages on a CI server. I can run it locally without issue, but on the server I am getting a number of warnings (errors, really): WARNING: The remote name could not be resolved: 'www.nuget' WARNING: The remote name...

Link error: Installing boost zlib filters using NuGet in Visual Studio (2012)


c++,visual-studio-2012,boost,nuget,zlib
I've installed these packages: boost boost-vc110 boost_iostreams_zlib zlib But the linker is unable to find the required lib: 2>LINK : fatal error LNK1104: cannot open file 'libboost_zlib-vc110-mt-1_58.lib' Is there a way to fix this problem manually by changing the file name or am I still missing a package?...

Editing Nuget Package C# Helixtoolkit.WPF


c#,wpf,nuget,nuget-package,helix-3d-toolkit
I am using the Helixtoolkit.WPF in my C# program. I have imported the NuGet package and it is working perfectly. However, I am wanting to edit one of the files, specifically GridLinesVisual.cs. I want to change how one of the functions in that file operates, but can’t seem to get...

Forked a project but what is .pp?


c#,git,nuget
Sorry if this is not the right place to post this type of question...if it's supposed to be on another site please let me know or feel free to close. I've got a simple question about github. I am very new to it and "forked" a project I wanted to...

Can not download nuget packages


nuget
I'm getting the following error: WARNING: The ServicePointManager does not support proxies with the https scheme. This started happening randomly. I'm not behind a proxy, and restarting did not fix anything....

NuGet fails to find existing package


c#,nuget,nuget-package,nuget-package-restore
How it's possible that NuGet's Install-Package fails with Unable to find version 'x' of package 'y' when that exact version is released as NuGet to official repository and it shown on the https://www.nuget.org/packages/y page. Here is specific sample with nuget.org content and NuGet Install-Package command output. UPDATE. Package sources are...

Where to find Microsoft.VisualStudio.QualityTools.WebTestFramework


c#,visual-studio,visual-studio-2013,nuget-package
I am missing a reference to this .dll file and I can't find it from the add references tab, it is not there in both extensions and frameworks and neither nuget package manager lists it.

“Unable to satisfy package dependency constraints” with Breeze.Server.WebAPI2


breeze,nuget-package,visual-studio-2015
I am trying to add the Breeze.Server.WebAPI2 Nuget package to Visual Studio Community 2015 RC. When I click on install I get "Unable to satisfy package dependency constraints" The listed dependencies are: Microsoft.AspNet.WebApi.OData (>= 5.2.2 && < 6.0.0) Microsoft.AspNet.WebApi.WebHost (>= 5.2.2 && < 6.0.0) Breeze.Server.ContextProvider (=1.5.4) WebActivator I tried adding...

LocalPackageRepository returns IsLatestVersion=true for all packages


nuget,nuget-server
I've created a folder on my C:\packages. Inside I've created two packages with identical Ids but have different versions. I the use Nuget.Core to create a LocalPackageRepository pointing to this directory. When I query for the packages using respository.FindPackages("myId")both packages are correctly returned by the service. However, the IsLatestVersion is...

Can't open namespaces in a Nuget package


visual-studio-2013,f#,nuget,nuget-package,type-providers
I did the following: Create a new F# project in VS2013 In Package Manager Console, execute while targetting the new project: Install-Package FSharp.Azure.StorageTypeProvider In the file, type: open FSharp.Azure.StorageTypeProvider ...as can be seen in the examples included in the Github project. But I get the error: "The namespace or module...

Visual Studio 2015, Nuget and “same key has already been added.”


c#,windows-phone-8.1,nuget,visual-studio-2015,windows-universal
I have Visual Studio 2015 RC. When I open a console app or a Windows Phone 8 Silverlight project, everything works fine, I can use Nuget without problems. When I open a Universal App project (Windows 8.1 + Windows Phone 8.1), Nuget breaks. When I open the Nuget console, I...

Given two C# projects on the same base directory, how to use different packages.config for each


nuget
I have two projects (*.csproj) on the same directory (I am porting and this seems like a good workflow) however the problem is that I can only have 1 packages.config on the folder. I have tested having the project on a different folder and linking the files I need, however,...

NuGet Entity Framework 6.1.3 as default not 7 Beta 4


entity-framework,visual-studio-2013,nuget
Today I updated Visual Studio 2013 from Update1 to Update4 and the last version of NuGet. Now all time when I create a new solution, as default installs the Entity Framework 7 Beta 4 and I'm forced to change it in every new solution from NuGet Package Manager. There is...

How do i reset nuget and start afresh?


console,nuget,reset
here's what's happening. within the last few days something happened to my solution that apparently broke nuget. when i go into package manager/installed and do a find on SignalR, nothing comes back as if SignalR wasn't installed when i know it is. when i go into manager/online and do the...

Github and Nuget packages


c#,git,github,reference,nuget
I am attempting to contribute to a project on Github (First time). I added a new Project to the solution and added NUnit and AutoFixture (via Nuget), now when I clone that repo it's missing all of the references to NUnit and AutoFixture. Now when I did a pull request...

How can I stop my ClickOnce install from requiring Newtonsoft.Json v4.5 in the GAC?


wpf,json.net,nuget,clickonce
We have a ClickOnce deployment of a WPF desktop application, and recently installed the Newtonsoft.Json version 6.0.8 nuget package. After making this change and publishing the ClickOnce deployment, users can't run the update, because of this error message: The first thing that strikes me as odd is the dependency on...

New Automatic NuGet package resotore and NuGet.Config


.net,visual-studio-2013,msbuild,nuget,nuget-package-restore
I'm migrating to new version of Automatic package restore as described in docs This documents says, that .nuget folder should be removed completely. Including NuGet.Config, that contained a property, we need: <config> <add key="repositoryPath" value="..\..\..\commonNugetPackages" /> </config> So how one should specify path where packages should be restored? Update: Updating...

cURL with Visual Studio 2013


c++,curl,visual-studio-2013,nuget,libcurl
So i have came along with cURL as a very nice library and working very fine in OSX. But on windows now i have got big troubles with getting ready with this library. I googled now for about 2 days and tried over a dozen (in detail) different ways to...

How to install Visual Studio Gallery extensions from command line


visual-studio,command-line,nuget,visual-studio-gallery
TL;DR Is there a way to access Visual Studio Gallery from command line, similar to chocolatey? I am trying to configure a Visual Studio dev environment using Vagrant. Now, team members use various extensions available from Visual Studio Gallery and it would be great if they could script their installation...

nuget security - malware installed by nuget packages?


visual-studio,nuget
Is it possible that you can be infected with malware by installing nuget packages? This is especially interesting when you think of Microsoft Visual Studio 2016 which will be fully dependent on Nuget....

Package Manager in VS2015 RC fails on installing/restoring some packages


nuget,asp.net-5,visual-studio-2015,dnx
I'm trying to install a nuget package - NGenerics.1.4.1 from nuget.org (https://www.nuget.org/packages/NGenerics/) into a ASP.NET 5 project (website). Package Manager fails with UriFormatException. After that a reference is added into Reference folder in the Solution Explorer but with yellow triangle ('warning'). The error added into the Error List: "Dependency NGenerics...

How to pass credentials when accessing a Nuget feed


api,authentication,nuget,nuget-server
I am trying to download packages from a Nuget repository which requires credentials for it to be accessed using NuGet.Core. I know that Nuget repositories with no authentication can be accessed as follows: //ID of the package to be looked up string packageID = "EntityFramework"; //Connect to the official package...

Add reference to same Nuget package but for different targets


nuget,nuget-package
I have a solution in Visual Studio 2013 with more C# project files that have source code in common but are targeting for different platforms (.Net, WinRT, .Net Micro Framework and so on). All the csproj files are under the same directory. These projects use a Nuget package that is...

Tab completion for array not shows after first selection


visual-studio,powershell,nuget,tabexpansion
This is a script for VS PowerShell. function global:Add-Shape { param([string]$Shape, [string[]]$Colors) Write-Host "Shape Name:$Shape" foreach ($i in $Colors) { Write-Host "Color Name:$i" } } Register-TabExpansion 'Add-Shape' @{ 'Shape' = { "Circle", "Square", "Triangle" } 'Colors' = { "Brown", "Red", "Blue" } } In Package Manager Console When I try...

Nuget-deployed C# files excluded from Resharper analysis


c#,nuget,resharper
I'm having trouble understanding a behaviour of Nuget. I've created a basic package that deploys a single Test.cs file into an "HtmlHelpers" folder in a project. I'm following the "convention based working directory" method described on the Nuget site. The issue I'm having is Resharper file analysis isn't enabled for...

VS Online Build - Publish to local NuGet feed


nuget,build-process,visual-studio-online
I'm trying to migrate from running Team Foundation Server locally to VS Online. I need to set up a build that will publish a nuget package to our local feed. Is this possible? I assume I need to set up VPN or something. I'm not even sure where to start....

“ExcelReaderFactory.cs not found” Error


c#,nuget,exceldatareader
I've downloaded ExcelDataReader from the Visual Studio Package Manager Console and followed the C# instructions on its Code Plex page http://exceldatareader.codeplex.com/, but, during run-time, I get an "ExcelReaderFactory.cs not found" message when the code fails at the ExcelReaderFactory. The entirety of my code block is below. I've tried removing and...

Can I use my OctopusDeploy built-in Package Repository in Manage NuGet Packages?


nuget,octopus-deploy
I have a working Octopus Deploy server which has a library of packages I built. I have an assembly which depends on one of the assemblies which I have deployed in Octopus Deploy and which is currently in that repository. I tried adding it as a package source in NuGet...

Proget Server Up but Feed Inaccessible in Visual Studio


visual-studio,visual-studio-2013,nuget,proget
We have reinstalled ProGet as we rebuilt our server after a security hole was discovered (unrelated to ProGet). The feed is visible in the browser, but inaccessible in Visual Studio. While rebuilding our server, we have ProGet running on a temporary Azure server, which is working and serving our NuGet...

How to change CopyToOutputDirectory on project reference via powershell


c#,powershell,nuget
I created a nuget package which contains 3rd party assemblies so that I don't have to put them in a lib folder in every repo where I want to reference them. The nature of the 3rd party libraries is that I cannot have their references set to copy to the...

NuGet on mono behind proxy not able to connect to the internet


c#,.net,linux,mono,nuget
I have a Linux machine behind a corporate proxy. For the proxy I have setup CNTLM to handle the authentication for me, so my proxy is located at http://localhost:3128. CNTLM connects to a corporate proxy that uses NTLMv2. Now when I try to run Nuget on Mono with the following...

How to disable automatic Nuget Package Update in Xamarin


xamarin,mono,nuget
How to disable automatic Nuget Package updates in Xamarin 5.9 (build 539) when opening a new Project?

Trying to add non-.NET libraries to NuGet package


c#,visual-studio,nuget
I have a .NET DLL that is using non-.NET DLLs. I'm trying to create a NuGet package out of this, but I don't seem to be penetrating the magic behind this. I read the NuGet reference about the <files> and <references> but that didn't really work out for me -...

Tfs and nuget: project files are forever in check out after build with restore nuget packages


visual-studio-2012,tfs,nuget
MS VS 2012 I have solution in tfs with enabled nuget packages restore. Every time when I build solution all my project files are cheked out with this changes: <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet...

Can't build a project with Postsharp 4.1.14


c#,.net,msbuild,nuget,postsharp
I have a project which references a postsharp 4.1.14. When I build a project the error occurred. Postsharp is installed by nuget package. There is .net version 4.0 installed on computer, but Microsoft.Build.Utilities.ToolLocationHelper.GetPlatformSDKLocation method is from .net 4.5. Can I use different version of postsharp? Is there another way to...

NuGet - Dependee project referencing different DLL according to selected build configuration


c#,.net,visual-studio,nuget
I'm completely new to NuGet and just researching/proof-of-concept'ing it at the moment: Is it possible to package a NuGet package in such a way that the dependee project (the one that has the dependency) references a different DLL according to the project configuration build? Example: Dependee-Debug.DLL -> References Dependency-Debug.DLL Dependee-Release.DLL...

An error occurred while configuring the solution to restore NuGet packages on build. The operation has timed out


visual-studio-2013,nuget,nuget-package-restore
When I right-click my solution and click "enable nuget package restore" I get the message: Configuring the solution to restore NuGet packages on build... And after that the error: An error occurred while configuring the solution to restore NuGet packages on build. The operation has timed out What can it...

Unable to add any nuget dependency with ASP.NET 5


nuget,asp.net-5,visual-studio-2015
I've just downloaded Visual Studio Enterprise 2015 RC and I'm trying to create a simple ASP.NET 5 application. But each time i'm modifying the project.json to add a dependency, I always have an error. For example, when adding a dependency to Newtonsoft.Json I have : "Dependency Newtonsoft.Json >= 6.0.8 could...

WPF 'Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception.'


c#,wpf,nuget,mahapps.metro
My application runs fine in VS 2010 but when I copy the executable from the bin folder to another location I get this error: 'Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception.' Line number '15' and line position '23'. Did a bit of testing and found out that if I include the...