Skip to content
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

Unable to find resolved path for 'coreclr' #314

NicolasDorier opened this issue May 8, 2018 · 5 comments

Unable to find resolved path for 'coreclr' #314

NicolasDorier opened this issue May 8, 2018 · 5 comments


Copy link

NicolasDorier commented May 8, 2018


NBxplorer is a netcoreapp2.1 referencing NBXplorer.Client, a library in the same project targetting netcoreapp2.1.

Compiling NBXplorer with ILLink gives Unable to find resolved path for 'coreclr' error.

Note: If NBXplorer.Client is targetting netstandard2.0, it does not work either. If I target netstandard2.0 I get NBXplorer.Client depends on Microsoft.AspNetCore.App (>= 2.1.0-rc1) but Microsoft.AspNetCore.App 2.1.0-rc1 was not found.

Despite the fact NBXplorer.Client does not depend on it.


git clone
cd NBXplorer
git checkout smalldocker
docker build -t nicolasdorier/nbxplorer .

For convenience, here is the dockerfile

FROM microsoft/dotnet:2.1.300-rc1-sdk-alpine3.7 AS builder
WORKDIR /source
COPY NBXplorer/NBXplorer.csproj NBXplorer/NBXplorer.csproj
# Cache some dependencies
RUN cd NBXplorer && dotnet restore && cd ..
COPY . .
RUN cd NBXplorer && \
    dotnet add package ILLink.Tasks --version 0.1.5-preview-1461378 --source && \
    dotnet publish --output /app/ --configuration Release -r linux-musl-x64

FROM microsoft/dotnet:2.1.0-rc1-runtime-deps-alpine3.7

RUN mkdir /datadir
VOLUME /datadir

COPY --from=builder "/app" .
ENTRYPOINT ["./NBXplorer"]

Building without ILLink works fine.

Copy link

/cc @sbomer

Copy link

I have the same issue. And the most strange thing - it worked for me with preview of dotnet core 2.1, but fails after release

it looks like some reference to coreclr got broken for ILLink after release

Copy link

shanselman commented Aug 29, 2018

Hitting this as well. Repro at Just git clone and docker build.

Copy link

sbomer commented Aug 29, 2018

The full error is:

/usr/share/dotnet/sdk/2.1.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(48,5): error NETSDK1016: Unable to find resolved path for 'coreclr'.

There seems to be an issue finding crossgen dependencies in some cases with new SDKs. I'm hoping we'll be able to fix this when/if we add proper crossgen support outside of the linker:

In the meantime, you can work around this by setting the property CrossGenDuringPublish to false. The option is documented here if you want to know more:

Copy link

Proper cross-gen support was added in dotnet/cli (closing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

5 participants