AssemblyBuilder.CreateEmbeddedResource(BuildProvider, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Allows a build provider to create a resource file to include in the assembly compilation.
public:
System::IO::Stream ^ CreateEmbeddedResource(System::Web::Compilation::BuildProvider ^ buildProvider, System::String ^ name);
public System.IO.Stream CreateEmbeddedResource (System.Web.Compilation.BuildProvider buildProvider, string name);
member this.CreateEmbeddedResource : System.Web.Compilation.BuildProvider * string -> System.IO.Stream
Public Function CreateEmbeddedResource (buildProvider As BuildProvider, name As String) As Stream
Parameters
- buildProvider
- BuildProvider
The build provider generating the resource.
- name
- String
The name of the resource file to be created.
Returns
An open Stream that can be used to write resources, which are included in the assembly compilation.
Exceptions
name
is not a valid file name.
Remarks
After calling the CreateEmbeddedResource method, a BuildProvider object writes the resource file contents using the returned Stream object. For example, the build provider can write the resources using a ResourceWriter object. After writing the resource file, the build provider must use the Close method to close the Stream object and free associated system resources.