Skip to content

Commit

Permalink
Migrate from MSBuild to dotnet build and test, and disable NuGet pack…
Browse files Browse the repository at this point in the history
…age restore

In light of recent changes in software development practices, we have migrated the build and test scripts in appveyor.yml from MSBuild to dotnet. The "msbuild" command has been replaced with "dotnet build" and "vstest.console" with "dotnet test". Additionally, the environment variable for NuGet package restore has been set to false in both appveyor.yml and SubtitleEdit.csproj files. By not restoring packages on each build, we reduce network traffic and improve build performance.
  • Loading branch information
ivandrofly committed Oct 28, 2024
1 parent 7093b49 commit 3a8070d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
version: "{build}"

image: Visual Studio 2022

platform:
Expand All @@ -8,14 +7,17 @@ platform:
configuration:
- Release

environment:
EnableNuGetPackageRestore: false

build_script:
- msbuild "SubtitleEdit.sln" /r /v:minimal /clp:summary /p:"Platform=%PLATFORM%" /p:"Configuration=%CONFIGURATION%" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- dotnet build "SubtitleEdit.sln" --configuration %CONFIGURATION%

test_script:
- vstest.console "src\Test\bin\%CONFIGURATION%\Test.dll" /logger:Appveyor
- dotnet test "src/Test/Test.csproj" --configuration %CONFIGURATION% --logger:trx

cache:
- 'packages -> **\src\ui\packages.config'
- packages -> **\Directory.Packages.props

matrix:
fast_finish: true
fast_finish: true
2 changes: 1 addition & 1 deletion src/ui/SubtitleEdit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<MapFileExtensions>true</MapFileExtensions>
<OutputType>WinExe</OutputType>
<PublishWizardCompleted>true</PublishWizardCompleted>
<RestorePackages>true</RestorePackages>
<RestorePackages>false</RestorePackages>
<RootNamespace>Nikse.SubtitleEdit</RootNamespace>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">.\</SolutionDir>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down

0 comments on commit 3a8070d

Please sign in to comment.