diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 921cc5c64..e234e7c10 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -16,10 +16,9 @@ "remoteUser": "user", - "extensions": ["golang.go", "ms-dotnettools.csharp", "ms-python.python"], + "extensions": ["golang.go", "ms-dotnettools.csharp", "ms-python.python", "formulahendry.dotnet-test-explorer"], - // We want to dotnet restore all projects on startup so that omnisharp doesn't complain about lots of missing types on startup. - "postCreateCommand": "find -name \"*.??proj\" | xargs -L1 dotnet restore", + "postCreateCommand": "make ensure", "settings": { "extensions.ignoreRecommendations": true diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 026ba4bfe..5d215ba98 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -160,6 +160,7 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ matrix.dotnet-version }} + - run: mkdir -p ${{ runner.temp }}/opt/pulumi/nuget - run: dotnet nuget add source ${{ runner.temp }}/opt/pulumi/nuget - name: Set up Node ${{ matrix.node-version }} uses: actions/setup-node@v1 @@ -229,6 +230,7 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ matrix.dotnet-version }} + - run: mkdir -p ${{ runner.temp }}/opt/pulumi/nuget - run: dotnet nuget add source ${{ runner.temp }}/opt/pulumi/nuget - name: Set up Node ${{ matrix.node-version }} uses: actions/setup-node@v1 @@ -303,6 +305,9 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ matrix.dotnet }} + - name: Create Local Nuget + run: mkdir -p "${{ env.PULUMI_LOCAL_NUGET }}" + shell: bash - run: dotnet nuget add source ${{ env.PULUMI_LOCAL_NUGET }} - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index f2615b03f..987c8339c 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -143,6 +143,7 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ matrix.dotnet-version }} + - run: mkdir -p ${{ runner.temp }}/opt/pulumi/nuget - run: dotnet nuget add source ${{ runner.temp }}/opt/pulumi/nuget - name: Set up Node ${{ matrix.node-version }} uses: actions/setup-node@v1 @@ -206,6 +207,7 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ matrix.dotnet-version }} + - run: mkdir -p ${{ runner.temp }}/opt/pulumi/nuget - run: dotnet nuget add source ${{ runner.temp }}/opt/pulumi/nuget - name: Set up Node ${{ matrix.node-version }} uses: actions/setup-node@v1 @@ -280,6 +282,9 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ matrix.dotnet }} + - name: Create Local Nuget + run: mkdir -p "${{ env.PULUMI_LOCAL_NUGET }}" + shell: bash - run: dotnet nuget add source ${{ env.PULUMI_LOCAL_NUGET }} - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 @@ -295,9 +300,6 @@ jobs: python-version: ${{ matrix.python-version }} - name: Clean run: dotnet nuget locals all --clear - - name: Create Local Nuget - run: mkdir -p "D:\\Pulumi\\nuget" - shell: bash - name: Install Python Deps run: | pip3 install pyenv-win diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2f248fdb3..c60e9d107 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -236,6 +236,7 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ matrix.dotnet-version }} + - run: mkdir -p ${{ runner.temp }}/opt/pulumi/nuget - run: dotnet nuget add source ${{ runner.temp }}/opt/pulumi/nuget - name: Set up Node ${{ matrix.node-version }} uses: actions/setup-node@v1 @@ -305,6 +306,7 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ matrix.dotnet-version }} + - run: mkdir -p ${{ runner.temp }}/opt/pulumi/nuget - run: dotnet nuget add source ${{ runner.temp }}/opt/pulumi/nuget - name: Set up Node ${{ matrix.node-version }} uses: actions/setup-node@v1 @@ -386,6 +388,9 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ matrix.dotnet }} + - name: Create Local Nuget + run: mkdir -p "${{ env.PULUMI_LOCAL_NUGET }}" + shell: bash - run: dotnet nuget add source ${{ env.PULUMI_LOCAL_NUGET }} - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 diff --git a/.github/workflows/run-build-and-acceptance-tests.yml b/.github/workflows/run-build-and-acceptance-tests.yml index d9208bdb6..b533feb6a 100644 --- a/.github/workflows/run-build-and-acceptance-tests.yml +++ b/.github/workflows/run-build-and-acceptance-tests.yml @@ -82,6 +82,7 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ matrix.dotnet-version }} + - run: mkdir -p ${{ runner.temp }}/opt/pulumi/nuget - run: dotnet nuget add source ${{ runner.temp }}/opt/pulumi/nuget - name: Set up Node ${{ matrix.node-version }} uses: actions/setup-node@v1 @@ -170,6 +171,7 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ matrix.dotnet-version }} + - run: mkdir -p ${{ runner.temp }}/opt/pulumi/nuget - run: dotnet nuget add source ${{ runner.temp }}/opt/pulumi/nuget - name: Set up Node ${{ matrix.node-version }} uses: actions/setup-node@v1 @@ -279,6 +281,9 @@ jobs: run: | pip3 install pyenv-win pip3 install pipenv + - name: Create Local Nuget + run: mkdir -p "${{ env.PULUMI_LOCAL_NUGET }}" + shell: bash - run: dotnet nuget add source ${{ env.PULUMI_LOCAL_NUGET }} - name: Set Build Env Vars shell: bash diff --git a/.vscode/settings.json b/.vscode/settings.json index 7c9840ead..a66bf3a2e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,4 +11,7 @@ // Experimental but seems to work and means we don't need a vscode instance per go.mod file. "experimentalWorkspaceModule": true, }, + + "omnisharp.defaultLaunchSolution": "sdk/dotnet/dotnet.sln", + "dotnet-test-explorer.testProjectPath": "sdk/dotnet", } \ No newline at end of file diff --git a/sdk/dotnet/Makefile b/sdk/dotnet/Makefile index 57f0286e4..eb4f3ae80 100644 --- a/sdk/dotnet/Makefile +++ b/sdk/dotnet/Makefile @@ -14,6 +14,10 @@ include ../../build/common.mk # `test_all` without the dependencies. TEST_ALL_DEPS = install +ensure:: + # We want to dotnet restore all projects on startup so that omnisharp doesn't complain about lots of missing types on startup. + dotnet restore dotnet.sln + build:: # From the nuget docs: #