Category: visual studio visualiaztion
Shiro_Yacha on Thu, 31 Jul 2014 13:48:05
I am using a layer diagram to verify the dependencies of the classes of an universal application. I am currently using the MVVMLight toolkit, and the viewmodel files are in the shared project. However, it seems that the files in the shared project cannot be validated by the layer diagram. Is it due to the fact that shared codes will be compiled into different platforms?
This is a bit annoying as it prevents me from validating the MVVM structure.
Sulabh Upadhyay on Sat, 09 Aug 2014 19:29:28
Layer validation is supported for Universal applications as well.
In order to understand what is the exact root cause of the issue that you are facing can you please let us know following?
1. Which version of Visual Studio are you using (Visual Studio 2013). Is it CTP /RC/RTM version of Visual Studio Update 3 ( Ultimate) .
You can get this information in Help -> About Microsoft Visual Studio.
2. Do we have other older version of Visual studio installed on the machine ? If Yes which version(s).
3. Can you please share any error message that you are getting during validation?
4. Can you please confirm if below is the exact scenario that you are trying to validate in the Layer diagram ?
Classes from (windows ) -> Dependent on ( some class in Shared project)
Class from ( Windows store) -> Dependent on (some class in Shared Project)
If above is not the exact scenario, it would be great if you can share the exact scenario.
I hope you are picking the exact classes from universal app for validation instead of whole projects, as there are bidirectional dependencies between shared projects and (windows and windows phone projects)
Shared project <-> Windows project
Shared project <-> Windows Phone project
Please note that there are few classes in shared project which are resulting in bi-directional dependencies.
Sulabh Upadhyay on Wed, 20 Aug 2014 06:57:54
Can you please answer above queries? It will help us in understanding the root cause of the issue that you are facing
Shiro_Yacha on Wed, 20 Aug 2014 08:23:34
Sorry for the late response. it is the VS2013 Ult Update 2 that I am using. There is no other copies of VS on my machine (apart from a VS2013 on a VM but I don't think that counts?). The scenario is the one you've mentioned. I've tried to just move separate C# files from the shared project to the layer but only the project file is displayed in the layer explorer. Such as:
Sulabh Upadhyay on Wed, 03 Sep 2014 11:56:45
Thanks! ShiroYacha for the reply.
With the scenario that you have mentioned, we are able to repro the issue at our end. I have forwarded the issue to the concerned team in Microsoft.
Shiro_Yacha on Wed, 03 Sep 2014 12:15:23
Thanks a lot,
I am looking forward to it.
Sulabh Upadhyay on Wed, 03 Sep 2014 14:17:52
As a work around :
Instead of dragging and dropping the files from shared projects you can try drag and drop of classes present inside those files from solution Explorer to the layer diagram.
Note: When you add classes from shared project they will be associated to one of the project type (either Windows project or windows phone project). You can get this information in the layer explorer.
If you want to get the class corresponding to other project type instead of default one do the following step:
1. Change the Project Context in the Code Editor ( 1st drop-down in code editor :- Project Type) to the desired project type.
2. Now do drag and drop of class from shared project in solution explorer to layer diagram. The nodes for the classes will be added to the layer diagram in context of the selected project context
Shared Project classes e.g. Shared Class A(in Windows context)
Shared Project classes e.g. Shared Class A(in WindowsPhone context)
Shiro_Yacha on Wed, 03 Sep 2014 15:04:48
It works! It isn't that complicate as I thought in the beginning since the project context remains global. I could ctrl-select all the classes in an environment (WP) and vice-versa(W). Still it will be nice if VS team fix it in VS14.