0

Whenever I try to run dnu or dnx commands on a DNX451 app with default clr runtime, i keep getting assembly binding errors, like these:

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Dnx.Tooling' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Dnx.Tooling'
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at Microsoft.Dnx.Runtime.Loader.LoadContext.Load(AssemblyName assemblyName)
   at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env, String appBase, FrameworkName targetFramework)
   at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, BootstrapperContext bootstrapperContext)
   at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, BootstrapperContext bootstrapperContext)

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Users\*****\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update2\bin\dnx.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Dnx.Tooling
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Microsoft.Dnx.Tooling | Domain ID: 1
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Users/*****/.dnx/runtimes/dnx-clr-win-x86.1.0.0-rc1-update2/bin/
LOG: Initial PrivatePath = NULL
Calling assembly : Microsoft.Dnx.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/*****/.dnx/runtimes/dnx-clr-win-x86.1.0.0-rc1-update2/bin/Microsoft.Dnx.Tooling.DLL.
LOG: Attempting download of new URL file:///C:/Users/*****/.dnx/runtimes/dnx-clr-win-x86.1.0.0-rc1-update2/bin/Microsoft.Dnx.Tooling/Microsoft.Dnx.Tooling.DLL.
LOG: Attempting download of new URL file:///C:/Users/*****/.dnx/runtimes/dnx-clr-win-x86.1.0.0-rc1-update2/bin/Microsoft.Dnx.Tooling.EXE.
LOG: Attempting download of new URL file:///C:/Users/*****/.dnx/runtimes/dnx-clr-win-x86.1.0.0-rc1-update2/bin/Microsoft.Dnx.Tooling/Microsoft.Dnx.Tooling.EXE.

It seems to look for the dll in the current file path and not in the lib or packages folder. Then it just stops executing the command.

Whenever I paste the required dlls into the bin, it seems to work as a temp workaround, but this is not an option for dozens of dlls...

The strange thing is, this issue does not occur with the coreclr runtime, only with the default clr.

Does anyone have an idea as to why this is happening? I tried it on another machine and it also throws fusion logs, but seems to run just fine.

updated info

dnvm list

Active Version           Runtime Architecture OperatingSystem Alias
------ -------           ------- ------------ --------------- -----
  *    1.0.0-rc1-update2 clr     x86          win             default
       1.0.0-rc1-update2 coreclr x64          win
       1.0.0-rc1-update2 coreclr x86          win

I ran the following cmd:

  1. yo aspnet (yeoman) -> empty app
  2. dnu restore
Jack B
  • 391
  • 1
  • 5
  • 18

0 Answers0