-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure class diagrams work #256
Comments
The command for the right-click menu is |
It's already handling View In Class diagram for Class View, so I think it makes more sense to live in the class diagram code. |
That seems fine - why do you think it's beyond the scope of RC3? |
With the edit csproj changes and migration changes, I'm not sure I'll have time for this as well. |
Ah ok. @RaulPerez1 would you be able to look into this? |
@davkean where is the class diagram code? I couldn't find any reference in the project system repo so I'm presuming this is in VS? |
Yeah, look at the usages of IViewInClassDiagram on index. |
Even though the core class diagram code handles the command (for class view) it does nothing so I think we're going to need changes on our side one way or another. @srivatsn I think this is going to be larger than a regular bug fix and will definitely not fit in for RC3. |
Hello, I need to add a class diagram to a .net core class library project. Am I missing some other steps? I'm using Visual Studio Community 2017. |
@Univac1107, when you attempt to open the class diagram, do you get an error dialog or does attempting to open it cause nothing to occur? |
The class diagram option does not appear on the new item menu.
When double clicking it, I get the dialog:
I've used the file given on: (https://raw.githubusercontent.com/tannergooding/project-system/1ab632313f0715fced04e2f383416f3ec6695268/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/DesignTimeTargets/Microsoft.CSharp.DesignTime.targets). Should I reinstall VS? |
@Univac1107, is it a NetStandard project (#2820)? Could you share the solution (or a simplified solution) so that I can check this out? |
Here is the link to the sample app i'm using: https://drive.google.com/file/d/0B5Cy0l7YShV2UC1aam9nT0dWNEE/view?usp=sharing |
Hello, any update on this? |
@Univac1107, I am able to open the class diagram successfully with the solution you supplied (sorry for the delayed response, this slipped my radar). |
So I guess I'm missing something. |
AFAIK, it shouldn't. You should just have to replace/modify your local copy of |
So it leaves it only one option, that this file: |
@Univac1107, double-check changes to file. I have VS2017 Community Edition (v15.3.0), changed Then I restarted VS, manually create *.cd file with content:
And this diagram successfully opened in VS and I can add classes to it, save, reopen VS and open diagram again. With error message (once after VS launch), but works. Woo-hoo! |
Changing in the file
to:
fixed the issue for me |
This works for me, except I cannot create Collection Association links. I get "This is not a valid type name." message when I try. |
Same here, actually in a .NET Framework 4.7 project that references a netstandard 2.0 class library that has the classes in it which I have on my diagram. |
@davkean, a collection association link will show the relationship from one class property that is a collection (array, list, etc.) of another class. If you right-click on the collection property you will see an option for "Show as Collection Association". |
Based on your trick, I managed to have my netstandard 2.0 project work with class diagrams (VS 15.4.4): I simply added this to the end of my .csproj: <ItemGroup>
<ProjectCapability Include="CSharp;Managed;ClassDesigner" />
</ItemGroup> and I can add/edit class diagrams in this project (nio need to restart VS as it is local to the project). Btw, it works whatever framework I target (tried netstandard2.0 and net45).[Edited] Well, the result is not perfect as quite a few things do not work (I have |
Are we ever gonna see official Class Designer support in .NET Core or Standard again? |
Class diagrams didn't work in xproj, we need to figure out if that was based on CPS, or just based on the xproj model. We should test them.
The text was updated successfully, but these errors were encountered: