Visual Studio 2022 Dependences Nodes

The dependency node has a few child nodes

  • Analyzers: Those found under Analyzers are code analyzers. If you're using the newer SDK format and .NET 5+ then it ships with analyzers that check your code while you're writing and compiling.
  • Frameworks: The Frameworks node is where frameworks reside and it is exclusively for the IDE to manage. You don't need or do anything under here. It just helps to separate these dependencies, which are controlled by your target framework selection, from those that you can manage.
  • Assemblies: The Assemblies node shows you the binary references you have. The only things you'll generally see here are framework references that you added that are not part of the Framework node and binary references you have added.
  • Packages: If your project uses NuGet for dependencies (most .NET apps do) then they will be found under Packages. While you can manage (to a limited degree) NuGet packages from here you will normally use the NuGet Package Manager for the solution or project. This node just shows you the dependencies you have and their dependencies, if any.
  • Projects: There is also a Projects node when applicable that shows you the dependencies your project has on other projects in the same solution.

References store in *.csproj

<!-- AssembliesNode -->
  <ItemGroup>
    <Reference Include="Newtonsoft.Json">
      <HintPath>..\..\Newtonsoft.Json.dll</HintPath>
      <CopyLocal>True</CopyLocal>
    </Reference>
  </ItemGroup>
<!-- Packages Node -->
  <ItemGroup>
    <PackageReference Include="Newtonsoft.Json" Version="6.3.0" />
  </ItemGroup>

References

posted @ 2022-04-01 12:13  Lee.Yan  阅读(108)  评论(0编辑  收藏  举报