question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exclude dev dependencies by default

See original GitHub issue

After including these dependencies in my package project

  • SourceLink.Create.CommandLine 2.8.3
  • Microsoft.SourceLink.Vsts.Git beta-63127-02

Now my consuming project i get the error

Severity	Code	Description	Project	File	Line	Suppression State
Error		Unable to resolve dependency 'Microsoft.SourceLink.Vsts.Git'. Source(s) used: 'nuget.org', 'Kinder', 'Microsoft Visual Studio Offline Packages'.			0	

It shows under dependency

image

This error originates on a Test project I have that is NET451

Does not affect CORE 2.1 / STANDARD 2.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bordingcommented, Sep 18, 2018

@ctaggart Those changes are from the new development dependency support added in NuGet 4.8, so if the package has that flag, it will be added like that now.

0reactions
ppumkincommented, Sep 19, 2018

Using PrivateAssets=“All” is documented on the README.md is each example.

Ohhhhhh… I saw that but I had never used that before. So at the time of reading the documentation it was the first time I saw that and had no idea what it was for.

I also added the packages using NuGet and not editing the packages file. After not realising what that meant and searching around I found it on the Microsoft Documentation and added it via the properties pane on the package.

Here is a PR https://github.com/dotnet/sourcelink/pull/171

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do you prevent install of "devDependencies" NPM ...
The npm install command will install the devDependencies along other dependencies when run inside a package directory, in a development ...
Read more >
Include (or omit) Node.js devDependencies in your CI ...
Ever need to install your devDependencies in a CI environment but the ... You can also omit dependencies with the --omit=... flag.
Read more >
Cannot exclude all by default and ...
npmrc to my project, which doesn't need to be in the package, and I don't have to change anything. I also exclude a...
Read more >
Installing Dev Dependencies with npm: Beginners' Guide
1. Use --only=dev ... When your NODE_ENV is set to production, you need to use the below command to install devDependencies for your...
Read more >
Adding dependencies to a package.json file
To add dependencies and devDependencies to a package.json file from the command line, you can install them in the root directory of your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found