Differences
This shows you the differences between the selected revisions of the page.
2018-04-12 | 2018-04-12 | ||
nuget cannot be used to embed executable (martin) | code shortening for new design (martin) | ||
Line 108: | Line 108: | ||
// Extract the resource to the temporary file | // Extract the resource to the temporary file | ||
Assembly executingAssembly = Assembly.GetExecutingAssembly(); | Assembly executingAssembly = Assembly.GetExecutingAssembly(); | ||
- | string resourceName = executingAssembly.GetName().Name + "." + "WinSCP.exe"; | + | string resName = executingAssembly.GetName().Name + "." + "WinSCP.exe"; |
- | using (Stream resource = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)) | + | using (Stream resource = Assembly.GetExecutingAssembly().GetManifestResourceStream(resName)) |
using (Stream file = new FileStream(executablePath, FileMode.Create, FileAccess.Write)) | using (Stream file = new FileStream(executablePath, FileMode.Create, FileAccess.Write)) | ||
{ | { |