Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 7b9e0e1

Browse files
authored
Merge pull request #792 from dzsquared/dotnetmssql-removesetecho
removes set echo from dotnet-mssql
2 parents ed772fa + 644bb3c commit 7b9e0e1

File tree

5 files changed

+8
-13
lines changed

5 files changed

+8
-13
lines changed

containers/dotnet-mssql/.devcontainer/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
dockerfile: Dockerfile
88
args:
99
# [Choice] Update 'VARIANT' to pick a .NET Core version: 2.1, 3.1, 5.0
10-
VARIANT: 3.1
10+
VARIANT: 5.0
1111
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
1212
NODE_VERSION: "lts/*"
1313
# [Option] Install Azure CLI

containers/dotnet-mssql/.devcontainer/mssql/installSQLtools.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/bash
2-
set -echo
32
echo "Installing mssql-tools"
43
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | (OUT=$(apt-key add - 2>&1) || echo $OUT)
54
DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]')

containers/dotnet-mssql/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,10 @@ This definition includes some test code that will help you verify it is working
141141
3. Start VS Code, press <kbd>F1</kbd>, and select **Remote-Containers: Open Folder in Container...**
142142
4. Select the `containers/dotnetcore` folder.
143143
5. After the folder has opened in the container, if prompted to restore packages in a notification, click "Restore".
144-
6. After packages are restored, press <kbd>F5</kbd> to start the project.
145-
7. Once the project is running, press <kbd>F1</kbd> and select **Remote-Containers: Forward Port from Container...**
146-
8. Select port 8090 and click the "Open Browser" button in the notification that appears.
147-
9. You should see "Hello remote world from ASP.NET Core!" after the page loads.
148-
10. From here, you can add breakpoints or edit the contents of the `test-project` folder to do further testing.
144+
6. After packages are restored, press <kbd>F5</kbd> to start the project. *Note: if Auto Forward Ports has been disabled, you will need to manually forward port 8090 from the container with "Remote-Containers: Forward Ports..."*
145+
7. Open the browser to [localhost:8090](http://localhost:8090).
146+
8. You should see "The databases are: ApplicationDB,msdb,model,tempdb,master" after the page loads.
147+
9. From here, you can add breakpoints or edit the contents of the `test-project` folder to do further testing.
149148

150149
## License
151150

containers/dotnet-mssql/test-project/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static void Main(string[] args)
1717
string databaseNames = "";
1818
SqlConnectionStringBuilder connectionBuilder = new SqlConnectionStringBuilder();
1919

20-
connectionBuilder.DataSource = "localhost,61433";
20+
connectionBuilder.DataSource = "localhost,1433";
2121
connectionBuilder.UserID = "sa";
2222
connectionBuilder.Password = "P@ssw0rd";
2323
using (SqlConnection containerConnection = new SqlConnection(connectionBuilder.ConnectionString)) {
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
2-
32
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
3+
<TargetFramework>netcoreapp5.0</TargetFramework>
54
<UserSecretsId>31051026529000467138</UserSecretsId>
65
</PropertyGroup>
7-
86
<ItemGroup>
9-
<PackageReference Include="Microsoft.Data.SqlClient" Version="2.0.1" />
7+
<PackageReference Include="Microsoft.Data.SqlClient" Version="3.0.0" />
108
</ItemGroup>
11-
129
</Project>

0 commit comments

Comments
 (0)