Browse Source

Build: clarify need to run restore.cmd once when using VisualStudio

pull/385/head
Christoph Ruegg 10 years ago
parent
commit
45b1f36dad
  1. 1
      README.md
  2. 13
      docs/content/Build.md
  3. 12
      restore.cmd
  4. 30
      restore.sh

1
README.md

@ -67,6 +67,7 @@ with MsBuild or with FAKE.
MsBuild/XBuild:
restore.cmd (or restore.sh)
msbuild MathNet.Numerics.sln
FAKE:

13
docs/content/Build.md

@ -8,16 +8,21 @@ manually with the build scripts.
VisualStudio or Xamarin Studio
------------------------------
The Visual Studio solutions should build out of the box, without any preparation
steps or package restores. Tests can be run with the usual integrated NUnit test
runners or ReSharper.
We clearly separate dependency management from the IDE, you should therefore
run `build.cmd` or `build.sh` once after every git checkout in order to restore
the dependencies exactly as defined. Otherwise Visual Studio and other IDEs
may fail to compile or provide correct IntelliSense.
Tests can be run with the usual integrated NUnit test runners or ReSharper.
MSBuild or XBuild
-----------------
Instead of a compatible IDE you can also build the solutions directly with
`msbuild`, or on Mono with `xbuild`.
`msbuild`, or on Mono with `xbuild`. You may need to run `restore.cmd` or
`restore.sh` before, once after every git checkout in order to restore the dependencies.
restore.cmd (or restore.sh) # restore dependencies (once)
msbuild MathNet.Numerics.sln # only build for .Net 4 (main solution)
msbuild MathNet.Numerics.Net35Only.sln # only build for .Net 3.5
msbuild MathNet.Numerics.All.sln # full build with .Net 4, 3.5 and PCL profiles

12
restore.cmd

@ -0,0 +1,12 @@
@echo off
cls
.paket\paket.bootstrapper.exe
if errorlevel 1 (
exit /b %errorlevel%
)
.paket\paket.exe restore
if errorlevel 1 (
exit /b %errorlevel%
)

30
restore.sh

@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -eu
set -o pipefail
cd `dirname $0`
FSIARGS=""
OS=${OS:-"unknown"}
if [[ "$OS" != "Windows_NT" ]]
then
FSIARGS="--fsiargs -d:MONO"
fi
function run() {
if [[ "$OS" != "Windows_NT" ]]
then
mono "$@"
else
"$@"
fi
}
if [[ "$OS" != "Windows_NT" ]] && [ ! -e ~/.config/.mono/certs ]
then
mozroots --import --sync --quiet
fi
run .paket/paket.bootstrapper.exe
run .paket/paket.exe restore
Loading…
Cancel
Save