C# VS2019 Winforms SDK风格项目,can';不要添加新表单
VS20019创建了一个以.net framework(.net 4.7.2)为目标的windows窗体项目,作为“旧”样式的项目。我已使用将新创建的项目转换为SDK样式。转换后的项目运行正常,但VS20019C# VS2019 Winforms SDK风格项目,can';不要添加新表单,c#,visual-studio-2019,C#,Visual Studio 2019,VS20019创建了一个以.net framework(.net 4.7.2)为目标的windows窗体项目,作为“旧”样式的项目。我已使用将新创建的项目转换为SDK样式。转换后的项目运行正常,但VS20019Add/New item对话框未显示Winforms节和表单模板。 仍然VS2017Add/New item对话框成功显示Winforms部分。正如VS20019为“旧”风格的原始项目所做的一样 我错过了什么? 转换项目: <Project Sdk="Microsoft.N
Add/New item
对话框未显示Winforms节和表单模板。
仍然VS2017Add/New item
对话框成功显示Winforms部分。正如VS20019为“旧”风格的原始项目所做的一样
我错过了什么?
转换项目:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net472</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>bin\$(Configuration)\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Deployment" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Update="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Update="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Update="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
</Project>
温克斯
网络472
真的
假的
bin\$(配置)\
满的
pdbonly
形式
表格1.cs
ResXFileCodeGenerator
Resources.Designer.cs
设计师
真的
Resources.resx
设置单个文件生成器
Settings.Designer.cs
真的
设置。设置
真的
它是Windows7 prof x64上的VS2019 Community 16.7.1。这是一个正确的项目文件。注意
true
温克斯
网络472
温克斯
真的
...
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net472</TargetFramework>
<OutputType>WinExe</OutputType>
<UseWindowsForms>true</UseWindowsForms>
...