Skip to content

Instantly share code, notes, and snippets.

@filipnavara
Last active October 13, 2020 16:32
Show Gist options
  • Save filipnavara/214f9157ad5da4bd74eebd3ddca503c5 to your computer and use it in GitHub Desktop.
Save filipnavara/214f9157ad5da4bd74eebd3ddca503c5 to your computer and use it in GitHub Desktop.
TestApp Mono Runtime
<configuration>
<!-- Don't use any higher level config files.
Our builds need to be isolated from user/machine state -->
<fallbackPackageFolders>
<clear />
</fallbackPackageFolders>
<packageSources>
<clear />
<!--
'src/test/PrepareTestAssets/PrepareTestAssets.proj' generates a NuGet.config file using this
one as a template. The following line is a marker to insert the test restore sources.
-->
<!-- TEST_RESTORE_SOURCES_INSERTION_LINE -->
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
<add key="dotnet5-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json" />
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
<add key="dotnet6-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6-transport/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources>
<clear />
</disabledPackageSources>
</configuration>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<KnownFrameworkReference Include="Microsoft.NETCore.App.Mono"
TargetFramework="netcoreapp5.0"
RuntimeFrameworkName="Microsoft.NETCore.App"
DefaultRuntimeFrameworkVersion="$(BundledNETCorePlatformsPackageVersion)"
LatestRuntimeFrameworkVersion="$(BundledNETCorePlatformsPackageVersion)"
TargetingPackName="Microsoft.NETCore.App.Ref"
TargetingPackVersion="$(BundledNETCorePlatformsPackageVersion)"
RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.Mono.**RID**"
RuntimePackRuntimeIdentifiers="linux-x64"
IsTrimmable="true"
/>
<FrameworkReference Remove="Microsoft.NETCore.App" />
<FrameworkReference Include="Microsoft.NETCore.App.Mono" IsImplicitlyDefined="true" Pack="false" PrivateAssets="All" />
</ItemGroup>
</Project>
@akoeplinger
Copy link

You'll need to use dotnet run -r linux-x64 to make sure it uses the Mono runtime pack, a plain dotnet run will use coreclr.

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