Skip to content

Resolving metadata fails when referencing a c++/winrt project from a c# uwp project #5412

@matthew4850

Description

@matthew4850

Steps to reproduce

Download attached zip and run:
msbuild test.sln /p:AppxBundlePlatforms="x86|x64|ARM" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=StoreUpload /p:Configuration=Debug /p:Platform="x86"
test.zip

Directory contents:

/
- test.sln
- test.user
- App1/
     - App.xaml
     - App.xaml.cs
     - App1.csproj
     - MainPage.xaml
     - MainPage.xaml.cs
     - Package.appxmanifest
- RuntimeComponent1/
     - Class.cpp
     - Class.h
     - Class.idl
     - packages.config
     - pch.cpp
     - pch.h
     - PropertySheet.props
     - RuntimeComponent.def
     - RuntimeComponent.vcxproj
     - RuntimeComponent.vcxproj.filters
- packages/
     - Microsoft.Windows.CppWinRT.2.0.200316.3/

Expected behavior

It builds successfully.

Actual behavior

CSC : error CS0006: Metadata file [path] could not be found

Environment data

msbuild /version output:
16.5.0.12403
OS info:
Windows 10 20h1

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