Skip to content

Ask for bytes of not-yet-loaded winmds - #975

Merged
amcasey merged 1 commit into
dotnet:masterfrom
amcasey:DD1114866
Mar 3, 2015
Merged

Ask for bytes of not-yet-loaded winmds#975
amcasey merged 1 commit into
dotnet:masterfrom
amcasey:DD1114866

Conversation

@amcasey

@amcasey amcasey commented Mar 2, 2015

Copy link
Copy Markdown
Member

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

amcasey commented Mar 2, 2015

Copy link
Copy Markdown
Member Author

FYI @cston @KevinH-MS @ManishJayaswal @tmat @pnelsonmsft

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

containingNamespace.ConstituentNamespaces.Any(n => MetadataUtilities.IsWindowsAssemblyIdentity(n.ContainingAssembly.Identity))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

@cston

cston commented Mar 3, 2015

Copy link
Copy Markdown
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
@amcasey
amcasey merged commit c3ba4e0 into dotnet:master Mar 3, 2015
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 !
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants