Giter Club home page Giter Club logo

Comments (8)

FeodorFitsner avatar FeodorFitsner commented on August 30, 2024 1

You can easily install .NET 8 Preview during the build with this simple script added to your appveyor.yml:

install:
- ps: |
    Invoke-WebRequest -Uri 'https://dot.net/v1/dotnet-install.ps1' -UseBasicParsing -OutFile "$env:temp\dotnet-install.ps1"
    & $env:temp\dotnet-install.ps1 -Architecture x64 -Version '8.0.100-preview.2.23157.25' -InstallDir "$env:ProgramFiles\dotnet"

Full gist.

from website.

mikependon avatar mikependon commented on August 30, 2024

Thanks for this trick! It works actual as it builds the project and went passthrough to the next builds.

image

However, it then suddenly failing when the output binaries has been copied over and rebuilt before the actual test executions.

image

Suspecious as well of why I can see the log below, it sounds to me that the path is not correct. If it, then it sounds to me that the .NET 8 version is not instaled on the Node 1.

Project "C:\projects\repodb-yf1cx\RepoDb.Core\RepoDb.Tests\RepoDb.UnitTests\RepoDb.UnitTests.csproj" (1) is building "C:\projects\repodb-yf1cx\RepoDb.Core\RepoDb.Tests\RepoDb.UnitTests\RepoDb.UnitTests.csproj" (1:4) on node 1 (Build target(s)).
C:\Program Files\dotnet\sdk\7.0.200\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [C:\projects\repodb-yf1cx\RepoDb.Core\RepoDb.Tests\RepoDb.UnitTests\RepoDb.UnitTests.csproj::TargetFramework=net8.0]
Done Building Project "C:\projects\repodb-yf1cx\RepoDb.Core\RepoDb.Tests\RepoDb.UnitTests\RepoDb.UnitTests.csproj" (Build target(s)) -- FAILED.
Done Building Project "C:\projects\repodb-yf1cx\RepoDb.Core\RepoDb.Tests\RepoDb.UnitTests\RepoDb.UnitTests.csproj" (default targets) -- FAILED.

Here is the log file that contains the error. (File: log.txt)
Link: https://ci.appveyor.com/project/mikependon/repodb-yf1cx

from website.

mikependon avatar mikependon commented on August 30, 2024

Below is my YML file.

image

And below is on the site.

image

from website.

FeodorFitsner avatar FeodorFitsner commented on August 30, 2024

Try using dotnet msbuild to build RepoDb.UnitTests.csproj directly.

from website.

mikependon avatar mikependon commented on August 30, 2024

Where is that in the YAML? Was it the build: section?

version: 1.0.{build}
branches:
  only:
  - master
image: Visual Studio 2022
configuration: Release
platform: Any CPU
install:
- ps: >-
    Invoke-WebRequest -Uri 'https://dot.net/v1/dotnet-install.ps1' -UseBasicParsing -OutFile "$env:temp\dotnet-install.ps1"
        & $env:temp\dotnet-install.ps1 -Architecture x64 -Version '8.0.100-preview.2.23157.25' -InstallDir "$env:ProgramFiles\dotnet"
before_build:
- cmd: dotnet restore RepoDb.Core\RepoDb.Tests\RepoDb.UnitTests\RepoDb.UnitTests.csproj
build:
  project: RepoDb.Core\RepoDb.Tests\RepoDb.UnitTests\RepoDb.UnitTests.csproj
  verbosity: normal
test_script:
- cmd: vstest.console /logger:Appveyor RepoDb.Core\RepoDb.Tests\RepoDb.UnitTests\bin\Release\net7.0\RepoDb.UnitTests.dll

from website.

FeodorFitsner avatar FeodorFitsner commented on August 30, 2024

Yes, replace "MSBuild" with "Script" and put there dotnet msbuild RepoDb.Core\RepoDb.Tests\RepoDb.UnitTests\RepoDb.UnitTests.csproj

from website.

mikependon avatar mikependon commented on August 30, 2024

The AppVeyor is just a critical integration point to my project and I am very thankful for your support. Few minutes back, and since the .NET 8 is still in a preview mode, I had decided to just revert the support for it (for now), as all my project builds are failing.

But, I will do test again by next week to see if this approach would work and will start reinstating the support to .NET 8.

from website.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.