Skip to content

Commit

Permalink
Update to allow use of C# 8 (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
atifaziz authored Jul 19, 2019
1 parent e1580c1 commit 3d80847
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,23 @@ os:
osx_image: xcode8.3
solution: MoreLinq.sln
mono: 5.0.1
dist: trusty
dist: xenial
sudo: required
dotnet: 2.1.500
dotnet: 2.2.203
env:
- CONFIGURATION=Debug
- CONFIGURATION=Release
addons:
apt:
sources:
- sourceline: 'deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main'
- sourceline: 'deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main'
key_url: 'https://packages.microsoft.com/keys/microsoft.asc'
packages:
- dotnet-hostfxr-1.0.1
- dotnet-sharedframework-microsoft.netcore.app-1.0.5

before_install:
- dotnet --info
- msbuild /version
- |
if [ "$TRAVIS_OS_NAME" == "osx" ] || [ `uname` == "Darwin" ]; then
# Handle too many files on OS X
Expand Down
4 changes: 2 additions & 2 deletions MoreLinq.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.0
# Visual Studio Version 16
VisualStudioVersion = 16.0.29102.190
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{835F8FFA-471F-4322-B721-A897F27872FA}"
ProjectSection(SolutionItems) = preProject
Expand Down
2 changes: 1 addition & 1 deletion MoreLinq/MoreLinq.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<VersionPrefix>3.3.0</VersionPrefix>
<Authors>MoreLINQ Developers.</Authors>
<TargetFrameworks>net451;netstandard1.0;netstandard2.0</TargetFrameworks>
<LangVersion>7.3</LangVersion>
<LangVersion>8</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>portable</DebugType>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "2.1.500"
"version": "2.2.200"
}
}
13 changes: 5 additions & 8 deletions msbuild.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ setlocal
if "%PROCESSOR_ARCHITECTURE%"=="x86" set PROGRAMS=%ProgramFiles%
if defined ProgramFiles(x86) set PROGRAMS=%ProgramFiles(x86)%
for %%e in (Community Professional Enterprise) do (
if exist "%PROGRAMS%\Microsoft Visual Studio\2017\%%e\MSBuild\15.0\Bin\MSBuild.exe" (
set "MSBUILD=%PROGRAMS%\Microsoft Visual Studio\2017\%%e\MSBuild\15.0\Bin\MSBuild.exe"
if exist "%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\MSBuild.exe" (
set "MSBUILD=%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\MSBuild.exe"
)
)
if exist "%MSBUILD%" goto :build
Expand All @@ -15,19 +15,16 @@ set MSBUILD_VERSION_MAJOR=
set MSBUILD_VERSION_MINOR=
for /f "delims=. tokens=1,2,3,4" %%m in ('msbuild /version /nologo') do (
set MSBUILD_VERSION_MAJOR=%%m
set MSBUILD_VERSION_MINOR=%%n
)
if not defined MSBUILD_VERSION_MAJOR goto :nomsbuild
if not defined MSBUILD_VERSION_MINOR goto :nomsbuild
if %MSBUILD_VERSION_MAJOR% lss 15 goto :nomsbuild
if %MSBUILD_VERSION_MINOR% lss 1 goto :nomsbuild
if %MSBUILD_VERSION_MAJOR% lss 16 goto :nomsbuild
:build
"%MSBUILD%" %*
goto :EOF

:nomsbuild
echo>&2 Microsoft Build Engine 15.1 is required to build the solution. For
echo>&2 installation instructions, see:
echo>&2 Microsoft Build Engine 16.0 or a later version is required to build
echo>&2 the solution. For installation instructions, see:
echo>&2 https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio
echo>&2 At the very least, you will want to install the MSBuilt Tool workload
echo>&2 that has the identifier "Microsoft.VisualStudio.Workload.MSBuildTools":
Expand Down

0 comments on commit 3d80847

Please sign in to comment.