-
Notifications
You must be signed in to change notification settings - Fork 523
Unable to load Libuv #216
Comments
This should be fixed with 891b991 but the ci hasn't passed in a few days. |
this is happening to me as well, but I'm using 1.0.0-beta7 Windows 7 x64 coreCLR. It works perfectly fine on my other machine though, using Windows 8.1, same project, same setup. Update: This is so strange... on my Windows 7 machine, I finally got my project to run, but ONLY using beta7 x86 coreCLR instead of x64!!!!!! Before, yesterday, when my project was using beta5, and before that, using beta4, I ALWAYS |
I have the same issue, kestrel doesn't start when using dnx x86. But it works OK when using dnx x64. |
I have the same behavior on Win7 x64 using 1.0.0-rc1-15798 both in x64 and x86 architectures. This machine didn't have any DNXs on it prior to me installing them this morning. Ona another machine, Win10 x64, Kestrel works. However, the Win10 machine had previous runtimes (since beta4) installed on it. I thought that dnu restore should install all of the dependencies, including the native ones? |
Is this still an issue for anybody? |
yes. Now using 1.0.0-beta8 for both x86 and x64
Runs ok for x64 and fails to load libuv on x86 |
Can you give specific repro steps. Can you also include the OS you're running on? (windows) |
I've updated everything from dnvm to npm packages and now I cannot reproduce that.
|
Edit: nevermind! needed to install Libuv having the same issue on ubuntu 14.04 (in a vm if that matters) $ dnvm version Active Version Runtime Architecture OperatingSystem Alias
|
The same problem here....
is it related to: #106 ? |
I had this same issue occurring on:
Found the issue may have been caused by the project.lock.json pulling from source control after the dependencies were restored on mac. so running I have now seen in the aspnet/Home repo that project.lock.json is in the gitignore so will be adding it now after this issue. |
This issue should be closed - it's hard to tell what it's tracking. It originally was created before we added native dll loading but then we entirely changed the code. Then an error with ARM appeared which I believe is a totally different issue (#340) and there also seems to be a comment about using sources. I believe we should track each of these issue separately. |
Closing per @moozzyk's comment as there's no update on the bug. Please reopen or file a new one if this is still an issue. |
For me it was never an issue for me before I installed Newtonsoft.Json package using dnu Here is the full output:
|
@emfluenceindia - I guess that after you installed Newtonsoft.Json and restored packages the project.lock.json file was rewritten and now, for whatever reason, it no longer contains the information needed to find libuv.dll. Hard to pinpoint what the issue is since there isn't enough details in your report. |
I just had the same issue on Windows 7. dnu restore fixed it. (I had just done a dnu install of the user-secrets and options stuff.) I suggest fixing this before RTM as it is not obvious what the problem is. |
dnu restore fixed it for me as well but not before I took out the assembly reference from |
Copying libuv.dll to the same folder where Microsoft.AspNet.Server.Kestrel.dll exists fixed for me as well. On my machine COPY FROM: TO: BTW, here is the output of "dnvm list"
|
I just experienced this issue. Brought a project over to a new to me Mac OS X machine. This project previously has been running on another Mac OS X machine, and 4 Windows 7 machines. I believe I set up everything correctly, following the newest instructions in the docs. Ran dnu restore multiple times. Making sure I deleted the project.lock.json file a few times. I finally copied the Running dnx 1.0.0-rc1-update1 coreclr x64 on a Mac OS X Version 10.9.5 Disregard, as noted in #627, this is fixed post RC1. Copying files as I did is the current workaround/fix. Thanks! |
The previous solution, of @kjbetz, worked perfectly for me on many Macs. Then: |
I'm getting this issue even though I have the latest NuGet packages as of right now. I thought this would have been fixed by now. It's been over a year... |
@MelbourneDeveloper - post the details. This issue relates to dnx so either you are using dnx which is no longer supported or you are hitting an issue that looks the same on the surface but in fact has a different root cause. Just in case clear your caches with |
@moozzyk , OK. I will do my best. To give you a quick snapshot of what I am doing... I was working on an xproj ASP .NET Core (.NET Framework) project. But, I was getting too many issues. So, I created a blank csproj ASP .NET Core (.NET Framework) project in VS 2017 and dragged my files in. I then manually bumped the VS version of the csproj back to 14 so I could open the project in VS 2015. I then opened the project and upgraded all the NuGet packages. It compiles but it complains about not having the libuv library. I am trying to run the exe directly from Visual Studio. I'm happy to run it through IIS but I've had no luck getting that to work after following several tutorials. How can I ensure I have the right version of Kestrel installed, and that IIS is routing the traffic to Kestrel? |
I think VS2017 is MSBuild only based while VS2015 is still using project.json. I think you might be missing some package references. As I said before - open a new issue and provide a repro - ideally create a github issue containing your project. The details you provided don't allow to tell exactly what's going on. |
@moozzyk , I've been stabbing in the dark with this stuff. xproj+project.json is buggy as hell and Microsoft are going to ditch it anyway so I've switched over to csproj. I have discovered that the problem is that the Libuv DLL is not being copied to the output bin folder. When I manually copy the file in to the output bin folder, the web server starts up correctly. The Libuv reference is included in my packages.config file (not project.json), but it doesn't automatically copy. It also does not show up as a referenced DLL under references in the project. I can log this as an issue, but where? Which repo would I be logging this? I know that this is an MSBuild related issue. Is that where I should be logging this? |
@MelbourneDeveloper, just curious, do you have Shared Runtime installed on the machine that you're trying to run your app on? libuv.dll should be in the shared runtime so I don't think you'll need it in your bin folder. As long as you have a reference to Kestrel (project.json or *.csproj, based on the SDK you're using) libuv dependency should come transitively, and since it's already on disk as part of the shared runtime, it should just work... |
@muratg , Sorry, I don't know what you mean by "Shared Runtime". I've installed and uninstalled so many versions of ASP .NET Core and its related tools that I no longer know what remnants are installed on my machine. I've tried to remove older versions in vein. The uninstall process just fails. This is what my installed components looks like: https://dl.dropboxusercontent.com/u/79781769/Images/Forums/.NET%20Core.png
Yes. That would be lovely. PS: This is the line from my packages.config:
|
@MelbourneDeveloper Why do you have a Opening a CSPROJ you created in VS2017 in VS2015 after changing the tools version is not supported in this case. The CSPROJ system in VS2017 contains all-new features that are required for the .NET Core experience to work correctly. Those projects are not round-trippable between VS2017 and VS2015. Also, you mentioned you're trying to run the exe directly from Visual Studio? Which exe, your app? |
This looks like trying to use ASP.NET Core in a non xproj project type. While it's possible it's not really supported. If you want to make it work with packages.config then you need to manually copy libuv into the output folder. If you use xproj + project.json this works automagically. If you use the vs2017 csproj tooling it will work as well. |
Is that a rhetorical question? Sorry to be facetious but we've nothing but issues with xproj, and as soon as I mention the issues anywhere, on any of these repos, the response is always the same: xproj is being ditched in favour of csproj. I've been repeatedly told not to bother reporting problems with xproj because it's dead in the water.
Not necessarily. Running a .NET Core App is just a matter of running "dotnet.exe" and pointing it at your compiled code. It works fine in VS 2015 as a csproj file.
Correct. I'll just wait until Visual Studio 2017 is more stable and then my whole team will upgrade.
As I've mentioned above, we have numerous issues with xproj that make it literally impossible to perform development. @davidfowl , I think you were the person who told me that xproj is going to be scrapped. I think Microsoft should clear this up. If xproj is being ditched, Microsoft should provide documentation on how to run ASP .NET Core with csproj, finish off VS 2017, or fix the issues in xproj. Until this happens, people will be deterred from using ASP .NET Core because of all the tooling issues they face. |
This appears to be an happening again, with the reintroduction of CSPROJ, After converted a solution and building, i got a few warnings about targeting x86 on a 64bit OS, so i looked in the build configuration and saw that it was set to 32 explicitly, so i changed it to Any CPU. After which i got the libuv dll issue. Edit: the warnings only showed as I still had dotnet-test-nunit installed. |
If you're still seeing issues with the new sdk based csproj. Make a repository on GitHub that shows the problem. |
I've encountered the same issue with ASP.NET Core projects after upgrading to VS2017 and csproj. When the project targets 'Any CPU', I get System.DllNotFoundException: Unable to load DLL 'libuv' when running against Kestrel and HTTP Error 502.5 - Process Failure when running against IIS Express. When the project targets 'x86' or 'x64', everything works fine. Looks like this might be related to dotnet/sdk#316 |
I'm not seeing this issue. Can you paste your csproj files here please? |
This csproj was created by File / New Project / Web / ASP.NET Core Web Application (.NET Framework) and then going to Project Properties / Builder tab / changing Platform target to 'Any CPU'. Changing AnyCPU to x64 or x86 fixes the problem. By default it is set to x86 on a new project.
|
@DamianEdwards My files are at work, sorry, one thing I've noticed looking at @danielcrabtree csproj is that we are both targetting aspnet45x (mine is on 451) could be a factor causing this? |
OK this repros for me now, thanks. This is indeed an issue only when targeting .NET Framework rather than .NET Core. |
@neonboxx net45x is not the problem. I get the problem on net462 as well. The csproj above is just a simple repo I made starting from a new project. The original project where I encountered this is targeting net462. |
net4xx then, as @DamianEdwards said full .NET Framework 👍 |
@DamianEdwards can issue this be reopened? In addition to @danielcrabtree's comment, I'm seeing the issue with x64 as well. Only x86 works correctly. I'm targeting .NET Framework because I only need to run on Windows but I wonder if targeting .NET Core is a better tested/supported scenario. |
@Jon12345 why do you need to explicitly set the "Platform Target" to "AnyCPU" out of interest? |
@DamianEdwards no I don't - I only became aware of this after adding a new "Unit Test Project (.NET Framework)" which defaults to "Any CPU" and doesn't like the mismatch. But my understanding is x64 is better than x86 for a number of reasons, so would prefer to target that. |
Ping @nguerrera as this could very possibly be an SDK/project system bug. |
We need better diagnostics here for platform target and runtime identifier mismatch. We have bugs tracking that. I'll link when I get to the office this afternoon. You can simply remove the RuntimeIdentifier from the project and then choosing platform target from the dropdown will work. We should update the template to not hard code the RID. I thought that had been done already but apparently not. |
Aside: x64 is not necessarily better than x86. If you need the extra memory, then use it if course, but if you don't you may see worse performance from the larger pointer size reducing locality. |
Removing RuntimeIdentifier from the csproj and then changing target to x64 does indeed work, although I had to do a "dotnet restore" first. Does Visual Studio's "Rebuild Solution" not restore? Got the following error: |
It should have auto-restored, cc @natidea |
Some changes that affect the set of "configured projects" (e.g. changes to target frameworks) are not restoring properly because of mismatches in our configured project versions. We are tracking this investigation in: dotnet/project-system#1503 |
This is happening consistently to me on dnx
1.0.0-beta8-15625
x86 CLR and Kestrel1.0.0-beta8-15636
The text was updated successfully, but these errors were encountered: