Use AssemblyBuilder.DefineDynamicAssembly
ProprietaryReplace dynamic assembly creation on AppDomain.CurrentDomain or Thread.GetDomain() with the static AssemblyBuilder.DefineDynamicAssembly API supported by .NET Core. Only the two-argument overload with Run or RunAndCollect access is transformed. Single-use method-local access flags initialized to those values are also supported. Other domains, persistence modes, unresolved calls and shared calls outside conditional regions require review.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net3_0. UseAssemblyBuilderDefineDynamicAssemblymod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net3_0. UseAssemblyBuilderDefineDynamicAssemblyInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.