Reputation: 332
We're trying to write ASP.NET applications on a Mac using VSCode. We have successfully installed VSCode, DNX, Yeoman, Node.js and npm, and permutations of everything else mentioned in the ASP.NET guide. After creating a sample application with Yo, restoring dependencies, and even building with no errors, running the application with "dnx web" Returns an error.
System.TypeLoadException: Could not load type 'Microsoft.Extensions.PlatformAbstractions.IAssemblyLoadContextAccessor' from assembly 'Microsoft.Extensions.PlatformAbstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
We get this error specifically when running "dnx web" from the command line or through VSCode's "dnx run command", and both with dnx 1.0.0-rc1-update1 and the latest update (rc2-16595, I believe)
I think this is a versioning problem in our Kestrel setup - our project (dnu build)s properly, just the test breaks while it loads. Any ideas?
Upvotes: 3
Views: 289
Reputation: 1
I had a same problem above on OS X v10.11.x.
Step 1: Make sure, you run this command: $ dnvm list
Step 2: Change to the correct version. E.g on my machine, I changed $ dnvm use 1.0.0-rc1-update2 -r mono
Good luck!
Upvotes: 0