C # UWP - Unable to add project link in same solution

I need to write a UI for the API utility that I need to use. I created a new universal Windows application for the user interface, added the API utility project to the solution, and now I must reference the API utility from the UWP project, but I just get "Unable to add project link to" XXX ".

If I create a Windows Forms application or a console project and add it to the solution, I can make a link, no problem.

What is it about UWP that I don't understand?

+5
source share
3 answers

You should create a portable class library for your API utility.

See MSDN: https://msdn.microsoft.com/en-us/library/gg597391(v=vs.110).aspx

+3
source

There are two ways to provide a link to C # projects.

Select a project β†’ Right-click Links β†’ Add Link
1. through .dll: find assemblies (DLL files) and select the desired file β†’ OK
2. via .csproj: select Projects / Common projects from the menu on the left β†’ find .csproj files (Note: select the filter file as β€œAll files” to make them visible) β†’ OK

+1
source

When encoding UWP to create a library that can be referenced by a UIP UIP project with the same solution, I need to use a specific library project template (for example: by adding a new project | Windows | Class Library (Universal Windows)), which is what worked for me (I suppose you have the UWP SDK installed), so if you have a .dll source, maybe you should try to recompile it using this project format. Hope this helps.

0
source

Source: https://habr.com/ru/post/1245866/


All Articles