Search code examples
sqlvisual-studio-2008installationembedded-resource

Convert a sql file to an embedded resource programatically


Does anyone know how to convert a .sql (scripts file) VS2008 to an embedded resource at runtime to be used in the Customs actions editor for install of database.


Solution

  • In Visual Studio solution explorer right click the file, and pick properties... then set the build property to EmbeddedResource. Your installer component should then be able to read the Stream using the GetManifestResourceStream method of your assembly.