Adds support for VS Code debugging (#847)

* Try out VS code development. Adding tasks.json and launch.json

* update to .net core 3.1
This commit is contained in:
John Stairs 2020-01-22 15:34:07 -08:00 коммит произвёл GitHub
Родитель 442f9d904d
Коммит d935987a50
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 202 добавлений и 29 удалений

3
.gitignore поставляемый
Просмотреть файл

@ -25,9 +25,6 @@ bld/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
#Visual Studio Code
.vscode/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

94
.vscode/launch.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,94 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": "R4 Cosmos DB",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "buildR4",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/Microsoft.Health.Fhir.R4.Web/bin/Debug/netcoreapp3.1/Microsoft.Health.Fhir.R4.Web.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Microsoft.Health.Fhir.R4.Web",
"stopAtEntry": false,
"env": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DataStore": "CosmosDb"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": "R4 SQL Server",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "buildR4",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/Microsoft.Health.Fhir.R4.Web/bin/Debug/netcoreapp3.1/Microsoft.Health.Fhir.R4.Web.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Microsoft.Health.Fhir.R4.Web",
"stopAtEntry": false,
"env": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DataStore": "SqlServer",
"SqlServer:AllowDatabaseCreation": "true",
"SqlServer:ConnectionString": "server=(local);Initial Catalog=FHIR_R4;Integrated Security=true",
"SqlServer:Initialize": "true",
"TestAuthEnvironment:FilePath": "..//..//testauthenvironment.json",
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": "STU3 Cosmos DB",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "buildSTU3",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/Microsoft.Health.Fhir.Stu3.Web/bin/Debug/netcoreapp3.1/Microsoft.Health.Fhir.Stu3.Web.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Microsoft.Health.Fhir.R4.Web",
"stopAtEntry": false,
"env": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DataStore": "CosmosDb"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": "STU3 SQL Server",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "buildSTU3",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/Microsoft.Health.Fhir.Stu3.Web/bin/Debug/netcoreapp3.1/Microsoft.Health.Fhir.Stu3.Web.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Microsoft.Health.Fhir.R4.Web",
"stopAtEntry": false,
"env": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DataStore": "SqlServer",
"SqlServer:AllowDatabaseCreation": "true",
"SqlServer:ConnectionString": "server=(local);Initial Catalog=FHIR_STU3;Integrated Security=true",
"SqlServer:Initialize": "true",
"TestAuthEnvironment:FilePath": "..//..//testauthenvironment.json",
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}

64
.vscode/tasks.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,64 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "shell",
"args": [
"build",
// Ask dotnet build to generate full paths for file names.
"/property:GenerateFullPaths=true",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary"
],
"group": "build",
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
},
{
"label": "buildR4",
"command": "dotnet",
"type": "shell",
"args": [
"build",
"${workspaceFolder}/src/Microsoft.Health.Fhir.R4.Web/Microsoft.Health.Fhir.R4.Web.csproj",
// Ask dotnet build to generate full paths for file names.
"/property:GenerateFullPaths=true",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary",
],
"group": "build",
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
},
{
"label": "buildSTU3",
"command": "dotnet",
"type": "shell",
"args": [
"build",
"${workspaceFolder}/src/Microsoft.Health.Fhir.Stu3.Web/Microsoft.Health.Fhir.Stu3.Web.csproj",
// Ask dotnet build to generate full paths for file names.
"/property:GenerateFullPaths=true",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary",
],
"group": "build",
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
}
]
}

Просмотреть файл

@ -3,7 +3,7 @@
<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<DebugType>Full</DebugType>
<DebugType>Portable</DebugType>
<LangVersion>7.3</LangVersion>
<HighEntropyVA>true</HighEntropyVA>
<EnableSourceLink Condition="$([MSBuild]::IsOSPlatform('osx'))">false</EnableSourceLink>

Просмотреть файл

@ -1,5 +1,15 @@
{
{
"profiles": {
"Default": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"TestAuthEnvironment:FilePath": "..//..//testauthenvironment.json",
"DataStore": "CosmosDb",
"ASPNETCORE_ENVIRONMENT": "development"
},
"applicationUrl": "https://localhost:44348/"
},
"CosmosDb": {
"commandName": "Project",
"launchBrowser": true,
@ -12,12 +22,11 @@
},
"SqlServer": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"SqlServer:ConnectionString": "server=(local);Initial Catalog=FHIR_R4;Integrated Security=true",
"SqlServer:Initialize": "true",
"SqlServer:AllowDatabaseCreation": "true",
"TestAuthEnvironment:FilePath": "..//..//testauthenvironment.json",
"SqlServer:ConnectionString": "server=(local);Initial Catalog=FHIR_R4;Integrated Security=true",
"DataStore": "SqlServer",
"ASPNETCORE_ENVIRONMENT": "development"
},

Просмотреть файл

@ -1,25 +1,34 @@
{
"profiles": {
"CosmosDb": {
"commandName": "Project",
"environmentVariables": {
"TestAuthEnvironment:FilePath": "..//..//testauthenvironment.json",
"DataStore": "CosmosDb",
"ASPNETCORE_ENVIRONMENT": "development"
},
"applicationUrl": "https://localhost:44348/"
},
"SqlServer": {
"commandName": "Project",
"environmentVariables": {
"SqlServer:ConnectionString": "server=(local);Initial Catalog=FHIR_STU3;Integrated Security=true",
"SqlServer:Initialize": "true",
"SqlServer:AllowDatabaseCreation": "true",
"TestAuthEnvironment:FilePath": "..//..//testauthenvironment.json",
"DataStore": "SqlServer",
"ASPNETCORE_ENVIRONMENT": "development"
},
"applicationUrl": "https://localhost:44348/"
"profiles": {
"Default": {
"commandName": "Project",
"environmentVariables": {
"TestAuthEnvironment:FilePath": "..//..//testauthenvironment.json",
"DataStore": "CosmosDb",
"ASPNETCORE_ENVIRONMENT": "development"
},
"applicationUrl": "https://localhost:44348/"
},
"CosmosDb": {
"commandName": "Project",
"environmentVariables": {
"TestAuthEnvironment:FilePath": "..//..//testauthenvironment.json",
"DataStore": "CosmosDb",
"ASPNETCORE_ENVIRONMENT": "development"
},
"applicationUrl": "https://localhost:44348/"
},
"SqlServer": {
"commandName": "Project",
"environmentVariables": {
"SqlServer:ConnectionString": "server=(local);Initial Catalog=FHIR_STU3;Integrated Security=true",
"SqlServer:Initialize": "true",
"SqlServer:AllowDatabaseCreation": "true",
"TestAuthEnvironment:FilePath": "..//..//testauthenvironment.json",
"DataStore": "SqlServer",
"ASPNETCORE_ENVIRONMENT": "development"
},
"applicationUrl": "https://localhost:44348/"
}
}
}
}