Sto incorporare un file binario con i/linkres: argomento compilatore, ma quando provo a caricarlo con:carico Cant risorsa incorporata con GetManifestResourceStream()
System.Reflection.Assembly myAssembly = System.Reflection.Assembly.GetExecutingAssembly();
string[] names = myAssembly.GetManifestResourceNames(); // it is really there by its name "shader.tkb"
Stream myStream = myAssembly.GetManifestResourceStream(names[0]);
questo porta a una
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'shader.tkb' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
--- End of inner exception stack trace ---
at System.Reflection.RuntimeAssembly.GetResource(RuntimeAssembly assembly, String resourceName, UInt64& length, StackCrawlMarkHandle stackMark, Boolean skipSecurityCheck)
at System.Reflection.RuntimeAssembly.GetManifestResourceStream(String name, StackCrawlMark& stackMark, Boolean skipSecurityCheck)
at System.Reflection.RuntimeAssembly.GetManifestResourceStream(String name)
Qual è il problema qui?
annuncio 1) come lo si specifica sulla riga di comando? non ho studio visivo. – clamp
hai dato il campione C#, non sono sicuro di cosa stai provando a fare. –
GetManifestResourceNames() getta luce –