how to develop using cnpxpress tools and … to develop... · web viewthe mohave source for...

34
COLYAR CONSULTING GROUP, INC. How to Develop Using CnpXpress Tools and Processes Everything you [n]ever wanted to know about CnpXpress, and more Perry Nally 8/7/2013 Getting the source, making changes, checking in code, completing the builds and understanding Cruise Control, publishing installers, and adding new clients (as well as a few other things)

Upload: others

Post on 23-Apr-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

Colyar Consulting Group, INC.

How to Develop Using CnpXpress Tools and Processes

Everything you [n]ever wanted to know about CnpXpress, and more

Perry Nally

8/7/2013

Getting the source, making changes, checking in code, completing the builds and understanding Cruise Control, publishing installers, and adding new clients (as well as a few other things)

Page 2: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

Table of ContentsTable of Definitions:....................................................................................................................................2

SVN (Subversion).........................................................................................................................................4

Understanding SVN.................................................................................................................................4

SVN Web UI.............................................................................................................................................4

TortoiseSVN.................................................................................................................................................5

Explanation..............................................................................................................................................5

Where to Download TortoiseSVN............................................................................................................5

CnpXpress Source Code...............................................................................................................................5

How to get the main “trunk” source (main development branch)..........................................................6

Setting Up Local Web Service..................................................................................................................9

Opening the Mohave_20 Project...........................................................................................................10

Anatomy of the Code.................................................................................................................................11

Where Is That Thing I’m Looking For?...................................................................................................11

Overview...............................................................................................................................................11

Bug Fixing for Older Release Version (New Process – Local Builds)...........................................................20

Special Scenarios.......................................................................................................................................20

Ohio Budgets.........................................................................................................................................20

How to Determine the Version of a CnpXpress Web Service.................................................................20

A User Is Getting Some Strange Crystal Reports Error When Running The Summary Report, What Do I Do?........................................................................................................................................................20

Testing.......................................................................................................................................................21

How To Test if a Web Service is Responding Correctly..........................................................................21

How to Debug the Web Service.............................................................................................................22

Understanding CnpXpress Logs.............................................................................................................22

Cruise Control............................................................................................................................................23

CruiseControl.Net Tray Notification (cctray.exe)...................................................................................23

What is it?..............................................................................................................................................23

Where is it?...........................................................................................................................................23

How do you access it?...........................................................................................................................23

Is Cruise Control Good For CCG?...........................................................................................................23

Page 3: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

CnpXpress Version Releases......................................................................................................................23

Where are they?....................................................................................................................................23

How do I control which release is available to the client?.....................................................................23

GOTCHA’s..........................................................................................................................................25

Colorado Mohave Project..........................................................................................................................25

Where is it?...........................................................................................................................................25

How to open Colorado Mohave.............................................................................................................25

How to Make Changes and What to Keep in Mind................................................................................25

Other Tools That I Know About and Use....................................................................................................25

IGen.......................................................................................................................................................25

ReviewDefinitionViewer........................................................................................................................25

SpreadsheetComparison.......................................................................................................................26

Other Possible Resources To Look For Source Code..................................................................................26

Table of Definitions:Shortened Name DefinitionSVN SubversionCC Cruise Control .NetCCTray Cruise Control .Net tray icon and notification serviceCnpXpress The entire build process for the laptop tool from start to finishColorado CnpXpress The Mohave source for applications and a few other things related to

applications that resides in SourceSafe on server9, rather than SVN. This is also an older version of CnpXpress that will only work in Visual Studio 2003, so if you are trying to run it on Windows 7, you either need to remote to a Win XP machine with VS2003 or install “Windows XP Mode” from Microsoft.http://windows.microsoft.com/en-us/windows7/products/features/windows-xp-modeWhich is basically a virtual machine of Windows XP where you still need to install VS2003 and get the Colorado source and CSLA in order to run it. See “Colorado Mohave” later in this doc for more info.

Page 4: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

Build Script The build script that Cruise Control executes to compile and build

EVERYTHING. Located “trunk\CnpXpress64.build”Manual Build Script The custom build script that you will run when you need to manually build

the CnpXpress tool, web service, and database scripts. Located “C:\Projects\Mohave_20\trunk_older_version\CnpXpress64-ManualLocal.build” on my machine. This script is executed by customizing then running: “C:\Projects\Mohave_20\trunk_older_version\BuildInstallers.bat” on my machine.Note I have copied all these items out to \\CCGOPS02\Development\Perry\CNPXPRESS INSTALLERS 2.2

Files needed for manually building CnpXpress

\\CCGOPS02\Development\Perry\Projects\\CCGOPS02\Development\Perry\CNP2000\CNPXPRESS INSTALLERS 2.2Note: the “Projects” folder and the “CNP2000” folder MUST be located locally on your drive at the root of C.

Page 5: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

Note: CnpXpress and the Colorado source code are structured the same, but Colorado source is found in SourceSafe, whereas CnpXpress is in SVN. See the section about Colorado Mohave Project for more details about working in that environment (it’s painful until you get everything set up right, and I walk you through it step by step)

Note: CnpXpress is automatically built each time you check in code to the main trunk with one exception. Se the section regarding Complete CnpXpress Build Process for main line trunk.

SVN (Subversion)Note: You don’t actually install SVN (Subversion) on your machine, but you install a client on your machine (TortoiseSVN). However, you’ll need to understand how it works, similarly to learning how you check-in /check-out code from SourceSafe, TFS, git, etc…

Understanding SVNYou could essentially use the command line to complete all the file management you ever needed when working with SVN, but frankly, there is already a gazillion other things I’m tracking in my head to try to remember the commands for SVN. So I opted to use TortoiseSVN (explanation below). However, you could use any SVN client to get the job done.

The only potential problem I was trying to overcome with this repository is the lack of using the latest SVN version for our projects. We are currently using SVN version 1.3.2 (r19776). The latest (at the time of this writing) is 1.8.0-1 (http://subversion.tigris.org/).

The one potential problem I mentioned above comes into play when you have branched the code at some earlier release, made changes, built the tool, and then you want to merge those changes back into the main trunk (main line source). Because we are using an older version of SVN binaries, the merge function using a newer version of TortoiseSVN cannot get the information that it needs to correctly merge the files. So a solution would be to only use the SVN command line for merging, since only the older set of functions will work, or use an older version of TortoiseSVN, but I have liked using the newer TortoiseSVN client because there are bug fixes and features that you don’t get in the older client.

To get around that issue, I only make minimal changes and I merge back into the trunk based on comparisons of code using WinMerge. Another way I’ve kept it in sync is when I know that the trunk will not change but needs the change as well, I will make the changes in trunk at the same time I’m making changes in the branch.

SVN Web UIYou also have a web version that the Apache web service will display. This service is critical for Cruise Control (CC), because it uses this service to compare the source code of its current checked out version.

Page 6: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

If they are different, CC will get the latest and kick off its build processes. See the Cruise Control section for details about the process.

http://server9:81/svn/mohave_20/

Port 81 on server9 is run by an apache web server.

SVN Program lives on Server9: C:\Program Files\Subversion

The Mohave_20 repository lives on Server9: D:\svn-repos\mohave_20

When starting new development, you may need to add new users to the SVN config module if you cannot checkout code because of invalid credentials. In that case you’d need to add details to the following files on Server9:

D:\svn-repos\mohave_20\conf\passwd

D:\svn-repos\mohave_20\conf\svnserve.conf

But I don’t think we are using user authentication right now. If I remember correctly, the web service is not public facing. Scott can verify that if needed. I know I’ve set other people up with the Mohave source and it may be configured via windows login credentials (because it clearly knows who’s checking in code and I’m creating a release notes file during the build process (build script) that tells you the username, date, and the comments).

TortoiseSVN

ExplanationTortoiseSVN is a program that integrates into your file browser context menu. For instance, when you

TortoiseSVN 1.7.11, Build 23600 - 64 Bit , 2012/12/12 19:08:52

Where to Download TortoiseSVNhttp://tortoisesvn.net/downloads.html

You should be able to just install the latest version available for either 32 or 64 bit machines. This will install a right-click context menu, that will show up when you right click a folder or file in your File Explorer (You’ll be doing this a lot when to check-in code).

CnpXpress Source CodeCnpXpress (at the time of this writing) is developed using Visual Studio 2005. In order to start developing with CnpXpress, you’ll need to do the following:

1. Install TortoiseSVN

Page 7: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

2. Get the “HEAD” or latest version of the code from subversion using the TortoiseSVN tools (called SVN Checkout…”)

3. Get the CSLA source project from SourceSafe on server94. Setup a local web service so you can debug the code properly.

Each of the following sections describes the steps you’ll need to take for the items listed above.

How to get the main “trunk” source (main development branch)The main line of development is called “trunk”. This main line has been branched a few times, but I typically merge the branches back in. TortoiseSVN has helpful graphs to see when things have been branched and merged.

This helps you to determine if you need to switch to an existing branch and continue dev on that branch, or if you need to branch at a certain version, and start a new branch for dev.

To get any branch in SVN using TortoiseSVN follow the current steps:

1. Navigate to or create the local directory “C:\Projects\Mohave_20\trunk”2. Right-click the trunk directory3. Choose “SVN Checkout…”

Page 8: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

4. In the Checkout dialog enter the following:a. URL: http://server9:81/svn/mohave_20b. Checkout directory: C:\Projects\Mohave_20\trunkc. Checkout Depth: Fully recursived. Revision: HEAD revision (radio button)

Page 9: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

e. Press the OK button to get the source. This will take about 20 to 30 minutes.f. Now create a new directory at the following location: C:\Projects\CSLAg. Open up SourceSafe on Server9 and navigate to the CSLA directory.

h. Set the working directory of CSLA to your C:\Projects\CSLA directory.i. Right-click on the CSLA project in SourceSafe and select “Get Latest Version…”, and

make sure you get recursive and build folder structure.5. You are now ready to open the Mohave_20 project.

Page 10: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

Setting Up Local Web ServiceYou must setup a local web service in order to run and debug the web service.

Follow these steps to create it:

1. Open IIS on your local machine2. Navigate to “Default Web Site” directory3. Right-click “Default Web Site” and choses “Add Application”

4. Enter the following:a. Alias: “mohavewebsite20” (all lowercase and no spaces)b. Application pool: “Classic .NET AppPool”

i. This must be .Net 2.0 unless the time comes to you are upgrading this project to 4.0, then this should be something else, like 4.0. But I don’t recommend upgrading to 4.5 until all the other .Net websites get upgraded at the same time.

c. Physical path: C:\Projects\Mohave_20\trunk\src\CnpXpressWebSite

d. Press OK.e. There are steps to test if the web service is responding, see “How to test if a web service

is responding correctly”

Page 11: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

NOTE!!!! If you want to branch the code to work on an older version, in order to test the software through a debuggable web service, you must also create a virtual application for that branch, if you are creating a new folder like:

“C:\Projects\Mohave_20\trunk_older_version\src\CnpXpressWebSite” Where older version could be anything.

You’d then follow the same steps as below, but you’d create your virtual application pointing at the above directory instead of:

“C:\Projects\Mohave_20\trunk\src\CnpXpressWebSite”

But there are steps and scenarios in the Bug Fixing for Older Release Version (New Process – Local Builds) to help you through it.

Opening the Mohave_20 Project1. Open Visual Studio 2005 (must be 2005) – You have to open it in Admin mode if you are running

this on Windows 7.2. Choose open existing solution3. Navigate to “C:\Projects\Mohave_20\trunk\src” directory4. Open the “Mohave.sln” file

Page 12: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

Anatomy of the Code

Where Is That Thing I’m Looking For?Many times you will be looking for some obscure part of code that for some reason you cannot find. The following section attempts to help you in these cases to save you time.

OverviewHere are the main sections of the code:

1. Solution Itemsa. The items with blue arrow are the most important.

i. CnpXpress64.build – This is the main build script.1. You will edit this script when you need to:

a. Only build for a particular client or all (takes about 1 hour)b. When you want to add a new client to the list of buildsc. When you need to update the URL of a particular build to point

to a different location (Say a state changes their UAT URL and you now have to point the laptop tool to a new URL)

d. When you want to add additional automated processes to the build.

2. This script is used in multiple ways. There are different sections that rely on the execution of other sections. These sections are labeled like <target name="compile" depends="get-svn-revision, update-assembly-info" description="Compiles using the AutomatedDebug Configuration"> ... stuff ... </target>

a. This script have a name, depends, and description tags.i. Name: the identifier that can be called using MS Build

command. These also get called from Cruise Control via the light.exe application. It has instructions that will call the “clean” section, then “compile” then “BuildInstallers” section, etc.

ii. Depends: will run sections listed in order they are listed before executing the instructions inside the current section. Make sure there are no circular references.

iii. Description: no real use that I know of other than info.3. Note: I have a customized version of this script that I run from a batch

file when I want to build an older version of the code and db scripts. I use this version when I’ve branched the code and need to build it on my local machine.

a. \\ccgops02\Development\Perry\Projects\Mohave_20\ CnpXpress64-ManualLocal.build

Page 13: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

b. You’ll also need BuildInstallers.bat to kick off the build script. But you need to set up the other dependencies first in order to run this locally. See How to Build a Branch Locally (without Cruise Control) for more information.

ii. WinFormsSetup.wxs

b.2. Helpers

a. These are things to make the code easier to deal with. i. FogBugzUtil: is used to automatically create a FogBugz incident and assign it to

you when an error occurs from a user. This is nice because it sends the whole current log file, and can be manually invoked by the user through the Help menu if you need them to send you the log file anyway. Note: the logs are in a rolling log file. So if the user got an error 2 weeks ago, then you tell them to press “Help” >> “Submit Log”, you most likely won’t get the error because the old error is probably archived and a new file is used to record the logs. The logs get archived when they reach a certain file size (I think). But you can have them locate all the logs and send them for parsing. I’ve tried to enhance the log files to really be explicit on what the user is doing so they can be somewhat long. See Understanding CnpXpress Logs for more info.

b.3. Database Scripts for clients still using the legacy db model (I call it “1.0.0”)

Page 14: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

a. The Database folder is pretty similar to the Database_CNP folder in terms of layout, but it is used to customize the script for clients using the old database structure. Because of this, any changes do to scripts in one section, it’s a good idea to make the same changes in the other sections, so you won’t have to worry about things missing when it comes to deploy to multiple clients using the same build version.

4. Database scripts for current db model (I call it “2.0.0”)a. This section is for the current list of clients on the current database model. b. When searching for references for the flag that determines which model we are working

with use this term: ConfigurationManager.AppSettings["DBModelVersion"] == "2.0.0"c. The folders marked with the red are all the high level folders for each type of scripts.

The biggest set of scripts being the “Reviews” folder. This list is arbitrary, meaning, you could if you wanted to, add new folders, but you’d need to update the corresponding subsystems.txt file with that new folder.

d. The folders marked with blue are the Subsystem files. These are the files that identify for each state what database folders should be included in the build process when gathering the scripts for that state. For instance, most states don’t have compliance do anything with Applications, but compliance does need to read data from the applications and claims, so there are general and custom scripts that read data.

e.f. Here is an example of the contents of the AdminReviewCNPSubsystems.txt file:

Page 15: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

i.ii. The order in which the folders are listed in the Subsystem files is also important.

iii. The “Version” folder really only has one script that gets executed first to output to the database installer log, what version the database is at prior to executing all the scripts. Then at the end of the installer, the version is updated via the vbscript running the scripts. See Understanding How Database Updates Are Performed for more information.

g. Furthermore, the contents of each of the folders is shown in the following image and is important to understand:

Page 16: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

i.ii. Opening up the “Reviews” folder shows that there are the following folders. I’ll

explain each one in depth:1. Custom (indicated with a red star in the image above)

a. This folder can, but does not have to, contain the same folders that are listed below (Data, Procedures, etc.) or more. However, the names of these folders are important to the database installer vbscript (found here: [C:\Projects\Mohave_20\trunk\tools\DatabaseSetup\CcgDbSetup.vbs]). This vbscript basically processes each folder in this order:

Page 17: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

' Pre-defined database script folders (in the order of their execution)Const FOLDER_FIRST = "First"Const FOLDER_TABLES = "Tables"Const FOLDER_UPDATES = "Updates"Const FOLDER_TRIGGERS = "Triggers"Const FOLDER_VIEWS = "Views"Const FOLDER_FUNCTIONS = "Functions"Const FOLDER_PROCEDURES = "Procedures"Const FOLDER_DATA = "Data"Const FOLDER_LAST = "Last"

b. Notice in the image above that this folder has the names of each of the clients (with “CNP” at the end). Each one of the state specific folders can have the same folder structure as the general structure (the general structure is the set of folders not inside the custom folder [highlighted with the blue bracket and star in the image above]). They can also have more folders, but only the list of folders listed above will be processed.

c. Also note, The “CNP” is missing from the other Database folder custom scripts, this is to differentiate the folders at build time since they all get compiled together.

d. There is typically no “First”, “Triggers”, “Functions”, or “Last” folders, but they are valid and will be processed if you want to create them.

e. Finally, there may or may not be inside each general and/or custom folder a set of actual scripts along with a “Files.txt” file. The “Files.txt” file contains a list of scripts that will be executed and the order in which those scripts are executed. If there is not “Files.txt” file in the custom folder, then there may be one in the general folder, but on occasion, the order really does not matter, which is also fine.

f. During the build process, all the general files according to the Subsystem get copied to the database install file structure. Then all the custom files get copied (overwriting existing general files as needed) to the database install file structure, including the “Files.txt” files.

2. Data (in the blue bracketed section in the image above)a. This folder holds all the general database scripts related to the

data. In this folder are the review definitions and any data that needs to be added after a schema change. This folder runs last of all the folders listed above. These scripts will get overwritten by a script of the same name from the custom “data” folder.

Page 18: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

3. Procedures (in the blue bracketed section in the image above)a. This folder holds all the general database scripts related to the

stored procedures. These scripts will get overwritten by a script of the same name from the custom “procedures” folder.

b. Note: there are some functions and view scripts that are in the “Procedures” folder. I’ve not be super strict about keeping all types separate, but it’s only a very small number in this case.

4. Tables (in the blue bracketed section in the image above)a. This folder holds all the general database scripts related to the

default schema architecture. These scripts will get overwritten by a script of the same name from the custom “tables” folder. And new table creates should be added to the Reviews.sql file (there are sections for tables and foreign keys).

5. Updates (in the blue bracketed section in the image above)a. This folder holds all the general database scripts related to the

schema changes (modifications to the default schema). These scripts will get overwritten by a script of the same name from the custom “updates” folder. I typically put the column additions and drops in the Reviews.sql file in this folder and I add the column to the “Tables\Reviews.sql” file in the appropriate table create section. So if the table does not exist, then it will create it with the columns in the correct order, but it is does already exist, then the column will be added in the correct order.

6. Useful Scripts (in the blue bracketed section in the image above)a. This is an example of a folder that does not get executed. I

added this folder to hold useful scripts that were not yet integrated into the review build process at the time. I have since integrated most of those scripts or no longer need them now, but I’ve never cleaned this directory up. However, anything you put in the directory will have no effect upon the build process. Feel free to add whatever you like. It will get checked in and CC will attempt to build a new version because the source will be different now, but nothing will change as a result of the new version if all you’ve done it checked in a new script in this folder.

7. Views (in the blue bracketed section in the image above)a. This folder holds all the general database scripts related to the

views. These scripts will get overwritten by a script of the same name from the custom “views” folder.

h.5. Framework Classes

Page 19: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

a.b. These are all the underlying classes that both the web and the laptop get. If you change

any data schema in the database, you’ll need to make sure you not only update the scripts for it, but also add/remove the corresponding variables and methods for that column in the Framework class. The general rule (with only a few exceptions) is that the framework class models the whole data table. There are some cases where the framework class is a mix of two tables, or the framework class does not need and will never need all the columns of a database table, but generally I’ve used the whole table as the class model and what elements it should contain. But that is really because in the past the CnpXpress tool was still a moving target, and I didn’t know what data was needed in the next iteration of change. It is very inconvenient to have an administrator user uninstall and install the new laptop tool each time we upgrade for them. It has been more convenient for the customer for us to modify the stored proc. For this reason alone, porting the ability to install the laptop tool as a non-administrator windows user, like CRE does, would make a lot of users very, very happy.

c. You’ll be working mostly in the “Framework.Reviews” section most of the time.d. Note: many of these sections are no longer used by the laptop tool. However, there are

special web builds that do require these sections. These are things that Nate A knows about, for instance, Budgets, Scheduling, and Data view in the website, etc. The old Colorado Mohave project was at one time included in this build, but was split off and now resides in SourceSafe on Server9 under “$Colorado\Colorado”. Budgets is the same, the source lives in source safe but I’m not exactly sure where. I think it is on Server9 under “$Ohio\Ohio_Budgets”. See Colorado Mohave for more information.

e. The Framework.TrainingRegistration started from this project, but lives somewhere else now. I think there is a Source Safe “TrainingRegistration” project somewhere.

6. Unit Tests

Page 20: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

a.b. Unit tests are currently not being run. I don’t really have a good reason for not using

the unit tests. However, I do believe that there would be a lot less headaches and bugs if you were to start using them to some degree. The problem or difficulty that you’d need to overcome is this: In order to be completely valid unit tests, the tests would have to span across testing against all the different client databases. This would require the maintaining of copies of valid and current databases, which in and of itself could be a full-time job. So the unit tests can only really test your creation of class objects and cannot rely on the data in those objects.

c.d. The above image shows the sections included in the unit tests.e. The file CnpXpress64.build is the build file that you will

7. Web

Page 21: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

a.b. Web site files and framework

8. Windows Forms

a.b. All the folders used for the win forms application (these do rely on the frame work files)

Bug Fixing for Older Release Version (New Process – Local Builds)http://ccg.snpweb.com/installers/Videos/indexAdmin.asp

Special Scenarios

Ohio BudgetsSee Nate Aughe

How to Determine the Version of a CnpXpress Web Service Use the dll “product version” on the web service under CnpXpress/bin folder to figure out which

version is deployed to the web service. Use this query to find out which version has been deployed to a database:

o SELECT dbo.fn_GetVersion()

Page 22: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

Use the laptop tool “Help” >> ”View Log” to determine where the laptop tool is pointing and it also displays the version of the web service and the database.

A User Is Getting Some Strange Crystal Reports Error When Running The Summary Report, What Do I Do?Make sure they install the appropriate CRRedist2005 installer:

A machine can only have one of the installers installed. If they install the other one, then uninstall both, and then install the appropriate one again.

Testing

How To Test if a Web Service is Responding CorrectlyAppend the following text on to the base URL of any of our websites that are running CnpXpress:

“/CnpXpress/dataportal.rem?wsdl”

For instance:

http://ccgdevweb/AdminReviewVBDotNet/CnpXpress/dataportal.rem?wsdl

Page 23: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

If you get this back as a response, then you are good. If not, then read the error message and make sure the web service is running and that it is using .Net 2.0:

How to Debug the Web ServiceYou must attach to the w3wp.exe service while running the project. Once you run the project, click, “Debug” menu item, then “Attach to Process…”, then search for “w3wp.exe” (You have to check the box that says “Show processes from all sessions”). Then any break point you set in the SqlDataProvider_Fetch(), etc… methods in your classes will work. At that point you are debugging the web service.

Note: You must follow the steps to create your local webservice in IIS in order to debug the service using this method. I don’t know any other way to do it. If you can figure it out, I’ll give you a Nobel Prize.

Understanding CnpXpress LogsThe CnpXpress tool is designed to log what the user is doing to a certain extent. The log files show user activity and it is appended at the bottom of the log file. When a log file reaches a certain physical size on disk, it archives that log file and creates a new one. Often the error messages on download, will not show until the OK button is pressed on the error popup. (just find that message box and reverse the order to fix that.) You should be able to see an error message and the class file name and line number where the error happened. If the error happened on the web service, then you may not be able to see the details of it until you run the scenario local.

Page 24: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

Cruise Control

CruiseControl.Net Tray Notification (cctray.exe)

What is it?Scott can tell you. ;)

Where is it?Scott can tell you. ;)

How do you access it?Scott can tell you. ;)

Is Cruise Control Good For CCG?

CnpXpress Version Releases

Where are they?Each time the code gets checked in and CC builds a new version of the laptop tool, it is automatically placed at the following physical location:

\\ccgtestweb\wwwroot\installers

This location is actually a website that you can get at from this page:

http://ccg.snpweb.com/installers/statelist.asp

I have put up a few tutorials and a link to the “Review Definition Viewer” tool so you can generate the definitions of any state in the form of an Excel spreadsheet (you generate it in the tool then, export it to Excel). These spreadsheets were typically used as a means of having the states identify changes they want. The changed Excel doc can then be used with the review builder to suck the data back in from the spreadsheet by parts. See Review Definition Viewer for more details.

How do I control which release is available to the client?I’ve tried to make my job easier when it comes to controlling which release is made available to whom. So I create a website that allows anyone to control it. Obviously the client should never have access to this page, but rather they get access to the installer page.

Page 25: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

The above web page is located here: http://ccg.snpweb.com/installers/statelist.asp

This page allows you to increment or decrement the version available to the client for each build (Test, UAT, PROD, etc.) with the exception of DEV. Dev is auto-magically incremented based on the Cruise Control build process and which state(s) you are sending through the build process identified in the build script. But it is still easy enough to change any version available, including dev:

Take for instance the Admin Review section. Say you want to increment the Demo version to 644. And it’s on 643 currently. You’d simply open this webpage I your browser (accessible through the CCG DEV Page) and click one time on the plus sign (+) next to the 643. If you want to decrement the number you’d click on the negative sign.

However, for the Dev version, you need to go to the following location:

\\ccgtestweb\wwwroot\installers

Note that all the folders are labeled according to their State abbreviation except for the Admin Review, which is under the (ZZ) folder.

Navigate to \\ccgtestweb\wwwroot\installers\ZZ\CnpXpress\Help and open the file “revision.txt”.

All there is in that file is the version of the release. You type in whatever you want the version number to be (for instance, 644). Save the file, and whallah, Dev is now set to version 644 in the Admin Review installer page as well as the statelist page, shown above. Just note, that the next time CnpXpress is built, the “revision.txt” file will be over written with the latest released version.

Page 26: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

GOTCHA’sSomething that will be a pain that I just didn’t figure out a way to automate, is that you may be making changes for a specific client laptop tool (say it’s Ohio you just checked in code for version 645), but someone needs to make changes to the review definition in Iowa. But Iowa is still on version 578. However that’s not what the Dev version in Iowa says… The Dev version is set to 664, but the other versions are set to 578. So you’d change the Dev version to 578. You’d also want to verify that the web service for Dev has version 578 in the dlls as well if you are keeping the Dev web service in sync with your releases. See How to Determine the Version of a CnpXpress Web Service for more info.

NOTE: PEOPLE SHOULD NEVER, EVER, EVER, EVER, EVER, NEVER-EVER-EVER, TRIPPLE-FEETDOG-EVER… MAKE CHANGES TO REVIEW DEFINITIONS IN ANY ENVIRONMENT OTHER THAN DEV… (but they still do) So see Working with Review Definitions for more information.) This is because if you are making definitions changes in Dev while someone else is making changes in Test, when it comes time to generate the definitions to push out to TEST, UAT, and PROD, which do you take? One of them is going to lose their changes. And to that, I say, too bad, you know you should have been making changes in DEV, please redo them in DEV. Follow the process given in the link above.

Colorado Mohave Project

Where is it?Source Safe on Server9, under Colorado. Get the whole Source. If you have trouble. Then you’ll need to go to my old CCG087 machine (the WinXP version) and compare/copy the directory “C:\Projects\CO_vss\Colorado” and use that. But I’m pretty sure I’ve checked in the whole source so it should work fine.

How to open Colorado MohaveJust open the Colorado.sln in VS2003, that is why I have it on my WinXP machine

How to Make Changes and What to Keep in MindNote: Kris knows all about Colorado Mohave

Other Tools That I Know About and Use

IGen Source code is in Source Safe on “server9\IGen”.

ReviewDefinitionViewerSource code is in Source Safe on “vssdata_dotnet on server9\ReviewDefinitionViewer”.

Page 27: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

You can install the tool from here:

http://ccg.snpweb.com/installers/statelist.asp

SpreadsheetComparisonHas potential to be a huge help to testers because it can compare the output of ReviewDefinitionViewer and compare and highlight differences in each spreadsheet. There is not a free tool out there that will do this very effectively.

Source code lives: \\ccgops02\Development\Perry\Projects\SpreadsheetComparison

Other Possible Resources To Look For Source CodeI have copied the 3 dev folders ([C:\Dev], [C:\Developing], and [C:\Development]) I’ve been using for things like IGen and other projects to the following location:

\\ccgops02\Development\Perry\OtherResources

[C:\Dev] contains some very, very old projects, one of which was for Jeff’s brother and listed under the folder “TAAD”

Page 28: How to Develop Using CnpXpress Tools and … to Develop... · Web viewThe Mohave source for applications and a few other things related to applications that resides in SourceSafe

[C:\Developing] contains older projects as well, IGen used to be under development under this directory but I’ve since moved development of IGen to my [C:\Projects\IGen] folder. Other than the ZipUtility, you probably don’t need anything else I this directory. The ZipUtility is the library integrated into CnpXpress to make the “Backup Utility” menu item work. I don’t know if I integrated the code, or just the library dlls into CnpXpress or not, but either way, it can from the C:\Developing\ZipUtility] project.

[C:\Development] contains some reference of old projects as well, of which you probably don’t need, ever.

However, these resources live on the laptop machine I use “CCG-9J707N1”, so any code or other items may be searched for on that machine.

Anything useful will most likely live in my [C:\Projects] folder. This includes IGEN (also found in SourceSafe on Server9) and ReviewDefinitionViewer (also found in SourceSafe on Server9).