Comments
Sort by recent activity
With Windows 10 and .NET 4.6 being out, a small update for SmartAssembly to correctly recognize them in feature usage reporting would be nice [image] / comments
With Windows 10 and .NET 4.6 being out, a small update for SmartAssembly to correctly recognize them in feature usage reporting would be nice
IIRC I had that bug when I used a SQL-server on a different machine, with the address given as
\serverSQLExpress
Instead, the address needs to be
serverSQLExpress
I.e. without the starting \. Since smartassembly is crashing on startup, you'll need to manually change it in the settings file in C:ProgramDataRed GateSmartAssembly. / comments
IIRC I had that bug when I used a SQL-server on a different machine, with the address given as
\serverSQLExpress
Instead, the address needs to be
serverSQLExpress
I.e. without the starting \. Sin...
After lots of updating and testing, I finally figured out the problem: The .NET 2.0 assembly used a different key to sign the assembly, so the MandatoryPath doesn't work.
With the following change I get it to compile: <Assembly AssemblyName="mscorlib, Culture=neutral, PublicKeyToken=b77a5c561934e089" MandatoryPath="C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll" />
<Assembly AssemblyName="mscorlib, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" MandatoryPath="C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll" />
However, I now get the following warning:
One or more of the merged assemblies uses internal members of unmerged assemblies via InternalsVisibleToAttribute. Your assembly may not work.
However, so far I have not noticed any problems. / comments
After lots of updating and testing, I finally figured out the problem: The .NET 2.0 assembly used a different key to sign the assembly, so the MandatoryPath doesn't work.
With the following change ...
nyxling wrote:
IF NOT EXIST "0001_Obfuscate" ( mkdir "0001_Obfuscate" )
IF EXIST "0001_Obfuscate\Assembly-CSharp.dll" ( del "0001_Obfuscate\Assembly-CSharp.dll" )
"C:\Program Files\Red Gate\SmartAssembly 6\SmartAssembly.com" /build "%system.teamcity.build.checkoutDir%/../0001.saproj"
IF EXIST "0001_Obfuscate\Assembly-CSharp.dll" ( copy "0001_Obfuscate\Assembly-CSharp.dll" "0001_Build\0001_Data\Managed\Assembly-CSharp.dll" )
AFAIK the copy command sets the errorlevel as well. So if the SA build fails, but the file was created, it gets copied. If copying succeeded, this will return 0.
So the correction would be:
"C:\Program Files\Red Gate\SmartAssembly 6\SmartAssembly.com" /build "%system.teamcity.build.checkoutDir%/../0001.saproj"
IF ERRORLEVEL 1 EXIT 1
IF EXIST "0001_Obfuscate\Assembly-CSharp.dll" ( copy "0001_Obfuscate\Assembly-CSharp.dll" "0001_Build\0001_Data\Managed\Assembly-CSharp.dll" )
/ comments
nyxling wrote:
IF NOT EXIST "0001_Obfuscate" ( mkdir "0001_Obfuscate" )
IF EXIST "0001_Obfuscate\Assembly-CSharp.dll" ( del "0001_Obfuscate\Assembly-CSharp.dll" )
"C:\Program Fi...
I have over 42000 samap files, of which I only need a couple hundred. With that amount of files, any manual search and delete won't work in any reasonable amount of time.
So please add me to the list of people who could really use such a tool! / comments
I have over 42000 samap files, of which I only need a couple hundred. With that amount of files, any manual search and delete won't work in any reasonable amount of time.
So please add me to the li...
If you are doing your own handling: There is a method SetProxy() on the UnhandledExceptionHandler. / comments
If you are doing your own handling: There is a method SetProxy() on the UnhandledExceptionHandler.
I did a bit of disassembly. When error reporting is added to an assembly, SA does two things:
The code of all methods, constructors and properties is wrapped in a try-catch, which allows getting the local values of variables.
The error handling template code is added.
The error template code is only used in two cases: If the assembly is an application, and if the assembly manually passes an exception to SmartAssembly, using SmartAssembly.ReportException.ExceptionReporting.Report(). So if you have a DLL, and it doesn't manually pass an exception to SA, the code is AFAICT unnecessary.
This (useless) code may or may not result in much bloat of your assembly, since it is fixed in size. On the other hand, since every bit of code you have is wrapped in a try-catch, this will definitely bloat the code, especially if you have many small methods and simple properties. / comments
I did a bit of disassembly. When error reporting is added to an assembly, SA does two things:
The code of all methods, constructors and properties is wrapped in a try-catch, which allows getting t...
williamw wrote:
In your SmartAssembly projects I assume you only turned on usage reporting for that one assembly, and not for the ones that are calling it to do reporting?
Exactly. I have two different SA project files. One has usage and crash reporting on (which I use for only that "core" assembly) and the other one has only crash reporting on (which I use for everything else). / comments
williamw wrote:
In your SmartAssembly projects I assume you only turned on usage reporting for that one assembly, and not for the ones that are calling it to do reporting?
Exactly. I have two ...
I have the same issue in my application.
When applying feature usage reporting to the different assemblies, this results in each assembly being considered a different "version", even if the have the same application name. So even if they belong to the same application, you will see the feature reports being split up. Depending on how you handle asking the user for consent, this can also result in a prompt for each assembly.
The way I solved it was by having a method to report usage in an assembly known by all assemblies, which is wrapper over the actual call to usage reporting. That way, there is only one assembly which gets feature reporting compiled into it, and thus all feature reports for the application appear together. / comments
I have the same issue in my application.
When applying feature usage reporting to the different assemblies, this results in each assembly being considered a different "version", even if the have th...