Comments
Sort by recent activity
If there are no other dependencies you can also use one "generic" project file and use the inputfile/outputfile feature.
Even with dependencies you can add the dependencies of all your assemblies into one project file. / comments
If there are no other dependencies you can also use one "generic" project file and use the inputfile/outputfile feature.
Even with dependencies you can add the dependencies of all your assemblies i...
PS: building without the SA task and protecting after using the GUI works fine. / comments
PS: building without the SA task and protecting after using the GUI works fine.
Solved.
Its a bug in SA. But not in SA 5.0.
The .csproj file was still referencing the build task for SA 4.2 instead of SA 5.0 but the {sa}proj file already contained the updated keyfile password. As it seems, SA 4 does exit without warning before signing the assembly because it cant read the password of the keyfile or something like that.
I tried to repro it here:
* setting the old Password value in the {sa}proj file and building it with the MSBuild task for SA 4.2, works.
* new Password value (as used in SA 5) and building with the task for SA 4.2, deletes the file.
* new password value and build task for SA 5, works too. / comments
Solved.
Its a bug in SA. But not in SA 5.0.
The .csproj file was still referencing the build task for SA 4.2 instead of SA 5.0 but the {sa}proj file already contained the updated keyfile password. ...
Just one more note on the build output: setting it to minimal already produces useful output. Actually more than SA should but still useful. ------ Build started: Project: subproject, Configuration: Release Any CPU ------
SmartAssembly v5.0.0.284
Copyright c Red Gate Software 2005-2010
Loading project X:\solutiondir\project\Build\GeneralAssemblies.{sa}proj
Input=X:\solutiondir\project\subproject\obj\Release\subproject.dll
Output=X:\solutiondir\project\subproject\obj\Release\subproject.dll
Analyzing...
Preparing...
Creating Assembly...
OK
subproject -> X:\solutiondir\project\Executables\Release\subproject.dll
When set to minimal, this is the only output during build time. / comments
Just one more note on the build output: setting it to minimal already produces useful output. Actually more than SA should but still useful.------ Build started: Project: subproject, Configuration:...
As I am not using MSBuild.exe but devenv.exe to build the executables I dont get the error output from SA into the VS error console.
I can try MSBuild but I recently had problems with the configuration of the msbuild process so this may take some time to setup right. / comments
As I am not using MSBuild.exe but devenv.exe to build the executables I dont get the error output from SA into the VS error console.
I can try MSBuild but I recently had problems with the configura...
Thanks Paul, that was a great tip. But makes me wonder why doesn't SA at least log errors by default to the console? Digging through miles of log is not the funniest.
Anyway, solved the problem now, it was really a wrong path to the input assembly (should have been $(ProjectDir)\obj\Release and not $(TargetDir)), SA threw an IOException.
So this makes this workaround somehow usable. Although a <Include> would be much cleaner and logical.
If someone else is interested, this is what the SA output looks like:
Target "AfterCompile: (TargetId:36)" in file "X:\solutionfolder\SmartAssembly.targets" from project "X:\solutionfolder\project\subproject\subproject.csproj" (target "Compile" depends on it):
Task "Copy" (TaskId:17)
Copying file from ".\obj\Release\subproject.dll" to ".\obj\Release\subproject.temp.dll". (TaskId:17)
Done executing task "Copy". (TaskId:17)
Task "SmartAssembly.MSBuild.Tasks.Build" (TaskId:18)
Command: (TaskId:18)
C:\Program Files\Red Gate\SmartAssembly 5\SmartAssembly.com "X:\solutionfolder\project\Build\subproject.{sa}proj" /output=$self (TaskId:18)
The "Build" task is using "SmartAssembly.com" from "C:\Program Files\Red Gate\SmartAssembly 5\SmartAssembly.com". (TaskId:18)
SmartAssembly v5.0.0.284 (TaskId:18)
Copyright c Red Gate Software 2005-2010 (TaskId:18)
Loading project X:\solutionfolder\project\Build\subproject.{sa}proj (TaskId:18)
Output=X:\solutionfolder\project\subproject\obj\Release\subproject.dll (TaskId:18)
Analyzing... (TaskId:18)
Preparing... (TaskId:18)
Creating Assembly... (TaskId:18)
OK (TaskId:18)
Done executing task "SmartAssembly.MSBuild.Tasks.Build". (TaskId:18)
/ comments
Thanks Paul, that was a great tip. But makes me wonder why doesn't SA at least log errors by default to the console? Digging through miles of log is not the funniest.
Anyway, solved the problem now...
Ok, gave it a try but got stuck on an bad error message. ERROR: Some options are not set or are not valid.
Please review all the settings and try again.
The options themselves cant be wrong since they are copied from a 100% working project file. The GUI app asks for an input and output file and builds fine. No errors.
What did I do? Added all the assemblies of all libraries (around 30) which I am going to protect to the project file and call the commandline app with the -input parameter which is one of the assemblies in the project. / comments
Ok, gave it a try but got stuck on an bad error message.ERROR: Some options are not set or are not valid.
Please review all the settings and try again.
The options themselves cant be wrong since th...
Ok, using the -output parameter it works on the commandline. Yet trying to do the same with the build task fails in all combinations. With and without the output parameter, overwrite yes or no, all the same, it fails and I dont get the error message because its a build task and MSBuild shows only that SA exited with error code -1. / comments
Ok, using the -output parameter it works on the commandline. Yet trying to do the same with the build task fails in all combinations. With and without the output parameter, overwrite yes or no, all...
While its a bit like carrying the church around the cross, it might work. Will give it a try. / comments
While its a bit like carrying the church around the cross, it might work. Will give it a try.
I am back to this one but because of another reason. It seems to me that you have changed salt or encoding scheme of the passwords as they are stored in the project files.
When using an SA 4.x project file unaltered with SA 5.0, I am seeing the same error. Removing and adding the same keyfile with the same password solves the situation.
From what I have seen comparing old and new project file, only the password value if different, while having the same password on the keyfile.
If thats the case then you should issue a big no-no when upgrading, otherwise the user will fall into that trap. / comments
I am back to this one but because of another reason. It seems to me that you have changed salt or encoding scheme of the passwords as they are stored in the project files.
When using an SA 4.x proj...