- Windows: Visual Studio 2017
- Linux, macOS, Windows: Visual Studio Code
- Ensure you install the C# extension
The project has been migrated to use Visual Studio 2017 .csproj files and no longer uses the project.json project files as in Visual Studio 2015.
Due to the constantly changing data model the project currently does not yet ship with a database migration in place. You must run the command below to set up an initial migration.
The project ships with the Microsoft SQL Server data provider configured. If you are running in a Windows environment this will automatically use a LocalDB instance under (localdb)\mssqllocaldb. In a Linux/macOS environment you should switch to the SQLite provider (in appsettings.json change the GraConnectionStringName to "SQLite").
Initial database setup and configuration can be done utilizing the dotnet ef command line tool or the Package Manager Console. Here are steps for using dotnet ef:
- Navigate to the appropriate project directory for your database provider (e.g.
src/GRA.Data.SqlServerorsrc/GRA.Data.SQLite). - Check if a database migration exists:
`dotnet ef -s ../GRA.Web migrations list`
- If no migrations exist, create one:
`dotnet ef -s ../GRA.Web migrations add initial`
- Create or update the database to the migration (necessary for SQLite, possibly not for SQL Server but won't hurt):
`dotnet ef -s ../GRA.Web database update`
The GRA.Web project has the Secret Manager enabled. You may want to issue a command such as:
dotnet user-secrets set GraEmailOverride your@email.addressTo ensure that no errant emails are sent out during development. There are other settings you may want to configure through this manner such as GraDefaultOutgoingMailHost and GraDefaultOutgoingMailPort. Review Startup.cs for more configuration settings.
At this point you should be able to run the application in the debugger.