Skip to content

Added support for install .Net4.0 devpack directly #39

Added support for install .Net4.0 devpack directly

Added support for install .Net4.0 devpack directly #39

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: build-and-test-workflow
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/[email protected]
- name: Install .NET Framework 4.0 Developer Pack
run: |
$url = 'https://app.ljnath.com/files/dotNetFx40_Full_x86_x64.exe'
$installer = "$env:TEMP\NDP40-DevPack.exe"
Invoke-WebRequest -Uri $url -OutFile $installer
Start-Process -FilePath $installer -ArgumentList '/q' -Wait
- name: Setup MSBuild
uses: microsoft/[email protected]
- name: Setup VSTest
uses: darenm/[email protected]
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Restore NuGet packages
run: nuget restore RandomString4Net.sln
- name: Build RandomString4Net for Release
run: msbuild RandomString4Net.sln -property:Configuration=Release -property:platform="Any CPU"
- name: Run Tests
run: vstest.console.exe .\RandomString4NetTest\bin\Release\RandomString4NetTest.dll
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}