Skip to content

Documentation: clarify ResolveAssemblyReference locations for .NET SDK #12949

@hickford

Description

@hickford

https://learn.microsoft.com/en-us/visualstudio/msbuild/troubleshoot-assembly-references?view=visualstudio#assemblysearchpaths
https://github.com/MicrosoftDocs/visualstudio-docs/blob/main/docs/msbuild/troubleshoot-assembly-references.md#assemblysearchpaths

By default, there are ten locations ResolveAssemblyReference searches (four if you use the .NET SDK), and each can be disabled by setting the relevant flag to false:

  • Searching files from the current project is disabled by setting the AssemblySearchPath_UseCandidateAssemblyFiles property to false.
  • Searching the reference path property (from a .user file) is disabled by setting the AssemblySearchPath_UseReferencePath property to false.
  • Using the hint path from the item is disabled by setting the AssemblySearchPath_UseHintPathFromItem property to false.
  • Using the directory with MSBuild's target runtime is disabled by setting the AssemblySearchPath_UseTargetFrameworkDirectory property to false.
  • Searching assembly folders from AssemblyFolders.config is disabled by setting the AssemblySearchPath_UseAssemblyFoldersConfigFileSearchPath property to false.
  • Searching the registry is disabled by setting the AssemblySearchPath_UseRegistry property to false.
  • Searching legacy registered assembly folders is disabled by setting the AssemblySearchPath_UseAssemblyFolders property to false.
  • Looking in the GAC is disabled by setting the AssemblySearchPath_UseGAC property to false.
  • Treating the reference's Include as a real file name is disabled by setting the AssemblySearchPath_UseRawFileName property to false.
  • Checking the application's output folder is disabled by setting the AssemblySearchPath_UseOutDir property to false.

Please could you clarify which four locations apply for the .NET SDK?

Separately, a numbered list might be clearer.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions