【解決方法】.NET Core のみを対象とする build_check.yml に .NET Framework 4.7.2 を追加するにはどうすればよいですか

プログラミングQA

[ad_1]

0

I have a .NET solution that have several projects, built in .NET Core and in the .NET 4.7.2. All those projects are built and run fine on my local environment.

However, when I push this solution to a GitHub, the build in the GitHub fails

error MSB3644: The reference assemblies for .NETFramework,Version=v4.7.2 were not found.

I examined the build_check.yml uploaded to GitHub, and noticed that this file is missing a reference to a .NET Framework 4.7.2.

I am posting the contents of the build_check.yml below. What is the right syntax to add .NET Framework 4.7.2 to it?

name: Build check

on:
  pull_request:

jobs:
  test:
    name: Build check
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Setup .NET Core
      uses: actions/setup-dotnet@v3
      with:
        dotnet-version: |
          6.0.x
          7.0.x
    - name: Restore packages for solution
      run: dotnet restore
    - name: Build solution
      run: dotnet build --no-restore -c debug
#    - name: Run tests
#      run: dotnet test --no-build -c debug

私が試したこと:

I examined the build_check.yml uploaded to GitHub, and noticed that this file is missing a reference to a .NET Framework 4.7.2.

[ad_2]

コメント

タイトルとURLをコピーしました