Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Functions Publish does not copy COMReference COM server dependency to publish output folder #544

Open
baumatron opened this issue Feb 17, 2022 · 0 comments

Comments

@baumatron
Copy link

I have an Azure Functions app targeting .NET 6 on Windows, which has a project dependency on a .NET 6 class library which in turn depends on a COMReference which is configured as registration-free and set to copy the COM server to the build output folder. I can confirm that the interop library and the COM server are copied to the build output folder.

The problem is that publishing my functions app fails because the COM server dll isn't copied to the publish output folder and so doesn't get deployed. Here's the class library's project file.

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

  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <Platforms>AnyCPU;x64</Platforms>
  </PropertyGroup>

  <ItemGroup>
    <COMReference Include="Dia2Lib.dll">
      <WrapperTool>tlbimp</WrapperTool>
      <VersionMinor>0</VersionMinor>
      <VersionMajor>2</VersionMajor>
      <Guid>106173a0-0173-4e5c-84e7-e915422be997</Guid>
      <Lcid>0</Lcid>
      <Isolated>true</Isolated>
      <Private>true</Private>
      <CopyLocal>True</CopyLocal>
    </COMReference>
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Azure.Storage.Blobs" Version="12.8.0" />
    <PackageReference Include="Azure.Storage.Queues" Version="12.6.0" />
    <PackageReference Include="Microsoft.Azure.Kusto.Data" Version="9.0.8" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0" />
    <PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
    <PackageReference Include="MongoDB.Driver" Version="2.11.6" />
  </ItemGroup>

</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants