Comments (8)
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"
from website.
Thanks for this trick! It works actual as it builds the project and went passthrough to the next builds.
However, it then suddenly failing when the output binaries has been copied over and rebuilt before the actual test executions.
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.
Below is my YML file.
And below is on the site.
from website.
Try using dotnet msbuild
to build RepoDb.UnitTests.csproj
directly.
from website.
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.
Yes, replace "MSBuild" with "Script" and put there dotnet msbuild RepoDb.Core\RepoDb.Tests\RepoDb.UnitTests\RepoDb.UnitTests.csproj
from website.
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)
- webhook response 405 on private Appveyor server
- Update docs regarding OS environment variables to include MacOS HOT 2
- Unable to run Invoke-SqlCmd against SQL Server 2016 HOT 2
- Documented method for clearing build cache via REST does not work HOT 1
- Java version problem when following SonarQube blog post HOT 2
- SQL Server version on Ubuntu (20.04)
- Feature request: document scheduled builds better HOT 2
- Feature request: document scheduled builds using UI better HOT 1
- The caceh config in `Building C/C++ projects` is wrong HOT 2
- AppVeyor Server releases outdated HOT 1
- build-vm-configurations missing the info about how to actually select the configuration
- Mark variables which can be overridden by config file
- What is the build timeout appveyor.yml configuration option HOT 2
- SimJo77 HOT 2
- Hi
- Hi HOT 1
- How to know Visual Studio and Windows SDK detailed version HOT 1
- Aviator predictor
- Aviator predictor HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from website.