Ask for bytes of not-yet-loaded winmds - #975
Merged
Merged
Conversation
Member
Author
|
FYI @cston @KevinH-MS @ManishJayaswal @tmat @pnelsonmsft |
Contributor
There was a problem hiding this comment.
containingNamespace.ConstituentNamespaces.Any(n => MetadataUtilities.IsWindowsAssemblyIdentity(n.ContainingAssembly.Identity))
Contributor
|
LGTM |
When we try to bind something that is from a not-yet-loaded winmd, we generally see ErrorCode.ERR_DottedTypeNameNotFoundInNS because the namespace Windows.X is only provided by Windows.X.winmd. When this occurs, heuristically ask the debugger for an assembly with name Windows.X and content type AssemblyContentType.WindowsRuntime. The VB equivalent of ERR_DottedTypeNameNotFoundInNS is ERR_NameNotMember2. However, VB also has a second error code to consider: ERR_UndefinedType1, which is only produced in type-only contexts. Since the argument to ERR_UndefinedType1 is the qualified name, as a string, we have to do some extra work to determine the next part that needs to be resolved. Caveat: This doesn't work end-to-end (DevDiv #1130191).
amcasey
added a commit
that referenced
this pull request
Mar 3, 2015
Ask for bytes of not-yet-loaded winmds
jjonescz
pushed a commit
to jjonescz/roslyn
that referenced
this pull request
Apr 28, 2026
* Update dependencies from https://github.com/aspnet/Extensions build 20190815.2 - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19415.2 - Microsoft.AspNetCore.Testing - 3.0.0-preview9.19415.2 - Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19415.2 - Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19415.2 - Microsoft.Extensions.NonCapturingTimer.Sources - 3.0.0-preview9.19415.2 - Microsoft.Extensions.Logging - 3.0.0-preview9.19415.2 Dependency coherency updates - Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview9-19414-17 (parent: Microsoft.Extensions.Logging) - Microsoft.Extensions.DependencyModel - 3.0.0-preview9-19414-17 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.App.Ref - 3.0.0-preview9-19414-17 (parent: Microsoft.Extensions.Logging) - Microsoft.Net.Compilers.Toolset - 3.3.0-beta3-19415-01 (parent: Microsoft.Extensions.Logging) * Update dependencies from https://github.com/aspnet/Extensions build 20190814.4 - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19414.4 - Microsoft.AspNetCore.Testing - 3.0.0-preview9.19414.4 - Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19414.4 - Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19414.4 - Microsoft.Extensions.NonCapturingTimer.Sources - 3.0.0-preview9.19414.4 - Microsoft.Extensions.Logging - 3.0.0-preview9.19414.4 * Update dependencies from https://github.com/aspnet/Extensions build 20190815.2 - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19415.2 - Microsoft.AspNetCore.Testing - 3.0.0-preview9.19415.2 - Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19415.2 - Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19415.2 - Microsoft.Extensions.NonCapturingTimer.Sources - 3.0.0-preview9.19415.2 - Microsoft.Extensions.Logging - 3.0.0-preview9.19415.2 * React to namespace removal
jjonescz
pushed a commit
to jjonescz/roslyn
that referenced
this pull request
Apr 28, 2026
* Update dependencies from https://github.com/aspnet/Extensions build 20190813.3 - Microsoft.AspNetCore.BenchmarkRunner.Sources - 5.0.0-alpha1.19413.3 - Microsoft.AspNetCore.Testing - 5.0.0-alpha1.19413.3 - Microsoft.Extensions.CommandLineUtils.Sources - 5.0.0-alpha1.19413.3 - Microsoft.Extensions.HashCodeCombiner.Sources - 5.0.0-alpha1.19413.3 - Microsoft.Extensions.NonCapturingTimer.Sources - 5.0.0-alpha1.19413.3 - Microsoft.Extensions.Logging - 5.0.0-alpha1.19413.3 * Update dependencies from https://github.com/aspnet/Extensions build 20190816.10 - Microsoft.AspNetCore.BenchmarkRunner.Sources - 5.0.0-alpha1.19416.10 - Microsoft.AspNetCore.Testing - 5.0.0-alpha1.19416.10 - Microsoft.Extensions.CommandLineUtils.Sources - 5.0.0-alpha1.19416.10 - Microsoft.Extensions.HashCodeCombiner.Sources - 5.0.0-alpha1.19416.10 - Microsoft.Extensions.NonCapturingTimer.Sources - 5.0.0-alpha1.19416.10 - Microsoft.Extensions.Logging - 5.0.0-alpha1.19416.10 Dependency coherency updates - System.Diagnostics.DiagnosticSource - 5.0.0-alpha1.19409.9 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.NETCore.App.Runtime.win-x64 - 5.0.0-alpha1.19411.12 (parent: Microsoft.Extensions.Logging) - System.Reflection.Metadata - 1.8.0-alpha1.19409.9 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Encodings.Web - 5.0.0-alpha1.19409.9 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Extensions.DependencyModel - 5.0.0-alpha1.19411.12 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.App.Ref - 5.0.0-alpha1.19411.12 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.Platforms - 5.0.0-alpha1.19409.9 (parent: Microsoft.NETCore.App.Runtime.win-x64) * * React to namespace removal - a portion of [release/3.0] Update dependencies from aspnet/Extensions (dotnet#975) - w/ thanks to @jkotalik !
This was referenced May 7, 2026
dibarbet
pushed a commit
that referenced
this pull request
Aug 18, 2026
Support validating providing files in nested paths within the Analyzer and CodeFix test suites.
This was referenced Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When we try to bind something that is from a not-yet-loaded winmd, we
generally see ErrorCode.ERR_DottedTypeNameNotFoundInNS because the
namespace Windows.X is only provided by Windows.X.winmd. When this
occurs, heuristically ask the debugger for an assembly with name Windows.X
and content type AssemblyContentType.WindowsRuntime.
The VB equivalent of ERR_DottedTypeNameNotFoundInNS is ERR_NameNotMember2.
However, VB also has a second error code to consider: ERR_UndefinedType1,
which is only produced in type-only contexts. Since the argument to
ERR_UndefinedType1 is the qualified name, as a string, we have to do some
extra work to determine the next part that needs to be resolved.
Caveat: This doesn't work end-to-end (DevDiv #1130191).