当前位置:首 页 > 我的日记 >知识库 > 查看文章

Visual Studio 中项目文件属性的Build action 设置

知识库 你是第64个围观者 0条评论 供稿者: 标签:

None: The file is not included in the project output group and is not compiled in the build process. An example is a text file that contains documentation, such as a Readme file.

无,不进行输出和编译。

Compile: The file is compiled into the build output. This setting is used for code files.

编译文件 ,通常为.cs代码文件。

Content: Allows you to retrieve a file (in same dir as assembly) as a stream via Application.GetContentStream( uri ). For this method to work, it needs a AssemblyAssociatedContentFile custom attribute which VS graciously adds when you mark a file as “Content”

生成为内容,需要设置copy to output directory,从相应的程序目录中去读取此文件。

Embedded resource: embeds the file in an exclusive assembly manifest resource.

把文件嵌入到清单资源中,读取方法 http://www.voidcn.com/article/p-ejvpzppk-wn.html

Resource (wpf only): embeds the file in a shared (by all files in the assembly with similar setting) assembly manifest resource named AppName.g.resources.

(仅用于WPF)将文件嵌入到AppName.g.resources中,

Page (wpf only): Used to compile a xaml file into baml. The baml is then embedded with the same technique as Resource (i.e. available as `AppName.g.resources)

(仅用于WPF)将xaml文件编译为baml文件。

ApplicationDefinition (wpf only): Mark the XAML/class file that defines your application. You specify the code-behind with the x:Class=”Namespace.ClassName” and set the startup form/page with StartupUri=”Window1.xaml”

(仅用于WPF)定义应用程序

SplashScreen (wpf only): An image that is marked as SplashScreen is shown automatically when an WPF application loads, and then fades

(仅用于WPF)

DesignData: Compiles xaml viewmodels so that usercontrols can be previewed with sample data in visual studio (uses mock types)

(仅用于WPF) 编译xmal viewmodel,以便能够预览

DesignDataWithDesignTimeCreatableTypes: Compiles xaml viewmodels so that usercontrols can be previewed with sample data in visual studio (uses actual types)

EntityDeploy: (Entity Framework): used to deploy the Entity Framework artifacts

用于Entity Framework

CodeAnalysisDictionary: A xml file containing custom word dictionary for spelling rules

相关链接:

1. Build Action: http://msdn.microsoft.com/en-us/library/aa984472(VS.71).aspx

2. FileName Property: http://msdn.microsoft.com/en-us/library/0c6xyb66(VS.80).aspx

3. Resource File: http://msdn.microsoft.com/en-us/library/cc296240(VS.95).aspx

4. http://stackoverflow.com/questions/145752/what-are-the-various-build-action-settings-in-vs-net-project-properties-and-wha

这家伙很懒,什么都没写!

—— zhaorong

zhaorong
众说纷纭Comments
大眼 可爱 大笑 坏笑 害羞 发怒 折磨 快哭了 大哭 白眼 晕 流汗 困 腼腆 惊讶 憨笑 色 得意 骷髅 囧 睡觉 眨眼 亲亲 疑问 闭嘴 难过 淡定 抗议 鄙视 猪头
小提示:直接粘贴图片到输入框试试
努力发送中...
  • 评论最多
  • 最新评论
  • 随机文章
footer logo
未经许可请勿自行使用、转载、修改、复制、发行、出售、发表或以其它方式利用本网站之内容
Copyright © zhaorong All Rights Reserved. 滇ICP备15006105号-1