Remove and re-import broke the ALC, reimporting after restore - #3804
Merged
Ramses Sanchez-Hernandez (ramsessanchez) merged 1 commit intoOct 1, 2026
Merged
Ramses Sanchez-Hernandez (ramsessanchez) merged 1 commit into
Ramses Sanchez-Hernandez (ramsessanchez) merged 1 commit into
Conversation
Contributor
Author
|
Ramses Sanchez-Hernandez (@ramsessanchez) fellow MVPs were reporting issues that happend after removing and re-importing the released module. I did not test this exact use-case before. |
Contributor
|
Repro scenario: PS> Import-Module Microsoft.Graph.Authentication
PS> Remove-Module Microsoft.Graph.Authentication
PS> Import-Module Microsoft.Graph.Authentication
$FileNotFoundException/ at System.Reflection.RuntimeAssembly.<InternalLoad>g____PInvoke|48_0(NativeAssemblyNameParts* __pAssemblyNameParts_native, ObjectHandleOnStack __requestingAssembly_native, StackCrawlMarkHandle __stackMark_native, Int32 __throwOnFileNotFound_native, ObjectHandleOnStack __assemblyLoadContext_native, ObjectHandleOnStack __retAssembly_native)
at System.Reflection.RuntimeAssembly.<InternalLoad>g____PInvoke|48_0(NativeAssemblyNameParts* __pAssemblyNameParts_native, ObjectHandleOnStack __requestingAssembly_native, StackCrawlMarkHandle __stackMark_native, Int32 __throwOnFileNotFound_native, ObjectHandleOnStack __assemblyLoadContext_native, ObjectHandleOnStack __retAssembly_native)
at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext, RuntimeAssembly requestingAssembly, Boolean throwOnFileNotFound)
at System.Reflection.TypeNameResolver.ResolveAssembly(AssemblyName assemblyName)
at System.Reflection.TypeNameResolver.GetType(String escapedTypeName, ReadOnlySpan`1 nestedTypeNames, TypeName parsedName)
at System.Reflection.TypeNameResolver.Resolve(TypeName typeName)
at System.Reflection.TypeNameResolver.GetTypeHelper(Char* pTypeName, RuntimeAssembly requestingAssembly, Boolean throwOnError, Boolean requireAssemblyQualifiedName, IntPtr unsafeAccessorMethod)
at System.Reflection.CustomAttribute.<CreateCustomAttributeInstance>g____PInvoke|30_0(QCallModule __pModule_native, ObjectHandleOnStack __type_native, ObjectHandleOnStack __pCtor_native, IntPtr* __ppBlob_native, IntPtr __pEndBlob_native, Int32* __pcNamedArgs_native, ObjectHandleOnStack __instance_native)
at System.Reflection.CustomAttribute.CreateCustomAttributeInstance(RuntimeModule module, RuntimeType type, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
at System.RuntimeType.GetCustomAttributes(Boolean inherit)
at System.Management.Automation.CommandMetadata.ConstructCmdletMetadataUsingReflection()
at System.Management.Automation.CommandMetadata.Init(String name, String fullyQualifiedName, Type commandType, Boolean shouldGenerateCommonParameters)
at System.Management.Automation.CommandMetadata..ctor(CommandInfo commandInfo, Boolean shouldGenerateCommonParameters)
at Microsoft.Graph.PowerShell.Authentication.Utilities.Runtime.Cmdlets.GetModuleCmdlet.<ProcessRecord>b__16_0(CommandInfo ci)
at System.Linq.Enumerable.IEnumerableWhereIterator`1.ToArray()
at Microsoft.Graph.PowerShell.Authentication.Utilities.Runtime.Cmdlets.GetModuleCmdlet.ProcessRecord()
Get-ModuleCmdlet: Could not load file or assembly 'Microsoft.Graph.Authentication.Core, Version=2.41.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. |
Aleksandar Nikolić (alexandair)
suggested changes
Sep 30, 2026
Contributor
|
testing in #3807, will merge and release a patch once build is successful |
Ramses Sanchez-Hernandez (ramsessanchez)
approved these changes
Oct 1, 2026
Ramses Sanchez-Hernandez (ramsessanchez)
merged commit Oct 1, 2026
bc69e67
into
microsoftgraph:main
3 checks passed
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.
Changes proposed in this pull request
Reproduce the bug (thanks to Fabien Tschanz (@FabienTschanz) link):