Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded to C# 6 language features #70

Merged
merged 5 commits into from
Nov 9, 2017
Merged

Upgraded to C# 6 language features #70

merged 5 commits into from
Nov 9, 2017

Conversation

anth12
Copy link
Contributor

@anth12 anth12 commented Nov 8, 2016

No description provided.

@mattbrailsford
Copy link
Collaborator

I've never been quite sure whether to use these features yet. What demands does it put on the project? Does it require a minimum version of VS or .NET to compile? I'm guessing this might be why the build has failed.

@anth12
Copy link
Contributor Author

anth12 commented Nov 8, 2016

C# 6 was released in 2014 so I would consider it good for use. The string interpolation & propagation features make no difference once compiled, they just make the source code more concise and cleaner.

Yes it looks as though the build is targeting C# 5 as the $ character is showing as unrecognised.

@anth12
Copy link
Contributor Author

anth12 commented Nov 9, 2016

Does it require a minimum version of VS or .NET to compile?

The targeted version of .net is not affected. The syntax is compatible with 2013, using a NuGet package, but VS2015 has support out of the box.

There is no specific benefit to merging but if you decide to the AppVeyor build config will need to be updated, which can either be done through the web UI or the appveyor.yml file...

@leekelleher
Copy link
Contributor

I read a blog post about building C#6 code with AppVeyor, turns out that it's the VS solution file that needs updating;

from...

VisualStudioVersion = 12.0.31101.0

to...

VisualStudioVersion = 14.0.22823.1

(or later version - ultimately so it's at least VS2015 RTM or above)


@mattbrailsford I think we should do this across all the UMCO packages, in due course.

@Jeavon
Copy link
Contributor

Jeavon commented Nov 9, 2016

Need to add:

os: Visual Studio 2015

as the first line in appveyor.yml

@Jeavon
Copy link
Contributor

Jeavon commented Nov 9, 2016

Also I would recommend that you change the ToolsVersion to 14 from 12 in each csproj although it may not be strictly necessary it will help when people open the solution to choose vs2015 instead of vs2013 if they have both installed

@Jeavon
Copy link
Contributor

Jeavon commented Nov 9, 2016

I think ToolsVersion should be updated to 14 or totally removed from https://github.com/umco/umbraco-vorto/blob/master/build/package.proj#L2

@Jeavon
Copy link
Contributor

Jeavon commented Nov 9, 2016

Darn BCL issue, I'll clone your fork, expect a PR for your PR :)

@Jeavon
Copy link
Contributor

Jeavon commented Nov 9, 2016

@anth12 need to update build-appveyor.cmd and it should build

CALL "%programfiles(x86)%\MSBuild\14.0\Bin\amd64\MsBuild.exe" build\package.proj

@anth12
Copy link
Contributor Author

anth12 commented Nov 9, 2016

Thanks for the help @Jeavon, not used AppVeyor before.

@leekelleher
Copy link
Contributor

@anth12 We lovingly know @Jeavon as our "AppVeyor Rockstar" 🤘

@Jeavon
Copy link
Contributor

Jeavon commented Nov 9, 2016

@leekelleher 👌:sparkles:

@mattbrailsford mattbrailsford merged commit 10ed9b5 into umco:master Nov 9, 2017
@mattbrailsford mattbrailsford added this to the 1.6 milestone Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants