Skip to content

Instantly share code, notes, and snippets.

@adamsitnik
Created February 21, 2022 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamsitnik/393489d1bb99cf13cb70cb46d1243045 to your computer and use it in GitHub Desktop.
Save adamsitnik/393489d1bb99cf13cb70cb46d1243045 to your computer and use it in GitHub Desktop.
CoreRT setup
dotnet publish -c Release -r win-x64
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="coreRtNuGetFeed" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json" />
</packageSources>
</configuration>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<TrimMode>link</TrimMode>
<IlcGenerateCompleteTypeMetadata>True</IlcGenerateCompleteTypeMetadata>
<IlcGenerateStackTraceData>True</IlcGenerateStackTraceData>
<EnsureNETCoreAppRuntime>false</EnsureNETCoreAppRuntime>
<!-- workaround for 'This runtime may not be supported by.NET Core.' error -->
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\System.CommandLine\System.CommandLine.csproj" />
<PackageReference Include="Microsoft.DotNet.ILCompiler" Version="6.0.0-*" />
</ItemGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment