Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nbgv install broken #588

Closed
AArnott opened this issue Apr 12, 2021 · 3 comments · Fixed by #660
Closed

nbgv install broken #588

AArnott opened this issue Apr 12, 2021 · 3 comments · Fixed by #660
Assignees
Labels
Milestone

Comments

@AArnott
Copy link
Collaborator

AArnott commented Apr 12, 2021

In a new repo, the nbgv install command fails (when run two levels deep in the repo):

nbgv install
Unhandled exception:
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'NuGet.ProjectModel, Version=4.9.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'NuGet.ProjectModel, Version=4.9.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, IntPtr ptrLoadContextBinder)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, IntPtr ptrLoadContextBinder)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef, IntPtr ptrLoadContextBinder)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName)
   at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName)
   at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)   --- End of inner exception stack trace ---
   at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
   at System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeMethodInfo method, RuntimeType caType, Boolean inherit)
   at System.Attribute.GetCustomAttributes(MemberInfo element, Type type, Boolean inherit)
   at System.Reflection.CustomAttributeExtensions.GetCustomAttributes[T](MemberInfo element)
   at System.Diagnostics.StackTrace.TryResolveStateMachineMethod(MethodBase& method, Type& declaringType)
   at System.Diagnostics.StackTrace.ToString(TraceFormat traceFormat)
   at System.Exception.GetStackTrace(Boolean needFileInfo)
   at System.Exception.ToString(Boolean needFileLineInfo, Boolean needMessage)
   at System.Exception.ToString(Boolean needFileLineInfo, Boolean needMessage)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<UseExceptionHandler>g__Default|14_1(Exception exception, InvocationContext context)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseExceptionHandler>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<CancelOnProcessTermination>b__5_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Invocation.InvocationPipeline.Invoke(IConsole console)
   at Nerdbank.GitVersioning.Tool.Program.MainInner(String[] args) in D:\a\1\s\src\nbgv\Program.cs:line 225
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Nerdbank.GitVersioning.Tool.Program.Main(String[] args) in D:\a\1\s\src\nbgv\Program.cs:line 75
@AArnott AArnott added the bug label Apr 12, 2021
@AArnott AArnott added this to the v3.4 milestone Apr 12, 2021
@harvinders
Copy link

Yup, still broken

@B45man
Copy link

B45man commented Aug 30, 2021

I'm running into this issue when I'm running the command in the same folder as my .git folder. I fixed it by downgrading nbgv as mentioned here.

@AArnott AArnott self-assigned this Sep 23, 2021
@AArnott
Copy link
Collaborator Author

AArnott commented Sep 23, 2021

I can't repro this any more.

AArnott added a commit that referenced this issue Sep 23, 2021
@AArnott AArnott linked a pull request Sep 23, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants