maky 发表于 2011-11-25 21:22:00

Visual Studio 2010 : Build Action详解 [转载]

什么是Build Action? Build Action is how the file relates to the build and deployment processes.
在Visual Studio 2010的Windows Phone工程中, 有多个build action。它们之间有什么区别呢?
http://images.cnblogs.com/cnblogs_com/Tealcwu/WindowsLiveWriter/WindowsPhoneBuildAction_E47F/buildaction_thumb.png
* None: 此文件不参与编译也不被输出。比如:工程中的文档文件, readme.txt。
* Compile: 参与编译并输出。主要是代码文件。
* Content: 不参与编译,但会被输出。
* Embedded Resource: 此文件被嵌入到主工程生成的DLL或exe中。主要是资源文件。
* ApplicationDefinition: 和Page类似,但只用于Silverlight的启动页面(默认是App.xaml)。
* Page: Silverligh中所有的usercontrol/page/childwindow xaml都属于"Page” build,其它的build action不能将code behind文件和xaml文件连接起来。
* CodeAnalysisDictionary: 自定义的CodeAnalysis字典。(参考http://blogs.msdn.com/b/codeanalysis/archive/2007/08/20/new-for-visual-studio-2008-custom-dictionaries.aspx)
* Resource:embeds the file in a shared (by all files in the assembly with similar setting) assembly manifest resource named AppName.g.resources
* SplashScreen: Silverlight的欢迎界面。
* DesignData: Sample data types will be created as faux types. Use this Build Action when the sample data types are not creatable or have read-only properties that you want to defined sample data values for.
* DesignDataWithDesignTimeCreatableTypes: Sample data types will be created using the types defined in the sample data file. Use this Build Action when the sample data types are creatable using their default empty constructor.
* EntityDeploy: 适用于Entity框架。



youlei 发表于 2012-10-14 10:44:22

非常有用,有时候无法自动提示前台变量,但反复确认变量确实存在,这时候就需要看看你的cs 文件是否为编译类型。

yichi0066 发表于 2012-10-29 16:57:15

又看了一次











static/image/common/sigline.gif
好看的爱情电影
页: [1]
查看完整版本: Visual Studio 2010 : Build Action详解 [转载]