Takes you through the steps required to set up the OOSqlBookWCF Visual Studio solution used in this tutorial.
Create the OOSqlBookWCF solution and project
- In Visual Studio, click
.
- On the
Create a new project dialog box, scroll down the list, and select
WCF Service Library (.NET Framework), and then click
Next.
- Complete the fields as follows:
Project name
|
OOSqlBookWCF
|
Location
|
c:\tutorials\SQL
|
Framework
|
Choose the appropriate .NET Framework version from the drop-down list.
Note: Must be version 4.5 or later.
|
- Check
Place solution and project in the same directory.
- Click
Create.
Add existing projects
We provide the
OOSqlBookWrapper and
OOSqlLegacyBook projects for you to add to the solution. These contain application source code and references.
- In the
Solution Explorer, right-click the solution; then select
Add > Existing Project.
- Browse to the
%PUBLIC%\Documents\Micro Focus\Visual COBOL\Samples\SQL\ado.net\OOSqlBookWrapper directory.
- Double-click the
OOSqlBookWrapper COBOL project.
- Again, in the
Solution Explorer, right-click the solution; then select
Add > Existing Project.
- Browse to the
%PUBLIC%\Documents\Micro Focus\Visual COBOL\Samples\SQL\ado.net\OOSqlLegacyBook directory.
- Double-click the
OOSqlLegacyBook COBOL project.
Add project references
The two projects you just added to the solution need to be incorporated by reference. Here you create a reference from the
OOSqlBookWCF project to the
OOSqlBookWrapper and
OOSqlLegacyBook projects.
- In the
Solution Explorer, right-click the
OOSqlBookWCF project; then select
Add > Reference.
- In the left pane, click
Projects.
- In the right pane, check
OOSqlBookWrapper and
OOSqlLegacyBook; then click
OK.
Replace generated components
When you created the
OOSqlBookWCF project, it generated some default configuration and source code files. We have provided updated files to replace these:
- In the
Solution Explorer, delete the
app.config,
IService1.cbl, and
Service1.cbl files from the
OOSqlBookWCF project.
- Right-click the project; then select
Add > Existing Item.
- On the
Add Existing Item dialog box, select
All Files (*.*) from the
Filename filter drop-down list.
- Browse to the
%PUBLIC%\Documents\Micro Focus\Visual COBOL\Samples\SQL\ado.net\OOSqlBookDemoWCF\OOSqlBookWCF directory.
- Select the following files:
- app.config
- ISqlBook.cbl
- SqlBookService.cbl
- Click
Add.
Build the solution
- In the
Solution Explorer, right-click the
OOSqlBookWCF solution; then select
Build Solution from the context menu.