首页 > Windows开发 > 详细

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

时间:2019-11-14 12:05:21      阅读:119      评论:0      收藏:0      [点我收藏+]

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>bin\Debug\</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>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>

 

 

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

原文:https://www.cnblogs.com/rh-fernando/p/11855846.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!