-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Compilation libraries cannot be found error when hosting .NET core in Nano Server containers #864
Comments
Is this an issue where preservecompilationcontext is not preserving enough? @dsplaisted can you take a look? |
It looks like the @eerhardt @gkhanna79 Is there a way to flow this information through? |
Also ping @pranavkm and @natemcmaster on whether Razor compilation can respect the |
@dsplaisted all we do in Mvc is call |
@pakrym should chime in on this as he owns that code. |
@HuanhuanSunMSFT I downloaded your app and it builds/runs fine outside of the container. I'm guessing the container setup has something to do with this error. I noticed your dockerfile is using the "runtime" Docker image. Normally you would use this image by executing |
The DependencyModel's resolution logic only knows how to look in a few specific places. None of them are in the Here are the places DependencyModel knows to look: Basically:
There are other places that are probed by DependencyModel, but the above 2 are the ones that are relevant to your scenario. So if you really want your scenario to work, as is, you would need to map one of those 2 places inside your docker container. All that being said, I agree with @natemcmaster above - using |
I've reproduced this issue outside of a docker container (by renaming the NuGet packages folder), and verified that setting the NUGET_PACKAGES environment variable fixes the issue both outside and inside a docker container. You have to specify both the So @HuanhuanSunMSFT, I think for now the fix to this issue is to set the It would be good to have a unified way of setting the path to NuGet packages that works for both the host and Razor compilation, but that's not as urgent so I'm going to move this out of 1.0 RTM. |
@HuanhuanSunMSFT let's add NUGET_PACKAGES to docker-compose.vs.debug.yml for Nano scenarios. |
Thanks everyone. I'll take @dsplaisted suggestion to set nuget packages path as an environment variable. |
FYI - the underlying issue here of |
…809.8 (dotnet#864) - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19409.8
Here is a Repro Project.
After launch the ASP.NET core web app, browse the website with IP address will return 500 error. Here is the error within the nano server container.
The text was updated successfully, but these errors were encountered: