Skip to content

Improperly authored NuGet package: Microsoft.Identity.Client.NativeInterop #5019

Open
@KirillOsenkov

Description

Microsoft.Identity.Client.NativeInterop is a package that keeps giving us surprises in our build.

Similar to this bug: #4832

There's another unwanted side-effect. When we add a package reference to Microsoft.Identity.Client.Broker and then build our project with /t:Pack so that it generates a nupkg, our nupkg ends up with three additional files in it:
msalruntime.dll, msalruntime_arm64.dll and msalruntime_x86.dll

image

Sample .csproj:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net472</TargetFramework>
    <DebugType>embedded</DebugType>
    <LangVersion>latest</LangVersion>
    <OutputType>Exe</OutputType>
    <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NetFramework.ReferenceAssemblies" Version="1.0.3" />
    <PackageReference Include="Microsoft.Identity.Client.Broker" Version="4.66.2" />
  </ItemGroup>

</Project>

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions