Comments
Sort by recent activity
Yes the second option (obfuscate both class and method names) in the GUI has exactly the same effect as adding the [DoNotObfuscateType()].
You only need to add the DoNotObfuscateType attribute to the interface, in fact the compiler will give an error if you add it to a method...
As long as the interface type and methods are visible, the references are there, the assembly full name (i.e. name + cutlure + public key token) and the files are all local there shouldn't be any problems.
If all of the above is true, the only other thing I can think is to try compiling the plugin against the obfuscated main assembly. It isn't the recommended way but the compiler might give a more helpful error message.
Ben1628 wrote:
Method 'soso" in type 'abc' from assembly 'abc .... publickeytoken=... ' does not have an implemention.
abc is the plugin (not obfuscatged yet), I don't know why it is referred to as type,...
I'm as confused as you why abc is referred to as a type. / comments
Yes the second option (obfuscate both class and method names) in the GUI has exactly the same effect as adding the [DoNotObfuscateType()].
You only need to add the DoNotObfuscateType attribute to t...
Does it tell you what type it is failing to load?
If not:
If you turn on the Self Diagnosis feature (on the Build Succeeded page of the SmartAssembly UI) or, if you are testing on a different machine to the one with SmartAssembly on, turn on the Automated Error Reporting.
When the error occurs you will then get an error report which will tell you the unobfuscated name of the type which is causing issues.
Is the type defined in the main assembly and then used by the plugin?
How is the type being created/used in the plugin?
The mostly likely cause is that the type is mistakenly being obfuscated or pruned (this can occur if the type is defined in an exe or is only being called by reflection).
If you open up the SmartAssembly project for the assembly that contains the type.
If you are applying pruning to your assembly, then under the Pruning section next to the name of the assembly there will be an "Exclusions..." link. If you click on this link and then navigate through the namespace to find the type
If the type is described as being a "Fully useful class" or is only listing a few members or attributes to prune then that is good and SmartAssembly has correctly identified it as being used. If it is described as a "Prunable Class" click the "Exclude from Pruning" button in the middle of the page. This will tell SmartAssembly not to prune the type.
If you are applying obfuscation to your assembly, then under the Obfuscation section next to the name of the assembly there will be an "Exclusions..." link. If you follow the same procedure as I described for the pruning to make sure that it is not obfuscating the name of the typel. / comments
Does it tell you what type it is failing to load?
If not:
If you turn on the Self Diagnosis feature (on the Build Succeeded page of the SmartAssembly UI) or, if you are testing on a different mach...
That is a interesting bug, glad you managed to get to the bottom of it.
I presume you are setting output to self.
SmartAssembly will delete the output file if it exists and then write out the new file. The signing is part of the write out step (rather than being a post build step) and as you've found if it can't open the strong name key because of a password decryption failure it will stop, leaving no file.
The failure should return a error code, I'll have a look into it and raise a bug if this is not the case. / comments
That is a interesting bug, glad you managed to get to the bottom of it.
I presume you are setting output to self.
SmartAssembly will delete the output file if it exists and then write out the new f...
That is the annoying thing with MSBuild (and devenv.exe which is a wrapper around it), it redirects the console output to the logger and the default settings for the default logger are for a very quiet output.
Glad you managed to find the problem.
I'll log a feature request for the <Include ...> structure / comments
That is the annoying thing with MSBuild (and devenv.exe which is a wrapper around it), it redirects the console output to the logger and the default settings for the default logger are for a very q...
OK, if you go into Visual Studio (which ever edition you are building under) and under the "Tools" menu select "Options".
Under the "Projects and Solutions" section choose "Build and Run". You can then set the "MSBuild project build output verbosity" to one of the high settings.
There is a registry setting to do the same (e.g. if you can't run the IDE) HKCU\Software\Microsoft\VisualStudio\9.0\General
DWORD key "MSBuildLoggerVerbosity" with data "4" (diagnostic) or "3" (detailed), but usual warnings about editing your registry.
If you are building using the IDE version you will get all the detail straight-away. If you are using the command line version you should add the switch
/out <log file name>
to view the information (N.B. this is an append only log and with diagnostic will get quite big very quickly so turn off logging and reduce the verbosity as soon as you sort out the problem). / comments
OK, if you go into Visual Studio (which ever edition you are building under) and under the "Tools" menu select "Options".
Under the "Projects and Solutions" section choose "Build and Run". You can ...
Do you use a logger with MSBuild (e.g. http://msdn.microsoft.com/en-us/library/ms171470%28VS.80%29.aspx)?
The SmartAssembly.MSBuild.Task is configured to log errors and the errors from the actual build process will be sent to the log, although you may need to set the verbosity level to normal or detailed.
My guess if it works fine with the standalone command line, then it is a permissions or relative path issue. / comments
Do you use a logger with MSBuild (e.g. http://msdn.microsoft.com/en-us/library/ms171470%28VS.80%29.aspx)?
The SmartAssembly.MSBuild.Task is configured to log errors and the errors from the actual b...
Are you specifying an -output parameter as well? / comments
Are you specifying an -output parameter as well?
The full list of things which will give that error:
It can not find the main assembly as specified by the -input parameter or if -input is not given, the one in the project file. (The input parameter should either be an absolute path or a path relative to the project file name. Note it is not relative to the current working directory)
There is not a destination file name specified, either by the -output parameter or by the project file.
If you have asked to sign you assembly with a strong named key and the strong name key file does not exist.
If you are using the Automatic Error Reporting feature with a custom reporting template and it can not find the template specified or it is invalid.
If the project file specifies that one or more assemblies should be merged, but are not referenced by the main assembly.
My guess is either the second or the last are the problem.
Yes it would be better if SA actually told you what part of the configuration it was having problems with. / comments
The full list of things which will give that error:
It can not find the main assembly as specified by the -input parameter or if -input is not given, the one in the project file. (The input parame...
Nice idea.
You can add extra global search paths when you get prompted for missing references, although these are global for all SmartAssembly projects rather than just for the current project. / comments
Nice idea.
You can add extra global search paths when you get prompted for missing references, although these are global for all SmartAssembly projects rather than just for the current project.
Thanks for the feedback, I've raised an issues SA-297. / comments
Thanks for the feedback, I've raised an issues SA-297.