Home Dashboard Directory Help
Search

Visual Studio 2012 C++ validate architecture fails and layer references expansion freezes by Tay Code


Status: 

Closed


3
0
Sign in
to vote
Type: Bug
ID: 776187
Opened: 1/9/2013 6:52:12 PM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

Native C++ support to validate architecture via a layer diagram appears to be present but broken. I am not sure if I am experiencing multiple issues or if they are related. Running the architecture validation reports success but actually ignores any rules entered.

1.
Adding anything other than a project to the layer diagram fails, giving warning AV3001. The message specifies that the layer diagram object links to the named binary, but the binary name is given as "BinaryName Global::.objectName", where "BinaryName" is the name of the executable, "objectName" is the name of the C++ object I'm trying to add, and the text "Global::." always precedes the object name. It looks like the namespaces or assembly names are constructed in a way that the validation linker does not understand.

This page (https://connect.microsoft.com/VisualStudio/feedback/details/729428/model-project-layer-diagram-gives-bogus-av3001-warnings) appears to report the same issue for an older version of Visual Studio 2012.

This page (http://msdn.microsoft.com/en-us/library/dd409462.aspx) specifies the elements that can be added to a layer: "These artifacts can be namespaces, projects, classes, methods, and so on."

This page (http://msdn.microsoft.com/en-us/library/vstudio/dd465141.aspx#CreateLayers) has a section "to add binary files to the modeling project" which details how to add binary references to the modeling project. However, following this procedure does not appear to affect anything. Due to the issue described in #3 I can't use "layer references".

This page (http://msdn.microsoft.com/en-us/library/ff657801(v=vs.100).aspx) specifies that C++ code can be validated against layer diagrams following the same procedures as the instructions for .NET code:
"After meeting these requirements, you can follow the same steps as those for .NET code. For these steps, see How to: Validate .NET Code Against Layer Diagrams."
This page is specified for Visual Studio 2010 but likely applies to Visual Studio 2012 as well.

2.
The build output from running "validate architecture" always shows an error for "primary reference". I don't know if this error is related to #1. Immediately following that error it appears to successfully find a reference. In the following output, I have edited out the local paths, but the empty strings are actually output as empty strings.

1>    Primary reference "[binaryname]".
1>        Could not find dependent files. Could not load file or assembly '[binaryname].exe' or one of its dependencies. An attempt was made to load a program with an incorrect format.
1>        Could not find dependent files. An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
1>        Resolved file path is "[path to binary file].exe".
1>        Reference found at search path location "".
1>        Found related file "[path to binary output].pdb".
1>        This reference is not "CopyLocal" because at least one source item had "Private" set to "false" and no source items had "Private" set to "true".
1>        The ImageRuntimeVersion for this reference is "".

These pages (http://social.msdn.microsoft.com/forums/en-US/adodotnetdataproviders/thread/d0a75221-ee00-4a21-8876-339af840a099 or http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/b48bc916-1805-485d-bb7c-adabf027dcbd/) indicate this error may be related to inconsistent target platforms, but I get this error regardless of what target platforms any of my projects are set to. However, I don't know how to change the target platform of a modeling project because it doesn't use the standard project properties dialog.

3.
I can't check what references my modeling project is actually using because Visual Studio freezes indefinitely any time I try to expand the "layer references" group under my modeling project in the solution explorer. It also hangs, after I click the final "OK", when I right-click on the modeling project or "layer references" and choose "add reference".
Details
Sign in to post a comment.
Posted by Microsoft on 4/23/2013 at 3:33 PM
Hello, Tay,

Thank you for taking the time to provide your feedback. This was a bug in our product. The hang occurred in part of the code that had been modified extensively, and as such, the bug no longer reproduces in our latest internal builds. The fix will be publically available in one of the future releases of Visual Studio.

Sincerely,

Oleg Kharitonov
Visual C++
Posted by Microsoft on 1/11/2013 at 12:03 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Tay Code on 1/10/2013 at 9:00 AM
I have submitted a restricted attachment containing a zip of the folder containing the project I used to duplicate the issue.
If you are unable to duplicate the issue, I have determined that the Microsoft Problem Steps Recorder is able to capture the hung Visual Studio window, although I'm not sure if this would give much information in addition to the screencaps I already posted.
Posted by Microsoft on 1/10/2013 at 1:46 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Could you please give us a demo project to demonstrate this issue so that we can conduct further research?

We look forward to hearing from you with this information.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 1/9/2013 at 7:55 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
buildOutput.png 1/9/2013 121 KB
validationOutput.png 1/9/2013 111 KB
architectureExplorer.png 1/9/2013 133 KB
AV3001.png 1/9/2013 103 KB
ConsoleApplication2.zip (restricted) 1/10/2013 -