mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Adding sr.strings file and removing hard-coded strings (#52)
* Strings sweep for connection service * String sweep for credentials service * String sweep for hosting * String sweep for query execution service * String sweep for Workspace service * Renaming utility namespace to match standards Renaming Microsoft.SqlTools.EditorServices.Utility to Microsoft.SqlTools.ServiceLayer.Utility to match the naming changes done a while back. Also renaming them on the files that use them * Namespace change on reliable connection * Adding the new resx and designer files * Final bug fixes for srgen Fixing flakey moq package name * Removing todo as per @kevcunnane * Adding using statements as per @llali's comment * Fixing issues from broken unit tests Note: This feature contains changes that will break the contract for saving as CSV and JSON. On success, null is returned as a message instead of "Success". Changes will be made to the vscode component to handle this change.
This commit is contained in:
55
BUILD.md
55
BUILD.md
@@ -1,12 +1,36 @@
|
||||
# Usage
|
||||
# Build
|
||||
|
||||
Run `build.(ps1|sh)` with the desired set of arguments (see below for options).
|
||||
The build script itself is `build.cake`, written in C# using the Cake build automation system.
|
||||
All build related activites should be encapsulated in this file for cross-platform access.
|
||||
To build the vscode-mssql Service Layer, the most straight-forward way is open the source project
|
||||
(./src/Microsoft.SqlTools.ServiceLayer/ folder), restore the project's NuGet dependencies (which
|
||||
is done automatically in Visual Studio), and run the build task in VSCode or Visual Studio
|
||||
(<kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>B</kbd>). This will compile the code and drop everything in
|
||||
the ./bin/ folder off of the root of the project. This is the most simple way and will produce the
|
||||
dll files you can run using the `dotnet` command.
|
||||
|
||||
# Arguments
|
||||
If you need to do something special, read on for details about Cake.
|
||||
|
||||
## Primary
|
||||
# Cake
|
||||
|
||||
In addition to the standard build process, we have added a much more robust build system for
|
||||
performing complicated build processes that require more than just compiling the code. As such
|
||||
Cake ([cakebuild.net](http://www.cakebuild.net/)) was selected for the task. Running cake is only
|
||||
necessary in the following scenarios
|
||||
|
||||
* Regenerating resource files after adding a new string
|
||||
* Packaging the Service Layer into a NuGet package
|
||||
|
||||
## Cake Prerequisites
|
||||
|
||||
Cake requires Mono to be installed on non-Windows machines as Cake is not built using .NET Core (yet).
|
||||
|
||||
## Cake Usage
|
||||
|
||||
Run `build.(cmd|ps1|sh)` with the desired set of arguments (see below for options).
|
||||
The build script itself is `build.cake`, written in Cake's C#-like DSL using the Cake build automation system.
|
||||
|
||||
## Arguments
|
||||
|
||||
### Primary
|
||||
|
||||
`-target=TargetName`: The name of the build task/target to execute (see below for listing and details).
|
||||
Defaults to `Default`.
|
||||
@@ -14,7 +38,7 @@ All build related activites should be encapsulated in this file for cross-platfo
|
||||
`-configuration=(Release|Debug)`: The configuration to build.
|
||||
Defaults to `Release`.
|
||||
|
||||
## Extra
|
||||
### Extra
|
||||
|
||||
`-test-configuration=(Release|Debug)`: The configuration to use for the unit tests.
|
||||
Defaults to `Debug`.
|
||||
@@ -24,7 +48,7 @@ All build related activites should be encapsulated in this file for cross-platfo
|
||||
|
||||
`-archive`: Enable the generation of publishable archives after a build.
|
||||
|
||||
# Targets
|
||||
## Targets
|
||||
|
||||
**Default**: Alias for Local.
|
||||
|
||||
@@ -41,9 +65,12 @@ All build related activites should be encapsulated in this file for cross-platfo
|
||||
**SetPackageVersions**: Updates the dependency versions found within `project.json` files using information from `depversion.json`.
|
||||
Used for maintainence within the project, not needed for end-users. More information below.
|
||||
|
||||
# Configuration files
|
||||
**SRGen**: Generates a new version of the `sr.resx`, `sr.cs`, and `sr.designer.cs` files that contain
|
||||
the string resources defined in `sr.strings`. Run this after adding a new string to `sr.strings`
|
||||
|
||||
## build.json
|
||||
## Cake Configuration files
|
||||
|
||||
### build.json
|
||||
|
||||
A number of build-related options, including folder names for different entities. Interesting options:
|
||||
|
||||
@@ -55,12 +82,12 @@ A number of build-related options, including folder names for different entities
|
||||
**"DotNetVersion"**: The .NET SDK version used for the build. Can be used to pin to a specific version.
|
||||
Using the string `Latest` will retrieve the latest version.
|
||||
|
||||
## depversion.json
|
||||
### depversion.json
|
||||
|
||||
A listing of all dependencies (and their desired versions) used by `project.json` files throughout the project.
|
||||
Allows for quick and automatic updates to the dependency version numbers using the **SetPackageVersions** target.
|
||||
|
||||
# Artifacts generated
|
||||
## Artifacts Generated From Cake
|
||||
|
||||
* Binaries of Microsoft.SqlTools.ServiceLayer and its libraries built for the local machine in `artifacts/publish/Microsoft.SqlTools.ServiceLayer/default/{framework}/`
|
||||
* Scripts to run Microsoft.SqlTools.ServiceLayer at `scripts/SQLTOOLSSERVICE(.Core)(.cmd)`
|
||||
@@ -69,7 +96,3 @@ Allows for quick and automatic updates to the dependency version numbers using t
|
||||
* Binaries of Microsoft.SqlTools.ServiceLayer and its libraries cross-compiled for other runtimes (if selected in **PopulateRuntimes**) `artifacts/publish/Microsoft.SqlTools.ServiceLayer/{runtime}/{framework}/`
|
||||
* Test logs in `artifacts/logs`
|
||||
* Archived binaries in `artifacts/package` (only if `-archive` used on command line)
|
||||
|
||||
# Requirements
|
||||
|
||||
The build system requires Mono to be installed on non-Windows machines as Cake is not built using .NET Core (yet).
|
||||
|
||||
Reference in New Issue
Block a user