Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

[REEF-743] Convert project files to Visual Studio 2015 #873

Closed
wants to merge 1 commit into from

Conversation

markusweimer
Copy link
Contributor

This converts Org.Apache.REEF.Bridge.vcxproj to Visual Studio 2015 format.

This also adds a new solution Org.Apache.REEF.VS2013.sln as well as a new
Org.Apache.REEF.Bridge.VS2013.vcxproj for users of that version of Visual
Studio.

JIRA:
REEF-743

@markusweimer
Copy link
Contributor Author

I rebased and force-pushed this.

@tcNickolas
Copy link
Member

I try to open O.A.R.VS2013.sln with VS 2013, and build fails:

Error   7   Invalid Resx file. Could not find a part of the path 'C:\reef\lang\cs\bin\x64\Debug\Org.Apache.REEF.Bridge\Org.Apache.REEF.Bridge.exe'. Line 79, position 5.    C:\reef\lang\cs\bin\x64\Debug\Org.Apache.REEF.Client\Resources.resx 79  5   Org.Apache.REEF.Client

(followed by a bunch of "Metadata file could not be found", which I think are caused by failures to build earlier dlls)

The machine also has VS 2015 installed, if that is important.

@tcNickolas
Copy link
Member

Same machine, when I try to run

msbuild .\lang\cs\Org.Apache.REEF.VS2013.sln /p:Configuration="Debug" /p:Platform="x64" /m

with build tools for v120 (the same VS 2013 setup I'm using for builds now), it fails

   "C:\reef\lang\cs\Org.Apache.REEF.VS2013.sln" (default target) (1) ->
   "C:\reef\lang\cs\Org.Apache.REEF.IO.TestClient\Org.Apache.REEF.IO.TestClient.csproj" (default target) (17) ->
   "C:\reef\lang\cs\Org.Apache.REEF.Bridge\Org.Apache.REEF.Bridge.vcxproj" (default target) (34) ->
   (PlatformPrepareForBuild target) ->
     C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: Th
   e build tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, please
   install v140 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Pr
   oject menu or right-click the solution, and then selecting "Upgrade Solution...". [C:\reef\lang\cs\Org.Apache.RE
   EF.Bridge\Org.Apache.REEF.Bridge.vcxproj]

@markusweimer
Copy link
Contributor Author

Looking into it.

@markusweimer
Copy link
Contributor Author

@tcNickolas I removed the .VS2013. files in the last commit. I believe the VS2015 files can be compiled from the command line via:

msbuild .\lang\cs\Org.Apache.REEF.sln /p:Configuration="Debug" /p:Platform="x64" /p:PlatformToolse
t=v120 /m /tv:12.0

Can you give that a shot? Next step would be to somehow make VS 2013 call msbuild this way.

@tcNickolas
Copy link
Member

These parameters seem to work for command-line set up for VS 2013, and this change works with normal build command for VS 2015 (both from command-line and VS itself).

@markusweimer
Copy link
Contributor Author

Yay! I am working on automating this now.

@markusweimer
Copy link
Contributor Author

@tcNickolas I removed one command line parameter, and it works for me via:

msbuild .\lang\cs\Org.Apache.REEF.sln /p:Configuration="Debug" /p:Platform="x64" /m /tv:12.0

Can you confirm?

@markusweimer
Copy link
Contributor Author

I've replaced the commit in here with a new one that makes the solution compile on both VS 2013 and VS 2015 for me. We need to test this in a couple of environments:

  • A machine with both VS 2013 and 2015 installed. @tcNickolas can you do that?
  • A machine with only VS 2013 installed. @shulmanb Can you do that?
  • A machine with only VS 2015 installed. I can do that.

@markusweimer
Copy link
Contributor Author

I just tried on a machine with only VS 2015. Builds worked on both the command line and within VS.

@tcNickolas
Copy link
Member

Build works for me both for VS 2015 and 2013, both from VS and from command-line.

@markusweimer
Copy link
Contributor Author

Excellent! All we need now is confirmation that this works for machines with only Visual Studio 2013 installed. @shulmanb, can you test that?

@shulmanb
Copy link
Contributor

Will do that on Monday.

-----Original Message-----
From: "Markus Weimer" notifications@github.com
Sent: ‎3/‎12/‎2016 3:56 PM
To: "apache/reef" reef@noreply.github.com
Cc: "Boris Shulman" shulmanb@gmail.com
Subject: Re: [reef] [REEF-743] Convert project files to Visual Studio 2015(#873)

Excellent! All we need now is confirmation that this works for machines with only Visual Studio 2013 installed. @shulmanb, can you test that?

Reply to this email directly or view it on GitHub.

@jwang98052
Copy link
Contributor

I tried it with the machine which has only VS 2013 installed, both build and test are passed.

Must install maven 3.3.x though. That is required by the latest change for build script, not related to VS 2015.

@tcNickolas
Copy link
Member

Oh, I thought our build instructions at https://cwiki.apache.org/confluence/display/REEF/Compiling+REEF require 3.3, but they're actually "3 or newer". 3.2 and older don't support some of the switches I used. We should update build instructions with REEF-1254

@markusweimer
Copy link
Contributor Author

Thanks, @jwang98052! Can we go ahead and merge this, then?

@markusweimer
Copy link
Contributor Author

Actually, hold off for a bit. I'd like to update the README.md with the new information

  This adds conditionals to `Org.Apache.REEF.Bridge.vcxproj` to switch the
  `PlatformToolset` based on the version of Visual Studio. This allows the
  same .sln to be compiled on Visual Studio 2013 and 2015.

  This also updates README.md with the build instructions for VS 2015.

JIRA:
  [REEF-743](https://issues.apache.org/jira/browse/REEF-743)

Pull Request:
  This closes #
@markusweimer
Copy link
Contributor Author

Rebased and squashed.

@shulmanb
Copy link
Contributor

@markusweimer Builds fine for me

@tcNickolas
Copy link
Member

No concerns raised, so I'll do one last test and merge.

@tcNickolas
Copy link
Member

I'll also add restriction about Maven 3.3 or newer, while we're at editing our README.

@asfgit asfgit closed this in 061f662 Mar 15, 2016
@markusweimer markusweimer deleted the REEF-743 branch March 15, 2016 22:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants