Thursday, 15 July 2010

visual studio - How to change the file extension of C# project output included in a VS Setup Project -



visual studio - How to change the file extension of C# project output included in a VS Setup Project -

i have solution in visual studio 2013 many different projects. 1 of them c# screensaver, built windows application (file extension ".exe"). want screensaver packed visual studio setup project. in setup project can include "primary output" of c# project output file packed unchanged msi file. there way alter file extension (it has .scr) either in c# project settings or in setup itself? when alter filename via batch/msbuild order in postbuild event "primary output" setup cant found anymore. unusual thing is: there alternative in setup says "targetname", greyed , cant alter in ide , cant find alternative in project file of setup project. help!

edit 1:

is possible there abolutely no solution renaming output file include in setup??

since found absolutely no solution configure setup renaming file created additional dll installerclass run custom action during install process.

here sample how has similar problems

custom action in visual studio setup projects (code project)

i renamed file in install method , renamed in uninstall method gets deleted properly.

public override void install(idictionary statesaver) { base.install(statesaver); var text = context.parameters["screensaverpath"]; var file = new fileinfo(text + "myscreensaver.exe"); if (!file.exists) return; file.moveto(text + "myscreensaver.scr"); } public override void uninstall(idictionary savedstate) { base.uninstall(savedstate); var text = context.parameters["screensaverpath"]; var file = new fileinfo(text + "myscreensaver.scr"); if (!file.exists) return; file.moveto(text + "myscreensaver.exe"); }

c# visual-studio visual-studio-2013 visual-studio-setup-proje

No comments:

Post a Comment