Visual Studio: can a link to a Win8.1 project to a Net4.5 project?

The Windows application consists of 4 projects focused on Windows 8.1 and several testing projects:

Screenshot of solution projects

The project "... App.Core" was previously a Windows 8 project, which also focused on the .NET 4.5 infrastructure. But because of this, there were some asynchronous functions that could not be used.

Now we need a full asynchronous feature, and the project was redirected only to Windows8.1.

However, this violated the project "... App.Core.Tests", which is a test project .Net 4.5. He referenced the App.Core project, and the link is now broken .

Question Is it possible to configure the target Windows 8.1 project from a test project (without creating a new test project)? The test project has a significant number of tests, folders, and package links, which would be a serious problem for switching to a new project.

If I try to add a link now, I get an annoyingly short "Unable to add a link to the project" MyProject.App.Core ".

In addition, re-targeting the App.Core project means updating the goals of the other 8.1 projects and reinstalling each nuget package for each project. That is why I would prefer to solve this other way ... if there is one.

Is there any limitation of a .Net 4.5 project that can reference a Windows 8.1 project? Or maybe I'm just doing something wrong.

Update

Based on the comment below from @PiLHA, I added .NET 4.5.1 as a target. He changed the library type from "Windows 8.1" to "Portable", but he violated all asynchronous calls.

reference change

Note. I have Microsoft.Bcl v1.1.10, Microsoft.Bcl.Async v1.0.68 and Microsoft.Bcl.Build v1.0.21 added as nuget packages to the project "MyProject.App.Core".

+6
visual-studio visual-studio-2015
source share
2 answers

Try the following: Right-click the solution file in the Solution Explorer window, click Add, and select Existing Project.

enter image description here

Once the project becomes part of the solution, you can add a link to the project.

+2
source share

Take a look at the project file and see if there is something odd in the link group. The following link Unable to change or add the path to the referenced file in Visual Studio 2010 discusses manually editing the project file. Usually I just open the project file in a text editor. Locate the ItemGroup, and project links will be included in this group. You can also try to manually add the link this way.

+2
source share

All Articles