Comments (9)
Fixed in 5549980, I've now pushed 0.3.1 to NuGet. Will be available soon.
from depends.
Thanks! Would you mind submitting the contents of project.assets.json
located on obj
folder? The error seems to be related to parsing that file.
from depends.
I'm getting the same issue and it's because there are two targets. So maybe the code needs to be updated to handle multiple targets? I'm providing a top level view of my project.assets.json
because it's 24k lines and I think that the multiple targets probably highlight the issue since Single()
is going to throw an exception with multiple targets. Work around in the code might be First()
or FirstOrDefault()
but that's just my first thought and opinion.
{ "version": 3, "targets": { ".NETCoreApp,Version=v2.2": { // ... whole lot of data! }, ".NETCoreApp,Version=v2.2/win-x64": { // ... whole lot of data! } } }
from depends.
Thanks, will see if I’m able to reproduce. Multiple targets should not be sn issue, but for some reason the project.assets.json
contains two targets with same TFM. Which is weird.
from depends.
Multiple targets would always be an issue if you're calling Single()
on a collection with more than one, that's why its usage is seldom. First()
and FirstOrDefault()
tend to be best practice unless you've already explicitly checked that there is a single element before trying to access it.
from depends.
Hence the predicate inside the Single()
, https://github.com/mholo65/depends/blob/master/src/Depends.Core/DependencyAnalyzer.cs#L205, and an expectation not to find more than one matching elements. In the project.assets.json
files I worked with, when testing I’ve seen multiple targets, but only one target per target framework. I can’t understand why there are more than one target with same target framework, therefore it would be great to have a look at such file.
from depends.
I'm not sure why this project does that but I do have other projects that target windows and macos but the same framework. That could be another instance.
I'll look over my file and make sure it doesn't have anything sensitive. Should I just post the file contents here or would you like me to send it to you another way? Thanks for the help!
from depends.
Now I see. <OutputType>Exe</OutputType>
in the .csproj
will create two targets in project.assets.json
for the same target framework. One with the RID (runtime identifier) and one without. Need to dig deeper and decide which one of these to pick.
from depends.
Fantastic, let me know if you need any other info.
from depends.
Related Issues (20)
- Add nuget.org information for dependencies HOT 4
- Installation Issues HOT 1
- Cannot invoke tool: No Executable found matching command "dotnet-depends" HOT 1
- json for the dependencies? HOT 3
- Crashes with net461 projects that use the new csproj format HOT 2
- Forward/backward navigation in a sub-tree HOT 2
- Doesn't work for net5 HOT 4
- UI confusion due to Chinese HOT 1
- Screen Needs "Reset" After Quitting
- Throws exception with OS specific TargetFramework net6.0-windows HOT 1
- Crashes when analysing classic .net framework projects. HOT 1
- InvalidOperationException thrown HOT 3
- Support Central Package Management
- GenerateDepsFile fails when project has dependency on other project with an AssemblyName property
- KeyNotFoundException for conflicts between a package reference and a project reference with the same name
- ArgumentException when using --package HOT 1
- The tool cannot be installed if no global nuget config is specified HOT 1
- tool searches only for .csproj, other project file types need to specified explicitly HOT 2
- Shift Tab doesn't work. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from depends.