NCIOCPL / drug-dictionary-api

NCI Drug Dictionary API
0 stars 3 forks source link

Replace shared code with NuGet packages #57

Closed blairlearn closed 3 years ago

blairlearn commented 3 years ago

Remove the shared code files and replace them with the NuGet packages from http://github.com/nciocpl/ncI.OCPL.Api.Shared/

Parent Issue: Update the drug dictionary to .Net 3.1 #54

Update .csproj files

src/NCI.OCPL.Api.DrugDictionary/NCI.OCPL.Api.DrugDictionary.csproj

test/NCI.OCPL.Api.DrugDictionary.Tests/NCI.OCPL.Api.DrugDictionary.Tests.csproj

From the command line, in the project's base directory, run the following commands (See the "Notes section for prerequisites)

Remove the shared code projects:

$ dotnet remove src/NCI.OCPL.Api.DrugDictionary reference src/NCI.OCPL.Api.Common
$ dotnet remove test/NCI.OCPL.Api.DrugDictionary.Tests reference src/NCI.OCPL.Api.Common
$ dotnet remove test/NCI.OCPL.Api.DrugDictionary.Tests reference src/NCI.OCPL.Api.Common.Testing
$ dotnet sln remove src/NCI.OCPL.Api.Common
$ dotnet sln remove src/NCI.OCPL.Api.Common.Testing
$ rm -rf src/NCI.OCPL.Api.Common src/NCI.OCPL.Api.Common.Testing

Add NuGet packages

# Add NuGet packages
$ dotnet add src/NCI.OCPL.Api.DrugDictionary package NCI.OCPL.Api.Common --version 1.0.*
$ dotnet add test/NCI.OCPL.Api.DrugDictionary.Tests package NCI.OCPL.Api.Common --version 1.0.*
$ dotnet add test/NCI.OCPL.Api.DrugDictionary.Tests package NCI.OCPL.Api.Common.Testing --version 1.0.*

Code Cleanup

We're going to skip cleaning up the models for now and just do the changes required for .Net 3.1. (Models will be another ticket.)

In src/NCI.OCPL.Api.DrugDictionary/Program.cs

In src/NCI.OCPL.Api.DrugDictionary/Startup.cs

Update the web.config

In src/NCI.OCPL.Api.DrugDictionary/web.config, in the <handlers> section, replace AspNetCoreModule with AspNetCoreModuleV2

Sub-Tasks

Notes

This requires