Skip to content

GenerateAssemblyInfo target is ordered after _SetEmbeddedFilesFromSourceControlManagerUntrackedFiles target #572

Open

Description

AssemblyInfo.cs is not embedded when EmbedUntrackedSources is true.

The workaround is to specify it manually in Directory.Build.targets file. The following also includes workaround for dotnet/msbuild#1479:

<Project>
  <PropertyGroup>
    <TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
  </PropertyGroup>
  <ItemGroup>
    <EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
  </ItemGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions