-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Could not load ILibraryExport while running HelloMvc sample #515
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
Comments
Please make sure you are using packages and dnx from the same "train", e.g. beta4 packaged and beta4 dnx etc. |
@davidfowl I've been trying to get a stable setup of beta4 or later on my Mac ever since upgrading to Mono 4.0.1 but I've been terribly unsuccessful. My current
And I tapped an old bottle of Mono 3.12.1 so my
Pulling down the latest
After updating the "Microsoft.AspNet.Server.WebListener": "1.0.0-beta4-*" I get a successful build, however, running the application results in the known DataProtectionServices issue. aspnet/DataProtection#55 Any idea how I get get my beta4 "train" back on track? |
You need mono 4.0.1 to get the fix for the data protection isssue. The home repository has instructions for this. As for getting beta5 bits, You can specify beta4-* but I none of your configured feeds don't have anything beta4 you will get whatever is there that is bigger. If you want beta4 bits, remove the wild card from your versions and specify beta4 exactly |
@davidfowl Running Mono 4.0.1 against DNX 4.5.1 results in the As far as my configured feeds, I have updated my <?xml version="1.0" encoding="utf-8"?>
<configuration />
<!--configuration>
<packageSources>
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetvnext/api/v2" />
<add key="NuGet.org" value="https://nuget.org/api/v2/" />
</packageSources>
</configuration--> But even if I update the |
I was having the same issue. OS: OSX Using the samples/1.0.0-beta4/HelloMvc/ directory gave me the ILibraryExport error, but changing the references from "1.0.0-beta4-*" to 1.0.0-beta4" for the dependencies (don't change the version property) fixed the issue. Looks like even though everything was set to 1.0.0-beta4-, the - was updating to a later dnx version then the one I have? (which is the latest one right now). Thanks David! |
@Banashek Can you tell me what your current NuGet feed is set to? I can't seem to install I've tried all of the following: export DNX_FEED=https://www.myget.org/F/aspnetvnext/api/v2
export DNX_FEED=https://www.myget.org/F/aspnetmaster/api/v2
export DNX_FEED=https://www.nuget.org/api/v2 and they all return with the same result: Miguels-MBP:myWebApp miguellira$ dnvm install 1.0.0-beta5-10373
Default stable feed (https://nuget.org/api/v2) is being overridden by the value of the DNX_FEED variable (https://www.myget.org/F/aspnetvnext/api/v2).
Downloading dnx-mono.1.0.0-beta5-10373 from https://www.myget.org/F/aspnetvnext/api/v2
Download: https://www.myget.org/F/aspnetvnext/api/v2/package/dnx-mono/1.0.0-beta5-10373
######################################################################## 100.0%
dnx-mono.1.0.0-beta5-10373 was not found in repository https://www.myget.org/F/aspnetvnext/api/v2
This is most likely caused by the feed not having the version that you typed. Check that you typed the right version and try again. Other possible causes are the feed doesn't have a DNX of the right name format or some other error caused a 404 on the server Again, for the record, I am able to run |
The dnvm version shouldn't really matter, it's really the dnx and mono versions that seem important. Have you tapped back to 4.0.1 Mono and double checked the project.json to make sure that the dependencies are correct? I had the exact same error you posted originally about and the only change needed to solve it was editing the package.json as davidfowl noted. Here's my current project.json:
|
@miguellira ah ok yeah I seem to get the same error when building. I was just looking at running locally. Here is my stack trace for anyone interested:
I'm not too familiar with these stack traces, but I'll look at them later and respond if I figure it out. |
@Banashek Well at least I don't feel so alone :-) As for this error, it has already been logged (#498) and @davidfowl has already confirmed there is no known workaround. That said, some people do appear to have a healthy Mono 4.0.1/DNX 4.5.1/Beta4 setups: http://tattoocoder.azurewebsites.net/vscode-creating-an-application-with-yeoman-aspnet-generators/ I just wished I was one of them :-( |
As David says in his article posted on this thread "living on the bleeding edge will hurt". I'm sure things will get better with time. For now, you could boot up a linux vm and copy the code over if you really need to build out the projects. Right now I'm not really deploying anywhere, just testing the waters with VSCode and the shiny new tools we got in the last couple days. Luckily the local webserver works so I can do this. Thanks for linking the existing error @miguellira. |
@miguellira can you try running without building? |
@davidfowl OMG! I can't believe I just didn't tried that. I figured I had to green light the build before running. It works! (well kinda)... I run into the export MONO_MANAGED_WATCHER=disabled |
I apparently have DNX 1.0.0-beta5 however my dependancies are on beta4. Downloading dnx-mono.1.0.0-beta4 from https://nuget.org/api/v2
Download: https://nuget.org/api/v2/package/dnx-mono/1.0.0-beta4
######################################################################## 100.0%
HTTP Error 301 fetching dnx-mono.1.0.0-beta4 from https://nuget.org/api/v2 |
@TomSchillemans yes that was known issue with |
@davidfowl you can't do update-self on mac... aspnet/dnvm#246 |
@TomSchillemans As @davidfowl mentioned, the HTTP 301 is a redirect error. You can temporarily get around that by setting this value before installing running export DNX_FEED=https://www.nuget.org/api/v2 As for @Gutek what is your current In any event, I did some more research it appears those familiar with At this point I really wished @spboyer would tell us how he was able to successfully run |
I added the export and now when I want to use the install I get
However, |
yep its showing even without |
@TomSchillemans and @Gutek Can you remove it and then try to reinstall? rm -rf ~/.dnx/runtimes/dnx-mono.1.0.0-beta4
export DNX_FEED=https://www.nuget.org/api/v2
dmvm install 1.0.0-beta4 The directory gets created prior to the failed download. |
@miguellira (OmniSharp/generator-aspnet#138) - states how we were getting the applications to run under beta4. You will still get the 1.0.0-beta4 is the stable.
The steps I took to get it resolved.
|
@spboyer thanks for responding. I am currently at that working state. Your excellent write up, however, does not mention this caveat so I was assuming you weren't experiencing any issues at all. Again, thanks for clarifying. Hopefully a future release of Mono addresses these build issues. Perhaps the OS X portion of the docs should have some sort of disclaimer or list of known issues. |
@miguellira This did the trick for me. For some reason I now can use |
Hi,
I've just installed dnvm on my mac using homebrew and when I try to run the HelloMvc sample using "dnu . kestrel", I receive the following error when I try to load http://localhost:5004.
An unhandled exception occurred while processing the request.
TypeLoadException: Could not load type 'Microsoft.Framework.Runtime.Compilation.ILibraryExport' from assembly 'Microsoft.Framework.Runtime.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
System.Lazy
1[System.Collections.Generic.List
1[Microsoft.CodeAnalysis.MetadataReference]].CreateValue () [0x00000] in , line 0Note that I was running the samples with vnext instead of dnx before. I don't know if my attempt to replace the k* things with the new stuff broke something, but the other samples run fine.
Thanks for the help!
The text was updated successfully, but these errors were encountered: