Skip to content

[Bug] EmitCompilerGeneratedFiles warning in test app projects due to missing CompilerGeneratedFilesOutputPath #5760

@gladjohn

Description

@gladjohn

Library version used

N/A

.NET version

.NET Framework v4.8 (test apps: DesktopTestApp, MultiCloudTestApp, WAMClassLibrary)

Scenario

PublicClient - desktop app

Is this a new or an existing app?

This is a new app or experiment

Issue description and reproduction steps

Three test app projects produced a build warning:

EmitCompilerGeneratedFiles was true, but no CompilerGeneratedFilesOutputPath was provided.

This warning is seen when running builds for:

  • tests/devapps/DesktopTestApp/DesktopTestApp.csproj
  • tests/devapps/MultiCloudTestApp/MultiCloudTestApp.csproj
  • tests/devapps/WAM/WAMClassLibrary/WAMClassLibrary.csproj

The root cause is that these projects enable EmitCompilerGeneratedFiles (via .editorconfig or build props) but do not specify the required CompilerGeneratedFilesOutputPath. Adding that property to the main PropertyGroup fixes the warning.

Steps to reproduce:

  1. Build any of the above test apps with MSBuild (or Visual Studio)
  2. Observe compiler warning about missing CompilerGeneratedFilesOutputPath

Relevant code snippets

<!-- N/A - no code needed -->

Expected behavior

Builds should complete cleanly with no warning. Generated files should be properly placed in obj/[configuration]/generated/.

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

No response

Solution and workarounds

Add <CompilerGeneratedFilesOutputPath>$(IntermediateOutputPath)generated</CompilerGeneratedFilesOutputPath> to the main PropertyGroup in each affected project file.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions