nuget-package

Nuget package contentFiles not copied to .NET Core project

亡梦爱人 提交于 2019-12-19 03:13:18
问题 I'm trying to extract content files from a Nuget package to a project referencing my package. Based on Justin Emgarten's comment Packages.config projects use the content folder Project.json/PackageReference/NETCore SDK projects use the contentFiles folder So ok great, I created a .NET Core 2.1 Console Application project and followed the NuGet ContentFiles Demystified blog post which was written in 2016 at the time of project.json but should still work nowadays. I created an image at c:\dev

Build DLL to a separate folder

心不动则不痛 提交于 2019-12-18 12:40:09
问题 First There are several questions similar to this, but none have answers that solved my problem nor can I post in them. The closest one is in this question. I found the answer here. And I am posting here so I can found it later. The Question: How to build my project and have all my Referenced Library inside a lib sub-folder? A want this output directory: To be stay like this: 回答1: I found the answer here and transcribed here for the case of the link die. In your App.config file, insert this:

How do you add additional files to a nuget package in Visual Studio 2017

99封情书 提交于 2019-12-18 11:48:37
问题 I recently moved to Visual Studio 2017 Community Edition. It has 2 nice new features You don't need to explicitly include your source files in the csproj, it does this automatically, it can build nuget packages directly. I want to package up my open source CodeFirstWebFramework DLL as a nuget package. As well as including the DLL , the package has to include a whole directory tree of other files (including .js, .tmpl, .css and .md files). How do I tell Visual Studio that I want this directory

Pain-free local development while also referencing NuGet packages

久未见 提交于 2019-12-18 10:16:14
问题 I am attempting to publish and consume versioned NuGet packages of class libraries while avoiding headaches for local development. Here is a sample Visual Studio solution layout: | Libraries | LibraryA | LibraryB | LibraryC | Applications | ApplicationD | ApplicationE This is a single solution containing both shared class libraries and multiple applications. Currently references to the class libraries by the applications are local in-solution references. What I would like to do is to publish

MVC bootstrap navbar not working after running NuGet updates

时光毁灭记忆、已成空白 提交于 2019-12-18 10:07:56
问题 An MVC app broke after we updated all the NuGet packages. After trying everything I created a new MVC app, updated the NuGet packages and the basic navbar... <div class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="/"

NuGet - Installing Individual Packages reporting “The remote server returned an error: (404) Not Found.”

元气小坏坏 提交于 2019-12-18 04:12:58
问题 When using a local NuGet server, whenever I try to install an individual package from that server, all I get is this error: "The remote server returned an error: (404) Not Found." The packages are all there in the filesystem and the feed itself sees all the packages appropriately. I can even browse the package directly! What am I missing? I did just upgrade from NuGet server 1.4 to 1.5, but I've seen this happen before. Touching the package files used to help, but that does not appear to be

How to create a nuget package with both release and debug dll's using nuget package explorer?

巧了我就是萌 提交于 2019-12-17 23:38:43
问题 I'm using the Nuget Package Explorer to create some nuget packages. I've managed to do so just building a project in Release mode in VS and adding both the dll and pdb files to the package. So far so good, but when I add the package to another project and try to step into the code while debugging, it will step over it instead. I understand that I need to build and add the Debug dll and pdb to my package if I want to step into the code while debugging. I'm not sure though how to add these to

Loading Assemblies from NuGet Packages

試著忘記壹切 提交于 2019-12-17 23:29:02
问题 Sometimes in my PowerShell scripts, I need access to a specific DLL, using Add-Type -AssemblyName . However, the DLLs I need aren't always on the machine or in the GAC. For instance, I might want a quick script that uses Dapper to query a database. In these cases, I have been literally copying the DLLs along with the ps1 file. I was wondering if this was common/a good idea and whether there was an existing extension that would load up NuGet packages, store then in a global or local folder and

Configure NuGet package to add a build event when installed

倾然丶 夕夏残阳落幕 提交于 2019-12-17 19:33:23
问题 Does anyone know if it's possible to add something to a nuspec file so that when a package is installed via NuGet a pre or post build event to a project? 回答1: I think editing the user's PostBuildEvent property is the wrong way to go about adding a post-build action to a project. I believe the recommended way is to put your custom action into an MSBuild Target that is imported into the project file. As of NuGet 2.5, if you include a 'build' folder in your package (at the same level as content

How to automatically update NuGet packages to latest available version

旧巷老猫 提交于 2019-12-17 18:45:06
问题 I have two repositories, and I need compiled libraries from one repository in the other. I don't want to manually check repo1 for updated libraries, and copy/commit to repo2, because that is stupid. I've got repo1 building NuGet packages on each build of the necessary libraries, and publishing them to an internal NuGet server. Projects in repo2 can then reference these NuGet packages, and everything is (almost) working. The one last hurdle to this is automatically updating the NuGet packages