File Properties 中的 Build Action

摘要:File Properties 中的 Build Action

File 如 音效檔(.wav) , 圖片檔(.png) 等

屬性 Build Action:

None: 此檔不參與編譯也不被輸出。如:工程中的文檔檔, readme.txt。

Compile: 參與編譯並輸出。主要是代碼檔。

Content:不參與編譯,但會被輸出。 (安裝檔有用到, 但不在專案檔的程式碼中, 如: ABC.jpg)

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框架。