'Invalid expression errors when building .NET Framework solution with Github Actions
I'm trying to build and run test for my solution in Github Actions. App is written in .NET Framework 4.7.2 and when I build or test it locally with the same msbuild command it all runs fine. Whenever I run build solution one of the projects keep giving me invalid expression errors like this:
error CS1026: ) expected [D:\a\SOLUTION\PROJECT\PROJECT.csproj]
error CS1056: Unexpected character '¿' [D:\a\SOLUTION\PROJECT\PROJECT.csproj]
Here is my yml file for Github Action workflow:
name: Build and Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-2019
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup MSBuild
uses: microsoft/[email protected]
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Restore nuget
run: nuget restore SOLUTION_PATH\SOLUTION.sln
- name: Build
run: msbuild SOLUTION_PATH\SOLUTION.sln /t:Rebuild -property:Configuration=Release -p:VisualStudioVersion=15.0
- name: Test
run: dotnet test --no-build --verbosity normal
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|