aardvark-platform / aardvark.templates

.NET Core SDK templates for bootstrapping new Aardvark projects
MIT License
15 stars 1 forks source link

Rendering project fails on .NET 6.0 #9

Closed gsomix closed 11 months ago

gsomix commented 2 years ago

Repro steps

  1. Create project using Aardvark template.

    $ mkdir TestApp
    $ cd TestApp
    $ dotnet new aardvark.rendering --backend opengl
  2. Update Paket to latest in dotnet-tools.json.

    {
    "version": 1,
    "isRoot": true,
    "tools": {
    "paket": {
      "version": "7.0.0-alpha003",
      "commands": [
        "paket"
      ]
    }
    }
    }
  3. Update TestApp.fsproj to .NET 6

    <Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net6.0</TargetFramework>
    </PropertyGroup>
    
    <ItemGroup>
    <Compile Include="Program.fs" />
    </ItemGroup>
    
    <Import Project="..\..\.paket\Paket.Restore.targets" />
    </Project>
  4. Update Aardvark to latest in paket.dependencies

    
    source https://api.nuget.org/v3/index.json
    framework: net6.0
    storage: none

nuget FSharp.Core >= 5.0.0 lowest_matching: true

nuget Aardvark.Base ~> 5.1.25 nuget Aardvark.Base.Incremental ~> 5.1.25 nuget Aardvark.Base.FSharp ~> 5.1.25

nuget Aardvark.Rendering ~> 5.1.22 nuget Aardvark.SceneGraph ~> 5.1.22 nuget Aardvark.SceneGraph.IO ~> 5.1.22 nuget Aardvark.Application.Slim ~> 5.1.22 nuget Aardvark.Application.Slim.GL ~> 5.1.22


5. Install packages and run application

$ dotnet tool restore $ dotnet paket install $ dotnet run -c Release --project .\src\TestApp\TestApp.fsproj


Full project:
[TestApp.zip](https://github.com/aardvark-platform/aardvark.templates/files/7799489/TestApp.zip)

**Expected behavior**

Application runs.

**Actual behavior**

[UnhandledException.](https://github.com/aardvark-platform/aardvark.templates/files/7799490/UnhandledException.log)

System.PlatformNotSupportedException: Unmanaged indirect call emission is not supported on this platform.


**Known workarounds**

Use .NET 5 instead.

**Related information**

$ dotnet --version 6.0.100