I have an assembly that provides data to a report.
I have a project with a report that references the assembly.
In the report I set the NeedsDataSource handler to call my assembly to provide the data.
I found that making a change and rebuilding the data assembly does not result in report changes. I was confounded by this because I have a logging mechanism which consistently showed an old version of my code being executed by the Preview functionality. Changes are reflected from the designer. My assembly is called and the log shows the latest version being executed Designer. But Preview always executed the old code.
I did a Clean, then Rebuild. I changed every component to ensure something different was in the object module. I manually deleted the .DLL and .PDB files from the project directories, completely deleted everything under \obj. The rebuild put new files in their place, but Preview always showed the original log data. I closed the solution and re-opened. That didn't help. I changed the assembly reference to Copy Local = False. No joy.
I got another tip that an old assembly was being cached somewhere, because I changed my class.getdata() call in NeedsDataSource to class.getDataNew() and changed the corresponding method in the data assembly. Everything compiled, Intellisense showed it could find the changed method name. But in Preview it said it can't find class.getdata(). Obviously it was holding onto something and not using the code in my report class.
I found that when I completely closed down Visual Studio (2010) and re-opened the report project, that the latest data assembly was being referenced. This confirms there's some caching going on. This could be because the original assembly is reflected-upon and thus stored somewhere, and from then forward it's That assembly which is used rather than the referenced assembly.
It looks like the cache is here:
C:\Users\{user}\AppData\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies
You can't delete the directories in there when VS is running. On build (and use by the Designer) a single directory is created for each project (or each assembly in the project). On rebuild after access from the Designer, another directory is created for rebuilt assemblies. The original assembly is still there and can't be deleted. THAT is what's being referenced.
With the above info I did a search in the forum for ProjectAssemblies and found this thread:
http://www.telerik.com/community/forums/reporting/telerik-reporting/degign-view-error.aspx
So I copied my assembly to C:\Program Files\Telerik\Reporting Q1 2013\Bin, reset the reference there, and saw that version. Rebuilt my assembly, copied it to that location, closed and restarted the designer to get it to refresh. The Designer sees the new assembly, the Preview does not.
I can get by this by constantly restarting Visual Studio, but oh what a pain! Any other remedies?
Thanks!
I have a project with a report that references the assembly.
In the report I set the NeedsDataSource handler to call my assembly to provide the data.
I found that making a change and rebuilding the data assembly does not result in report changes. I was confounded by this because I have a logging mechanism which consistently showed an old version of my code being executed by the Preview functionality. Changes are reflected from the designer. My assembly is called and the log shows the latest version being executed Designer. But Preview always executed the old code.
I did a Clean, then Rebuild. I changed every component to ensure something different was in the object module. I manually deleted the .DLL and .PDB files from the project directories, completely deleted everything under \obj. The rebuild put new files in their place, but Preview always showed the original log data. I closed the solution and re-opened. That didn't help. I changed the assembly reference to Copy Local = False. No joy.
I got another tip that an old assembly was being cached somewhere, because I changed my class.getdata() call in NeedsDataSource to class.getDataNew() and changed the corresponding method in the data assembly. Everything compiled, Intellisense showed it could find the changed method name. But in Preview it said it can't find class.getdata(). Obviously it was holding onto something and not using the code in my report class.
I found that when I completely closed down Visual Studio (2010) and re-opened the report project, that the latest data assembly was being referenced. This confirms there's some caching going on. This could be because the original assembly is reflected-upon and thus stored somewhere, and from then forward it's That assembly which is used rather than the referenced assembly.
It looks like the cache is here:
C:\Users\{user}\AppData\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies
You can't delete the directories in there when VS is running. On build (and use by the Designer) a single directory is created for each project (or each assembly in the project). On rebuild after access from the Designer, another directory is created for rebuilt assemblies. The original assembly is still there and can't be deleted. THAT is what's being referenced.
With the above info I did a search in the forum for ProjectAssemblies and found this thread:
http://www.telerik.com/community/forums/reporting/telerik-reporting/degign-view-error.aspx
So I copied my assembly to C:\Program Files\Telerik\Reporting Q1 2013\Bin, reset the reference there, and saw that version. Rebuilt my assembly, copied it to that location, closed and restarted the designer to get it to refresh. The Designer sees the new assembly, the Preview does not.
I can get by this by constantly restarting Visual Studio, but oh what a pain! Any other remedies?
Thanks!