dotnet / orleans

Cloud Native application framework for .NET
https://docs.microsoft.com/dotnet/orleans
MIT License
10.07k stars 2.03k forks source link

PSA: Code no longer builds with Visual Studio 2013 #1638

Closed jthelin closed 8 years ago

jthelin commented 8 years ago

After PR #1632 was merged, the Orleans code no longer builds in Visual Studio 2013 due to use of some new C# 6.0 features.

By having Microsoft Build Tools 2015 (aka MsBuild 14) installed on my machine (plus only VS 2013 and not VS 2015) then the Build.cmd script does the local command line build OK.

But if i try to build the Orleans code in Visual Studio 2013 then i get these error message (see gist): https://gist.github.com/jthelin/f8d5c9d5bf8abfac250a9b03f29d86b2

The failure seems to be happening during the Orleans.dll code-gen processing, and tweaking the LogBuildProperties section in Orleans.csproj confirms that MsBuild 12.0 is getting using during code-gen :

MSBuildAssemblyVersion=12.0
MSBuildToolsPath=C:\Program Files (x86)\MSBuild\12.0\bin
MSBuildFrameworkToolsPath=C:\Windows\Microsoft.NET\Framework\v4.0.30319\

Following the discussions in PR #1559, i can't tell whether this "issue" should be a logged as a PSA or a Bug?

Given that the particular code that is causing everything to break in VS 2013 is just syntactic sugar rather than fundamentally diverse behaviour, are there any objection to tweaking that code back to "C# 5.0 Style" to fix things?

I still have serious concerns about betting-the-farm on VS2015, because my other projects have hit blocking bugs in VS 2015 such that several of our test suites won't run in VS 2015 even though they run just fine in VS 2013 and MsBuild 14.

Maybe the soon to arrive VS2015 Update 2 might improve things, but until then i have reservations about implicitly removing support for a stable platform like VS2013 [although it might have been completely unintentional side-effect of PR #1632]

Thoughts?

public TimeSpan GetQueueMsgsTimerPeriod { get; set; } = DEFAULT_GET_QUEUE_MESSAGES_TIMER_PERIOD;
public TimeSpan InitQueueTimeout { get; set; } = DEFAULT_INIT_QUEUE_TIMEOUT;
public TimeSpan MaxEventDeliveryTime { get; set; } = DEFAULT_MAX_EVENT_DELIVERY_TIME;
public TimeSpan StreamInactivityPeriod { get; set; } = DEFAULT_STREAM_INACTIVITY_PERIOD;
public StreamQueueBalancerType BalancerType { get; set; } = DEFAULT_STREAM_QUEUE_BALANCER_TYPE;
public StreamPubSubType PubSubType { get; set; } = DEFAULT_STREAM_PUBSUB_TYPE;
public TimeSpan SiloMaturityPeriod { get; set; } = DEFAULT_SILO_MATURITY_PERIOD;
veikkoeeva commented 8 years ago

@jthelin One thought is that Update 2 is available for download already and one of your points could be tried with it. Of course not everyone in need to build Orleans having bugs like you have can update. Are they bugs that could be described as common and are they in nature such that they'll be fixed or easily worked around? Also, there are already other PRs coming that, which use C# 6.0 features.

I personally don't know how a large part of the community are people who need to develop Orleans in VS 2013 and can't use the command line with build tools installed. As for anedoctal pondering I believe there would be a widely accepted justification, since VS2015 is the way to, one can just grab it and use it. It has all the features, the cool things that makes one to feel being closer to the edge. The same goes for C# 6.0 features, it might feel as a "drop in velocity" especially now that @galvesribeiro , @jdom and @dVakulen have worked CoreCLR support closer.

sergeybykov commented 8 years ago

@jthelin Have you seem any issue building Orleans with VS 2015?

Based on https://github.com/dotnet/orleans/pull/1559#issuecomment-197436764, I see no reason to spend any energy on backward compatibility with VS 2013 and restrain ourselves from using C# 6.0. VS 2013 is effective obsolete at this point.

If we hit any issue with VS 2015, and we haven't so far, we should report it to the team or find a workaround. I think it's a better approach than being overly conservative about some potential problems that likely will never happen in reality.

jthelin commented 8 years ago

That is why I raised the meta question above:

Following the discussions in PR #1559, i can't tell whether this "issue" should be a logged as a PSA or a Bug?

PSA = Public Service Announcement

I confirm I have not had so far any issues with building Orleans with VS 2015 -- except for the machine that does not currently have VS 2015 installed, of course ;)