Skip to content

Commit 80cbf78

Browse files
Verify the host from the SDK is usable
This is the other side of dotnet/source-build#1202. In this case the apphost is not known and the SDK downloads the host from nuget.org instead of using the apphost that is included with the sdk.
1 parent cea7e7c commit 80cbf78

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

use-apphost-from-sdk/test.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "use-apphost-from-sdk",
3+
"enabled": true,
4+
"version": "3.0",
5+
"versionSpecific": false,
6+
"type": "bash",
7+
"cleanup": true,
8+
"platformBlacklist":[
9+
10+
]
11+
}

use-apphost-from-sdk/test.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/bash
2+
3+
set -euo pipefail
4+
IFS=$'\n\t'
5+
6+
rm -rf console
7+
mkdir console
8+
pushd console
9+
10+
# Verify that the apphost from the SDK is usable and nuget is not
11+
# needed for building a HelloWorld console application.
12+
13+
cat > nuget.config <<EOF
14+
<?xml version="1.0" encoding="utf-8"?>
15+
<configuration>
16+
<packageSources>
17+
<clear />
18+
</packageSources>
19+
</configuration>
20+
EOF
21+
22+
dotnet new console
23+
dotnet build --no-restore
24+
netcoreapp=( bin/Debug/netcoreapp* )
25+
"${netcoreapp[0]}"/console
26+
27+
popd

0 commit comments

Comments
 (0)