Instructions for using locally built NativeAOT builds are broken

Open
#119,166 7 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

Assessment

This issue has not been assessed yet.

Description

area-NativeAOT-coreclr

Repro steps

Follow instructions at https://github.com/dotnet/runtime/blob/main/docs/workflow/building/coreclr/nativeaot.md#building-packages with current .NET 10 RC1

Result

C:\test>dotnet publish -c release --packages pkg
  Determining projects to restore...
  All projects are up-to-date for restore.
c:\net10-rc1\sdk\10.0.100-rc.1.25425.114\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.target
s(345,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\te
st\test.csproj]
  test -> C:\test\bin\release\net10.0\win-x64\test.dll
C:\test\pkg\microsoft.dotnet.ilcompiler\10.0.0-dev\build\Microsoft.DotNet.ILCompiler.SingleEntry.targets(60,5): warning
 : Delete explicit 'Microsoft.DotNet.ILCompiler' package reference in your project file to avoid versioning problems. [
C:\test\test.csproj]
C:\test\pkg\microsoft.dotnet.ilcompiler\10.0.0-dev\build\Microsoft.NETCore.Native.Publish.targets(70,5): error : The Pr
ivateSdkAssemblies ItemGroup is required for _ComputeAssembliesToCompileToNative [C:\test\test.csproj]

C:\test>type nuget.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="local" value="C:\runtime\artifacts\packages\Release\Shipping" />
    <add key="dotnet10" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json" />
  </packageSources>
</configuration>

C:\test>type test.csproj
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net10.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <PublishAot>true</PublishAot>
    <InvariantGlobalization>true</InvariantGlobalization>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.DotNet.ILCompiler" Version="10.0.0-dev" />
  </ItemGroup>
</Project>
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/runtime

All issues in dotnet/runtime

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.