HV-Lima Peru

Offshore your .NET/SQL Development to Latin America! Languages: en-de-es

How to debug custom .NET Assembly in SSRS, using a single Instance of Visual Studio?

Create a new report project using Visual Studio.
1. At the time you create a report project, Visual Studio also creates a solution to contain it.
2. Add a new Class Library project to the existing solution. Make sure that the report project is set as the startup project.

3. How2 call functions in your Class Library, see here
4. In Solution Explorer, select the solution.
5. On the Project menu, click Properties

6. The Solution Property Pages dialog box opens.
7. In the left pane, expand Common Properties if necessary, and click Project Dependencies. Select the report project from the Project drop-down list. Select your assembly project in the Depends On list.

8. Click OK to save the changes, and close the Property Pages dialog.
9. In Solution Explorer, select your custom assembly project.
10. On the Project menu, click Properties.
11. The Project Property Pages dialog box opens.
12. In the left pane, expand Configuration Properties, and click Build if you’re in a C# project or Compile if you’re in a Visual Basic project.
13. On the Build/Compile page, enter the path to the Report Designer folder. By default, this is C:\Program Files\Microsoft SQL Server. Server\90\Tools\Binn\VSShell\Common7\IDE) in the Output Path text box. This builds and deploys an updated version of your custom assembly directly to Report Designer before your report is executed.

14. Disable Deploy in the DebugLocal Config in Configuration Manager
15. Set the Active Solution Configuration to DebugLocal.

16. Once you have designed your report and developed your custom assembly, set breakpoints in your custom assembly code.
17. Run the report under DebugLocal mode by pressing the F5 key. When the report executes in the pop-up preview window, the debugger hits any breakpoints that correspond to executable code in your assembly. Use F11 to step through your custom assembly code.
18. Special Hack: The moment you decide to make the next Build (inside to the VS2005’s private assemblies directory), this will not function, because the assembly is hold open by VS. Instead of shutting down/reopening VS, act smarter: rename your DLL (rename works, delete not).


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: