Windows App UET SDK in UWP app missing assembly

105 views Asked by At

I've been trying to implement ads tracking with Windows App UET SDK, following the official guide

I have a default C# UWP "Blank app, Packaged with Windows Application packaging project (WinUI 3 in Desktop)" in Visual Studio 22 with Microsoft.BingAds.UETSdk nuget packaged added, which refused to build with

Microsoft.BingAds.UETSdk.winmd cannot be referenced. Referencing a Windows Metadata component directly when targeting .NET 5 or higher is not supported. For more information, see https://aka.ms/netsdk1130

error, which goes away after also adding Microsoft.Windows.CsWinRT package to the project as directed.

But then I become unable to reference UETSdk altogether

error msg despite the assembly reference showing up in the solution explorer solution explorer

assembly dependency is automatically added together with UETSdk package.

Tried both net6 and net5 frameworks, VS and pc restarts with no luck. UETSdk package is quite new so I couldn't find any relevant info about dealing with similar problems. It only contains a bunch of winmd files for different platforms with no source code to look into.

Would be super delighted to learn there's a solution. Thank you.

1

There are 1 answers

0
Junjie Zhu - MSFT On BEST ANSWER

Windows App UET SDK only supports C#/C++ UWP WinRT project, please use Windows App UET SDK in UWP project.

The project you created Blank app, Packaged with Windows Application packaging project (WinUI 3 in Desktop) is a WinUI3 project, and it is not supported.