gpt4 book ai didi

asp.net-core - 如何从asp.net core 1.1项目生成类图

转载 作者:行者123 更新时间:2023-12-03 21:14:42 25 4
gpt4 key购买 nike

I'm getting this error. While opening classdiagram.cd file

用这个手动创建的 classdiagram.cd 文件:

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

在 vs 2017 社区

Microsoft.CSharp.DesignTime.targets 文件
(C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\Managed\Microsoft.CSharp.DesignTime.targets):
<!--

This file contains Visual Studio and designer-related properties and items for C# projects.

-->

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Import Project="Microsoft.Managed.DesignTime.targets" />

<!-- Properties -->
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<AppDesignerFolder Condition="'$(AppDesignerFolder)' == ''">Properties</AppDesignerFolder>
<AppDesignerFolderContentsVisibleOnlyInShowAllFiles Condition="'$(AppDesignerFolderContentsVisibleOnlyInShowAllFiles)' == ''">false</AppDesignerFolderContentsVisibleOnlyInShowAllFiles>
<LanguageServiceName Condition="'$(LanguageServiceName)' == ''">C#</LanguageServiceName>
<LanguageServiceId Condition="'$(LanguageServiceId)'==''">{694DD9B6-B865-4C5B-AD85-86356E9C88DC}</LanguageServiceId>
<TemplateLanguage Condition="'$(TemplateLanguage)' == ''">CSharp</TemplateLanguage>
<AddItemTemplatesGuid Condition="'$(AddItemTemplatesGuid)' == ''">{FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}</AddItemTemplatesGuid>

<!-- Turn off rules and capabilities that are defined in MSBuild so that we can import our own below -->
<DefineCSharpItemSchemas>false</DefineCSharpItemSchemas>
</PropertyGroup>

<ItemGroup>
<PropertyPageSchema Include="$(ManagedXamlResourcesDirectory)CSharp.ProjectItemsSchema.xaml;"/>

<ProjectCapability Include="CSharp;Managed;ClassDesigner"/>
</ItemGroup>

<!-- Targets -->

<!-- Returns Csc command-line arguments for the language service -->
<Target Name="CompileDesignTime"
Returns="@(_CompilerCommandLineArgs)"
DependsOnTargets="_CheckCompileDesignTimePrerequisite;Compile"
Condition="'$(IsCrossTargetingBuild)' != 'true'">

<ItemGroup>
<_CompilerCommandLineArgs Include="@(CscCommandLineArgs)"/>
</ItemGroup>

</Target>

</Project>

最佳答案

有一个 bug in one of the files这会阻止您在 .Net Core 项目中使用类图。您现在可以应用手动修复。打开文件 C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\Managed\Microsoft.CSharp.DesignTime.targets (或您安装它的任何地方)并更改此行:

<ProjectCapability Include="CSharp;Managed"/>

对此:
<ProjectCapability Include="CSharp;Managed;ClassDesigner"/>

现在重新启动 Visual Studio 并重试。

关于asp.net-core - 如何从asp.net core 1.1项目生成类图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47967459/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com