Skip to content

Documentation/functionality issue concerning "AssemblyBuilder" and "AssemblyBuilderAccess" #4207

Closed

Description

@Shumeras

Issue Title

Documentation/functionality issue concerning "AssemblyBuilder" and "AssemblyBuilderAccess"

General

.NET Core version: .NET Core 3.1
Operating system version: Windows 10 Pro, Version 1909

I've encountered an issue trying to run the code provided in .NET Core 3.1 documentation (https://docs.microsoft.com/en-us/dotnet/api/system.reflection.emit.assemblybuilder?view=netcore-3.1#examples)
AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly( aName, AssemblyBuilderAccess.RunAndSave);

"System.AppDomain.CurrentDomain.DefineDynamicAssembly" does not seem to exist, guessing it's functionality has been moved to "System.Reflection.Emit.AssemblyBuilder.DefineDynamicAssembly"?

However enum "AssemblyBuilderAccess" does not define "RunAndSave" - only "Run" and "RunAndCollect".

"AssemblyBuilder" no longer defines ".Save()", most likely due to "AssemblyBuilderAccess.RunAndSave" not existing, or the method being removed entirely.
Is there no option for saving the created assembly anymore? or has this functionality been moved?

Either way seems the documentation has been carried over from an earlier version and overlooked when updating.

Activity

  1. transferred this issue fromdotnet/coreon May 8, 2020
  2. added
    untriaged
    on May 8, 2020
  3. added
    Pri3
    on Nov 11, 2020
  4. buyaa-n commented on Jan 28, 2022

    @buyaa-n
    Contributor

    Fixed with #5491

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pri3area-System.Reflection.Emituntriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions