Guide to setup source code into Visual Studio 2008/2010.

This guide is written to help explain how NB_Store source code can be setup so that it will compile using visual studio 2008. Of course personal preferences may make you wish to setup visual studio differently to this, but the idea here is to give you a basic concept.

The guide is based on source code release v2.03.02.

Step 1 - Using an existing DNN installation, install the Installation module package, NBStorexx.xx.xxInstall.zip, for NBStore. For details on installing a module into DNN refer to the DNN guides.

This will create a directory structure in the DNN installation called “/DesktopModules/NB_Store”

Step 2 – Download the lastest source package from codplex.

Goto http://nbstore.codeplex.com/SourceControl/list/changesets
Select the latest change set. (or the one you require)
Click on the download button.

This will give you a zip file containing the source code.

Step 3 – Unzip the source code into the “/DesktopModules/NB_Store” directory, overwriting the existing files.

Step 4 – Open the NB_Store.sln file with Visual Studio 2008. (If using VS2010 then convert the solution from Visual Studio 2008 to 2010 version.)

Step 5 – Set your DotNetNuke reference to the version 5.2.3 of the DotNetNuke.dll as a minimum. In order to compile your project without warning, the target framework should be .NET Framework 3.5. (MyProject > Compile > Advanced settings). For reasons of backward compatibility the current code has a reference set to version 5.2.3.74 of DNN5.

At this point you should be able to compile NB_Store.

Hints and tips:

I also like to set the copy local option to false, leaving it as true should not cause any issues, but in some circumstances can leave you scratching your head!

Have a look at the compile options for the project, You can either set the build output to the dnn bin directory, or build the output to the NB_Store directory and use the post-Build events to copy the dll to the dnn bin direcotry. Other options to compile and deploy can be done, but I leave that to your personal choice.

Example post-build copy command:
copy "$(TargetFileName)" "..\..\..\bin\$(TargetFileName)"
copy "$(AssemblyName).pdb" "..\..\..\bin\$(AssemblyName).pdb"


Review the other references in the project, to make sure your happy with the reference links.

VS2010 sometimes creates a web.config file for the project, if this is the so, then remove these redundant files.

Debugging

To debug NB_Store you need to attach to the process. To do this, startup you localhost website (which needs to be running a debug version of NB_Store).

1 - Compile NB_Store in Debug mode.
2 - Start up localhost website running NB_Store.
3 - In Visual Studio attach to the process (Tools>Attach to Process)
The process name will be different on different systems. On XP it is usually aspnet_wp.exe; on Windows 7 the process name is w3wp.exe. This may be different depending on your IIS. (The type field in the available processes windows usually always has "T-SQL" at the front of the description).
4 - Set your break points.
5 - Go through the operation on the website, when your break point is hit VS should take control.



Last edited Jun 13, 2012 at 2:07 PM by pieropuglia, version 8

Comments

solomonsrkr Oct 29, 2014 at 12:45 PM 
I Have done as per the step defined above, But I am getting 8 errors.

1. 'NBrightCore' is not declared. It may be inaccessible due to its protection level.
2. 'NBrightCore' is not declared. It may be inaccessible due to its protection level.
3. 'NBrightCore' is not declared. It may be inaccessible due to its protection level.
4. 'RequestParam' is not a member of 'Utils'.
5. The project currently contains references to more than one version of SharpZipLib, a direct reference to version 0.31.0.0 and an indirect reference (through 'DotNetNuke.Common.Utilities.FileSystemUtils.AddToZip') to version 0.81.0.1407. Change the direct reference to use version 0.81.0.1407 (or higher) of SharpZipLib.
6. Type 'Entities.Modules.ISearchable' is not defined.
7. Type 'Entities.Modules.ISearchable' is not defined.
8. Type 'Entities.Modules.ModuleInfo' is not defined.

Please help me to fix the issue.