• C# 类库项目 无法创建 “资源字典” 文件


    1、接触WPF有两个月时间了,准备自己写一个样式库,在vs新建 类库项目后无法创建资源字典。

    2。解决办法:

    打开项目工程文件      (  project.csproj)

    在 <PropertyGroup>标签添加 下面红色的三句话。

    <?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <Import Project="$(MSBuildExtensionsPath)$(MSBuildToolsVersion)Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)$(MSBuildToolsVersion)Microsoft.Common.props')" />
      <PropertyGroup>
        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
        <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
        <ProjectGuid>{7EBB32F9-AA8D-46E2-9012-9346F4C7B104}</ProjectGuid>
        <OutputType>Library</OutputType>
        <AppDesignerFolder>Properties</AppDesignerFolder>
        <RootNamespace>WPFTemplateStyleLibrary</RootNamespace>
        <AssemblyName>WPFTemplateStyleLibrary</AssemblyName>
        <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
        <FileAlignment>512</FileAlignment>
        <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
        <WarningLevel>4</WarningLevel>
        <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
      </PropertyGroup>
      <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
        <DebugSymbols>true</DebugSymbols>
        <DebugType>full</DebugType>
        <Optimize>false</Optimize>
        <OutputPath>binDebug</OutputPath>
        <DefineConstants>DEBUG;TRACE</DefineConstants>
        <ErrorReport>prompt</ErrorReport>
        <WarningLevel>4</WarningLevel>
      </PropertyGroup>
      <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
        <DebugType>pdbonly</DebugType>
        <Optimize>true</Optimize>
        <OutputPath>binRelease</OutputPath>
        <DefineConstants>TRACE</DefineConstants>
        <ErrorReport>prompt</ErrorReport>
        <WarningLevel>4</WarningLevel>
      </PropertyGroup>
  • 相关阅读:
    [开发笔记]-使用bat命令来快速安装和卸载Service服务
    [开发笔记]-多线程异步操作如何访问HttpContext?
    [开发笔记]-Windows Service服务相关注意事项
    [开发笔记]-VS2012打开解决方案崩溃或点击项目崩溃
    Chrome 开发者工具有了设备模拟器
    Mysql查看数据库表容量大小
    golang操作mysql数据库
    golang命令和VSCode配置
    golang广度优先算法-走迷宫
    golang爬取免费代理IP
  • 原文地址:https://www.cnblogs.com/rh-fernando/p/11855846.html
Copyright © 2020-2023  润新知