views:

191

answers:

2

Q1:

  1. Does aspnet_compiler.exe compile into assembly(ies) all files contained inside the website directory, even JPG, DOC, and PDF types?

  2. If you add images to the list of files (thus add them to the project file) in your web project, will these images also get compiled by VS into assembly?

Q2:

When aspnet_compiler.exe compiles application into assembly(ies), it also compiles resources and web references.

  1. I’m not sure I understand what is meant by “Web references being compiled”. What kind of Web references is the text talking about?
  2. Text also mentions that Resources too get compiled. Which files are considered a resource? Just non-ASP.Net files, such as JPG, DOC etc?

thanx


EDIT:


However, I must ask, why do you want to have these files embedded in an assembly in the first place? Maybe you're not going in the right direction..

I don't plan to embed files in an assembly, but I wasn't sure whether or not this happens automatically when Asp.Net compiles a WebSite or WebProject


Anyways, thank you both for your help

+2  A: 

1A: No, content files can only be added to the generatad assembly if you specify "Embedd resource" as compile action on them

1B : The same as 1A

2 : A file must be marked as "Embedded resource" to get compiled into the assembly.

However, I must ask, why do you want to have these files embedded in an assembly in the first place? Maybe you're not going in the right direction..

Andrei Rinea
+2  A: 

Q1

A) No, they keep their filename and are outside of the assembly.

B) No, they keep their filename and are outside of the assembly.

Q2

A) Web References refer to web services that are referenced to in your project. When you add a Web Reference, a proxy is generated to handle the communicatino with the service. That proxy needs to be compiled with your project (the proxy is auto-generated so you don't need to worry about it).

B) Resource files are *.resx included in your project. The most common use for resource files in a web application is internationlization. Those files do get compiled into your application.

Justin Niessner