Skip to content

Paket does not support overwriting multiple settings in paket.reference #4329

Description

@holzerseb

I have the following bug with version 10.3.1:
I'm importing a reference which needs two properties overwritten: specific_version and embed_interop_types.
According to the documentation, I should be able to do that in paket.reference by defining the package twice for each setting (arguably, the documentation doesn't say that but the example implies it):

paket.reference (project-specific one, not inherited):

Microsoft.Office.Interop.Outlook specific_version: false
Microsoft.Office.Interop.Outlook embed_interop_types: true

However, when I run paket.exe install, the process goes through, but only sets the last setting in my .csproj:

  <Choose>
    <When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.8'">
      <ItemGroup>
        <Reference Include="Microsoft.Office.Interop.Outlook">
          <HintPath>..\..\..\packages\Microsoft.Office.Interop.Outlook\lib\net20\Microsoft.Office.Interop.Outlook.dll</HintPath>
          <Private>True</Private>
          <Paket>True</Paket>
          <EmbedInteropTypes>True</EmbedInteropTypes>
        </Reference>
      </ItemGroup>
    </When>
  </Choose>

When I switch the lines in paket.reference (specific_version last), then only SpecificVersion is set and EmbedInteropTypes will NOT be set in .csproj.

In contrast (since it's not properly defined in the documentation except in the example code), if I try to set both settings in one line, paket.exe fails immediately.
Microsoft.Office.Interop.Outlook specific_version: false embed_interop_types: true will cause paket.exe to fail with an error.

Effectively, with 10.3.1 it is not possible to overwrite two settings in the paket.reference, despite the documentation having exactly this as an example:

Image

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions