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

error: NU1101: Unable to find package runtime.win-x86.Microsoft.DotNet.ILCompiler #630

Closed
netcorefan1 opened this issue Feb 3, 2021 · 10 comments
Labels
area-NativeAOT-coreclr .NET runtime optimized for ahead of time compilation

Comments

@netcorefan1
Copy link

Hello,
I am trying to build x86 and x64 version of the sample library, but I am getting the Nuget error in the title because can't find the relative package:
info : GET https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/fe324174-469a-4296-a9cb-1fd885bb6f2b/nuget/v3/flat2/runtime.win-x64.microsoft.dotnet.ilcompiler/6.0.0-preview.2.21103.1/runtime.win-x64.microsoft.dotnet.ilcompiler.6.0.0-preview.2.21103.1.nupkg info : NotFound https://api.nuget.org/v3-flatcontainer/runtime.win-x64.microsoft.dotnet.ilcompiler/index.json 515ms info : NotFound https://api.nuget.org/v3-flatcontainer/runtime.win-x86.microsoft.dotnet.ilcompiler/index.json 587ms info : NotFound https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/fe324174-469a-4296-a9cb-1fd885bb6f2b/nuget/v3/flat2/runtime.win-x86.microsoft.dotnet.ilcompiler/index.json 674ms info : OK https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/fe324174-469a-4296-a9cb-1fd885bb6f2b/nuget/v3/flat2/runtime.win-x64.microsoft.dotnet.ilcompiler/6.0.0-preview.2.21103.1/runtime.win-x64.microsoft.dotnet.ilcompiler.6.0.0-preview.2.21103.1.nupkg 1571ms info : Installing runtime.win-x64.Microsoft.DotNet.ILCompiler 6.0.0-preview.2.21103.1.
error: NU1101: Unable to find package runtime.win-x86.Microsoft.DotNet.ILCompiler. No packages exist with this id in source(s): dotnet-experimental, nuget

I followed the instructions in the readme, but I am not sure if they refer to old and obsolete source/packages:
nuget.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <!--To inherit the global NuGet package sources remove the <clear/> line below -->
    <clear />
    <add key="nuget" value="https://api.nuget.org/v3/index.json" />
    <add key="dotnet-experimental" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json" />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
</configuration>

dotnet add package Microsoft.DotNet.ILCompiler -v 6.0.0-*

I am also wondering if it is possible to do everything inside VS without being forced to open the shell just like happens with regular NuGet packages.
Thanks

@jkotas jkotas added the area-NativeAOT-coreclr .NET runtime optimized for ahead of time compilation label Feb 3, 2021
@jkotas
Copy link
Member

jkotas commented Feb 3, 2021

This project supports Linux/Windows/macOS x64 only currently. arm64 is in the works.

@netcorefan1
Copy link
Author

Thanks for your response. I am not sure if I understood well, but I am not using arm64 architecture. I am currently running on Windows 10 x64 and I am trying to make x86 and x64 builds. The x64 build fine, but when I set x86 as target platform, it fails because does not find the related package.
Am I missing something obvious?

@ThomasGoulet73
Copy link

ThomasGoulet73 commented Feb 3, 2021

As of today, x86 build is not supported. See dotnet/corert#8230. If I am not mistaken, there hasn't been progress toward supporting x86 but I may be wrong. If you would like to try x64, I think you need to remove x86 from <Platforms> in your project file. Nevermind, I didn't see that it worked for you in x64. It's weird because you should be getting a clearer message on publish.

@ThomasGoulet73
Copy link

I think you should be hitting this line when targeting x86: https://github.com/dotnet/runtimelab/blob/feature/NativeAOT/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets#L59. You should be getting the error "win-x86 not supported yet. dotnet/corert#4589"

@netcorefan1
Copy link
Author

Thanks for the info. Hope to see x86 supported soon.
I don't get the error "win-x86 not supported yet", may be because I am first compiling as Debug configuration with win-x64;win-x86. I suppose the first thing that happens is the Nuget package restoral and when can't find the x86 the build fail without having chance to hit that line.

@AntonLapounov
Copy link
Member

The Microsoft.DotNet.ILCompiler package claims to support 15 different runtimes, including win-x86. We need to fix that.

@AntonLapounov
Copy link
Member

@netcorefan1 Thank you for reporting this issue. We have fixed the ILCompiler package to report the "win-x86 not supported yet" error message in this scenario. At present we are focused on improving x64 and ARM64 support. If you think x86 support has important business or research value, I encourage you to post that request as a comment to issue 248 for better visibility.

@NCLnclNCL
Copy link

after 2 year but x86 still not support, with error NU1101: Unable to find package runtime.win-x86.Microsoft.DotNet.ILCompiler. No pa
ckages exist with this id in source(s): Microsoft Visual Studio Offline Packages, nuget.org

1 similar comment
@gitlsl
Copy link

gitlsl commented Jun 25, 2023

after 2 year but x86 still not support, with error NU1101: Unable to find package runtime.win-x86.Microsoft.DotNet.ILCompiler. No pa
ckages exist with this id in source(s): Microsoft Visual Studio Offline Packages, nuget.org

@Danford
Copy link

Danford commented Nov 11, 2023

Will this ever be supported?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NativeAOT-coreclr .NET runtime optimized for ahead of time compilation
Projects
None yet
Development

No branches or pull requests

7 participants