How to use sgen.exe in postbuild events
-
I have to use SGEN on an strongly named assembly that uses XmlSerializer
"sgen.exe" //program that creates a serializer assembly
"$(TargetPath)" //location of the assembly that uses the serilizer
/f //override serializer assembly
/out:"$(TargetDir).." //output location of the serializer dll
/compiler:/keyfile:"d:\new folder\outlookSyncSign.snk" //location of strong name keyThe problem is that if the folder where the strong name key file has spaces the command will be unsuccessful. How can I overcome this without changing the name of the folder where the strong name resides?
-
I have to use SGEN on an strongly named assembly that uses XmlSerializer
"sgen.exe" //program that creates a serializer assembly
"$(TargetPath)" //location of the assembly that uses the serilizer
/f //override serializer assembly
/out:"$(TargetDir).." //output location of the serializer dll
/compiler:/keyfile:"d:\new folder\outlookSyncSign.snk" //location of strong name keyThe problem is that if the folder where the strong name key file has spaces the command will be unsuccessful. How can I overcome this without changing the name of the folder where the strong name resides?
try reating a batch file, then run the batch file from the post build event. You could pass in the target path and the output location if necessary, or just "hard code" them in the batch file...
-
I have to use SGEN on an strongly named assembly that uses XmlSerializer
"sgen.exe" //program that creates a serializer assembly
"$(TargetPath)" //location of the assembly that uses the serilizer
/f //override serializer assembly
/out:"$(TargetDir).." //output location of the serializer dll
/compiler:/keyfile:"d:\new folder\outlookSyncSign.snk" //location of strong name keyThe problem is that if the folder where the strong name key file has spaces the command will be unsuccessful. How can I overcome this without changing the name of the folder where the strong name resides?
-
as you can see in my post, the path is in quotes, it seems, according to this guy that's is a bug in sgen tool here I tried using a batch file but i get the same result
-
try reating a batch file, then run the batch file from the post build event. You could pass in the target path and the output location if necessary, or just "hard code" them in the batch file...
it seems i get the same result using the batch file also, this is what i placed in the batch file "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sgen.exe" "c:\myApp.exe" /f /out:"d:\new folder" /compiler:/keyfile:"d:\new folder\myAppsnk.snk" I found this post And they it's a bug with sgen but i'm not sure i understood the workaround