C
C#7mo ago
Unmei

Export Nuget Package (.targets and .nuspec): what am I doing wrong?

Hey all. I'm currently facing an issue with nuget package generation. I have a UAP project/library that builds correctly and i'm able to integrate it with a WinUI application so that i can access its funcionalities (WinUI project depends on UAP project). Currently i'm trying to export this UAP project into a Nuget package, but i guess something is missing and i'm writing .nuspec and .targets file incorrectly because the WinUI application fails to execute (even though it builds and is able to find references of my UAP project). - WinUI project - platform is x64 - RuntimeIndentifier is win10-x64 - TargetFramework is net6.0-windows10.0.22621.0 - UAP project - platform is also x64 - WindowsTargetPlatformVersion is 10.0.22621.0 I'm attaching the nuget explorer view of my package. You can see that i exported everything from the bin/ folder to the lib/net.../ folder (.winmd, .exp, .lib even tho .lib is not needed...), except for the .dll, which i'm putting in the runtimes/win10-x64/native folder. In the .targets file, i'm linking the .winmd file (kinda of a header file of windows runtime) to the .dll, as you can see in the xml view. When i try to run the application, 2 things would happen: - the application silently stops debugging after one second or two - it will give me an error saying
An assembly specified in the application dependencies manifest (WinUIApp.deps.json) has already beeen found but with a different file extension:
package: <uap-proj-name>, version 0.0.1
path: lib/net6.0-windows10.0.22621/<uap-proj-name>.winmd
previously found assembly: (...)/WinUIApp/bin/<uap-proj-name>.dll
An assembly specified in the application dependencies manifest (WinUIApp.deps.json) has already beeen found but with a different file extension:
package: <uap-proj-name>, version 0.0.1
path: lib/net6.0-windows10.0.22621/<uap-proj-name>.winmd
previously found assembly: (...)/WinUIApp/bin/<uap-proj-name>.dll
What am I doing wrong here?
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server