1. <legend id='PTmeX'><style id='PTmeX'><dir id='PTmeX'><q id='PTmeX'></q></dir></style></legend>
          <bdo id='PTmeX'></bdo><ul id='PTmeX'></ul>
      1. <small id='PTmeX'></small><noframes id='PTmeX'>

        <tfoot id='PTmeX'></tfoot>

        <i id='PTmeX'><tr id='PTmeX'><dt id='PTmeX'><q id='PTmeX'><span id='PTmeX'><b id='PTmeX'><form id='PTmeX'><ins id='PTmeX'></ins><ul id='PTmeX'></ul><sub id='PTmeX'></sub></form><legend id='PTmeX'></legend><bdo id='PTmeX'><pre id='PTmeX'><center id='PTmeX'></center></pre></bdo></b><th id='PTmeX'></th></span></q></dt></tr></i><div id='PTmeX'><tfoot id='PTmeX'></tfoot><dl id='PTmeX'><fieldset id='PTmeX'></fieldset></dl></div>

        如何将 Wpf 项目迁移到新的 VS2017 格式

        时间:2023-05-21
      2. <small id='laGjZ'></small><noframes id='laGjZ'>

      3. <i id='laGjZ'><tr id='laGjZ'><dt id='laGjZ'><q id='laGjZ'><span id='laGjZ'><b id='laGjZ'><form id='laGjZ'><ins id='laGjZ'></ins><ul id='laGjZ'></ul><sub id='laGjZ'></sub></form><legend id='laGjZ'></legend><bdo id='laGjZ'><pre id='laGjZ'><center id='laGjZ'></center></pre></bdo></b><th id='laGjZ'></th></span></q></dt></tr></i><div id='laGjZ'><tfoot id='laGjZ'></tfoot><dl id='laGjZ'><fieldset id='laGjZ'></fieldset></dl></div>

          • <legend id='laGjZ'><style id='laGjZ'><dir id='laGjZ'><q id='laGjZ'></q></dir></style></legend>
          • <tfoot id='laGjZ'></tfoot>
              <tbody id='laGjZ'></tbody>

            • <bdo id='laGjZ'></bdo><ul id='laGjZ'></ul>
                  本文介绍了如何将 Wpf 项目迁移到新的 VS2017 格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在将我的项目迁移到新的 Visual Studio 2017 格式,该格式仅适用于所有标准库,现在我在使用 Wpf/Xaml 的 UI 库中遇到问题.

                  I'm migrating my projects to the new visual studio 2017 format which is working nicely for all standard libraries only now I run into problems with my UI libraries where I use Wpf / Xaml.

                  我不知道如何为我的用户控件执行此操作.旧项目似乎不再有效.

                  I cannot figure out howto do this for my user controls. The old item doesn't seem to be valid anymore.

                  任何人都知道如何做到这一点,或者是否有可能.

                  Anybody has an idea howto do this or if it's even possible.

                  推荐答案

                  2018 年 12 月 13 日 - .NET Core 3 Preview 1 发布

                  .NET Core 3 将支持 WPF 和 WinForms 应用程序.你可以试试 SDK 的预览版:

                  .NET Core 3 will support WPF and WinForms applications. You may try it with Preview version of SDK:

                  <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
                    <PropertyGroup>
                      <OutputType>WinExe</OutputType>
                      <TargetFramework>netcoreapp3.0</TargetFramework>
                      <UseWPF>true</UseWPF>
                    </PropertyGroup>
                  </Project>
                  

                  上一个答案

                  您可以使用下面的模板来替换旧的 .csproj.它解决了其他人模板遇到的几个问题.

                  You can use template below to replace old .csproj with. It resolves couple of issues other people templates had.

                  1. 您不必像一些建议的那样包含中间 *.g.cs 文件.
                  2. 不会出现Main not found错误.
                  3. 无法运行您的项目.RunCommand"属性未定义.会发生错误.
                  4. 包括已配置的默认设置和资源.
                  1. You don't have to include intermediary *.g.cs files like some suggested to do.
                  2. No Main not found error will occur.
                  3. No Unable to run your project. The "RunCommand" property is not defined. error will occur.
                  4. Includes already configured default Settings and Resources.

                  模板:

                  <Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
                    <PropertyGroup>
                      <LanguageTargets>$(MSBuildExtensionsPath)$(VisualStudioVersion)BinMicrosoft.CSharp.targets</LanguageTargets>
                      <TargetFramework>net47</TargetFramework>
                      <OutputType>WinExe</OutputType>
                      <StartupObject />
                    </PropertyGroup>
                  
                    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
                      <DebugType>full</DebugType>
                      <DebugSymbols>true</DebugSymbols>
                    </PropertyGroup>
                  
                    <ItemGroup>
                      <!-- App.xaml -->
                      <ApplicationDefinition Include="App.xaml">
                        <SubType>Designer</SubType>
                        <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
                      </ApplicationDefinition>
                  
                      <!-- XAML elements -->
                      <Page Include="***.xaml" Exclude="App.xaml">
                        <SubType>Designer</SubType>
                        <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
                      </Page>
                      <Compile Update="***.xaml.cs" SubType="Code" DependentUpon="%(Filename)" />
                  
                      <!-- Resources -->
                      <EmbeddedResource Update="PropertiesResources.resx" Generator="ResXFileCodeGenerator" LastGenOutput="Resources.Designer.cs" />
                      <Compile Update="PropertiesResources.Designer.cs" AutoGen="True" DependentUpon="Resources.resx" DesignTime="True" />
                  
                      <!-- Settings -->
                      <None Update="PropertiesSettings.settings" Generator="SettingsSingleFileGenerator" LastGenOutput="Settings.Designer.cs" />
                      <Compile Update="PropertiesSettings.Designer.cs" AutoGen="True" DependentUpon="Settings.settings" />
                  
                    </ItemGroup>
                  
                    <ItemGroup>
                      <Reference Include="PresentationCore" />
                      <Reference Include="PresentationFramework" />
                      <Reference Include="System.Xaml" />
                      <Reference Include="WindowsBase" />
                    </ItemGroup>
                  </Project>
                  

                  这篇关于如何将 Wpf 项目迁移到新的 VS2017 格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:将 .net 核心与旧版 .net 框架 dll 一起使用 下一篇:该项目使用 Microsoft.NETCore.App 版本 2.1.0 恢复,但使用当前设置,将使用版本 2.1.0-

                  相关文章

                1. <small id='4bFut'></small><noframes id='4bFut'>

                    <legend id='4bFut'><style id='4bFut'><dir id='4bFut'><q id='4bFut'></q></dir></style></legend>

                    <i id='4bFut'><tr id='4bFut'><dt id='4bFut'><q id='4bFut'><span id='4bFut'><b id='4bFut'><form id='4bFut'><ins id='4bFut'></ins><ul id='4bFut'></ul><sub id='4bFut'></sub></form><legend id='4bFut'></legend><bdo id='4bFut'><pre id='4bFut'><center id='4bFut'></center></pre></bdo></b><th id='4bFut'></th></span></q></dt></tr></i><div id='4bFut'><tfoot id='4bFut'></tfoot><dl id='4bFut'><fieldset id='4bFut'></fieldset></dl></div>
                    • <bdo id='4bFut'></bdo><ul id='4bFut'></ul>
                  1. <tfoot id='4bFut'></tfoot>