asp.net-mvc-4msbuildorchardcms-1.7orchardcms-1.8

Can Orchard 1.8.x be installed on a build server that does not have Visual Studio Installed?


I also asked this question on the Orchard forum but no joy there yet. So here it is again...

https://orchard.codeplex.com/discussions/569444 Please read for a few more details.

IF the .NET 4/4.5 SDK came with a developer command prompt (like previous SDKs) then I would not be asking this question.

But since Orchard is build with .NET 4.5 I am getting build errors using the old SDK. It seems that my only option is to install Visual Studio Express on the build server.

I am doing that as we speak so at this point the question is purely academic but I am still curious.

EDIT STILL NO JOY. Even after installing VS 2013 Express Web the vcvarsall.bat that usually configure the build environment is still not present. So this is no longer a curiosity question. The Express edition also cannot create my build environment. Help.

Seth


Solution

  • Here is my answer...copied and pasted from the forum.

    This is a late answer. Bottom line is that I did eventually get our build server to build orchard projects. I am not sure if this is a complete answer or not as I should have answered as soon as I had it done. But I pretty sure this will work.

    One other thing to note...It is quite possible that not all of these steps are required. I tried a lot of different things and it might be in the end some of the steps were not needed. It might also reflect a problem on our build server...especially the fact that I had to manually add registry entries.

    But here it is without details.

    Install the .NET Framework SDK for Windows 7.1. http://www.microsoft.com/en-us/download/details.aspx?id=8279

    Install the .NET 4.5 Full http://www.microsoft.com/en-us/download/details.aspx?id=30653

    Install Visual Studio 2013 Express for Web http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx

    Install the Visual Studio 2013 Build Tools http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx

    Finally, even after that...it didn't work until I added the following registry keys. I would attach the .reg file but I don't see how. Save the lines between the lines into a fixBuild.reg file. Then double click...


    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7]
    "FrameworkDir32"="C:\Windows\Microsoft.NET\Framework\"
    "FrameworkDir64"="C:\Windows\Microsoft.NET\Framework64"
    "11.0"="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\"
    "FrameworkVer32"="v4.0.30319"
    "FrameworkVer64"="v4.0.30319"
    "12.0"="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\"


    Finally, to actually do the build, I created a batch file that does the build.
    Save the lines between the lines into a doBuild.cmd file. Be sure to place this in the root of the source download...then double click to build...


    call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"
    msbuild /t:FastBuild Orchard.proj
    The first line gets your environment ready. The second build the project using the FastBuild target in the Orchard.proj file. You can read that file if you want to try other build targets.

    ******* EDIT
    There is one thing I forgot to mention. And that is that one thing you have to do to get this to work is that you have to edit some CSPROJ files because the command line build fails with errors like these...

    \Orchard\src\Orchard.Web\Modules\CKEditor\CKEditor.csproj(337,6): error : "None" element name for include "Placement.info" should be "Content". \Orchard\src\Orchard.Web\Modules\Orchard.Tokens\Tests\Orchard.Tokens.Tests.csproj(82,6): error : "None" element name for include "app.config" sh \Orchard\src\Orchard.Web\Modules\TinyMceDeluxe\TinyMceDeluxe.csproj(377,6): error : "None" element name for include "app.config" should be "Cont \Orchard\src\Orchard.Web\Modules\Upgrade\Upgrade.csproj(156,6): error : "None" element name for include "app.config" should be "Content". [C:\Us \Orchard\src\Orchard.Web\Themes\Themes.csproj(280,6): error : "None" element name for include "Upward\Views\Content-Story.Detail.cshtml" should

    The fix is to do exactly what the error indicates. Open the csproj files and search/replace "

    Also, some of the projects reference app.config files that do not exist in source. You also have to remove those references. I usually just delete the content node entirely or the group entirely.

    Seth