see Visual Studio's setting reference on the same project?

Asked 1 years ago, Updated 1 years ago, 131 views

As shown in the solution configuration diagram, I would like to refer to the same name project (ViewModels) that exists in different paths in the solution from the Views project.However, if you check both projects in VisualStudio's reference settings and refer to , an error pop-up appears and you can only view one of the projects.
Is it possible to refer to a project of the same name from a project?
If the means are wrong, I would like to know the means.

Environment: VisualStudio 2017, .Net 4.6.1, C#

Solution Configuration Diagram
Solution Configuration Diagram

c# visual-studio .net

2022-09-30 21:45

1 Answers

The C# language has the following features: external alias to differentiate between assembly namespace classes of the exact same name

.

Then, if you look at the properties of the assembly referenced on Visual Studio, you will find the item Aliases:global, which is where external alias is set, so give each one another name.


2022-09-30 21:45

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.