如何在VS 2017中将类图添加到ASP.NET Core项目? [英] How to add a Class Diagram to an ASP.NET Core project in VS 2017?

查看:356
本文介绍了如何在VS 2017中将类图添加到ASP.NET Core项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循了

I followed the How to: Add class diagrams to projects, but I have no "Class Diagram" template in my ASP.NET Core project after installing the ClassDiagram Visual Studio Component (I restarted Visual Studio after the installation of the component):

Microsoft Visual Studio Enterprise 2017 
Version 15.8.7
VisualStudio.15.Release/15.8.7+28010.2046
Microsoft .NET Framework
Version 4.7.03056

Installed Version: Enterprise

Visual C++ 2017   00369-60000-00001-AA695
Microsoft Visual C++ 2017

ASP.NET and Web Tools 2017   15.8.05085.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services   15.8.31590
Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2012   4.0.30625.0
For additional information, visit https://www.asp.net/

ASP.NET Web Frameworks and Tools 2017   5.2.60618.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.8.05023.0
Azure App Service Tools v3.0.0

Azure Functions and Web Jobs Tools   15.9.02009.0
Azure Functions and Web Jobs Tools

C# Tools   2.9.0-beta8-63208-01
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Devart Code Compare   4.2.236
Devart Code Compare
Copyright (c) 2012-2017 Devart. All rights reserved.
http://www.devart.com/codecompare/

JavaScript Language Service   2.0
JavaScript Language Service

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.10730.2

Microsoft Continuous Delivery Tools for Visual Studio   0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager   1.0
Install client-side libraries easily to any web project

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio Tools for Containers   1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

NuGet Package Manager   4.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

Snapshot Debugging Extension   1.0
Snapshot Debugging Visual Studio Extension Detailed Info

SQL Server Data Tools   15.1.61808.07020
Microsoft SQL Server Data Tools

TypeScript Tools   15.8.20822.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   2.9.0-beta8-63208-01
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 10.2 for F# 4.5   15.8.0.0.  Commit Hash: 55a3dc3231c95c77f81ee53f7d29152029da7408.
Microsoft Visual F# Tools 10.2 for F# 4.5

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Containers   1.0
Visual Studio Tools for Containers

推荐答案

此处,答案是已知问题 (为MS投票修正它!)

作为一种解决方法,在新建文件"对话框中创建一个名为Diagram.cd的纯XML(用您的选择替换Diagram),右键单击该文件,然后选择"打开方式... ",并选择 XML(文本)编辑器,然后将其内容替换为以下内容:

As a workaround, From the New File dialog box create a plain XML named Diagram.cd (replace Diagram with your choice), right click the file and select Open With..., and select XML (Text) Editor, then replace its contents with the following:

<?xml version="1.0" encoding="utf-8" ?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
  <Font Name="Segoe UI" Size="9" />
</ClassDiagram>

然后关闭保存文件.重新打开它后,它现在应该可以正常工作了.

Then close the file saving it. When you reopen it normally it should work now.

这篇关于如何在VS 2017中将类图添加到ASP.NET Core项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆