Skip to content

No code generated during "self contained" publishing #67

Open

Description

@fubar-coder

Describe the bug

It seems that no code gets generated during publishing a "self contained" (in contrast to a framework dependent) application.

This are the build errors I get:

1>CSC(0,0): Fehler TRF001: Framework is not recognized.
1>CSC(0,0): Fehler ADPG: System.InvalidOperationException: Platform is not supported.
1>CSC(0,0): Fehler DPG: System.InvalidOperationException: Platform is not supported.

Steps to reproduce the bug

  1. Create a publishing profile in VS 2022
  2. Change deployment mode to self contained (or standalone)

Expected behavior

The build should succeed

Screenshots

No response

NuGet package version

1.4.0

IDE

No response

Additional context

No response

Activity

  1. HavenDV commented on Jun 27, 2026

    @HavenDV
    Owner

    Closing this as stale/needs-repro. Self-contained publishing should still provide enough MSBuild/analyzer config information for framework recognition, but this report does not include a minimal project, publish profile, or binlog to identify what property is being dropped during publish.

    If it still reproduces with the latest package, please reopen or file a fresh issue with a minimal repro and an MSBuild binary log from the self-contained publish.

  2. selvinfehric commented on Jul 21, 2026

    @selvinfehric

    I have encountered the same issue with the latest version 1.5.1. The build goes ok, but publishing with a self-contained framework throws errors:
    System.InvalidOperationException: Platform is not supported.
    Framework is not recognized.

    And some missing partial methods that were not generated.

  3. HavenDV commented on Jul 22, 2026

    @HavenDV
    Owner

    Thanks for confirming this still occurs in 1.5.1. I reproduced the vulnerable framework-detection path and opened #164 with a fallback that infers the UI framework from compilation references when publish-time MSBuild analyzer options are missing.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions