SDK for using Mapbox APIs with C#. If you'd like to contribute to the project, read CONTRIBUTING.md.
With an IDE:
- Open
MapboxSdkCs.sln
with Visual Studio or Xamarin Studio - Select configuration to build:
DebugNet
for targeting .NetFramework >=3.5DebugUWP
for targeting UWP
Build -> Rebuild Solution
- DLLs will be in
bin\Debug\net35\
- or
bin\Debug\uap10
On the command line:
- Windows
nuget restore MapboxSdkCs.sln
msbuild MapboxSdkCs.sln /p:Configuration=<DebugNet|DebugUWP>
- Linux/OSX
mono nuget.exe restore MapboxSdkCs.sln
xbuild MapboxSdkCs.sln /p:Configuration=<DebugNet|DebugUWP>
- DLLs will be in
bin\Debug\net35\
- or
bin\Debug\uap10
Currently tests are only available with configuration DebugNet
.
To run the tests you need to have the MAPBOX_ACCESS_TOKEN
environment variable set.
Log into your Mapbox account at https://www.mapbox.com/studio to obtain an access token.
Before publishing verify that there no build or test errors locally and on AppVeyor and Travis!
- Increment the versions in
versions.txt
dlls
: will patch theAssemblyVersion
attribute insrc\SharedAssemblyInfo.cs
, e.g.:dlls:1.0.0.1
. Convention is<major version>.<minor version>.<build number>.<revision>
.nupkg
: defines the version of the nuget package, e.g.:nupkg:1.0.0-alpha04
. This may be different fromdlls
as Nuget allows for custom postfixes to identify pre-releases, see https://docs.nuget.org/ndocs/create-packages/prerelease-packages#semantic-versioning
- Commit with a message containing
[publish nuget]
(can be anywhere within the commit message) - Tag the commit with the
nupkg
version - Push.
- AppVeyor build will publish to nuget.org
- Verify the build itself and publishing finished successfully: https://ci.appveyor.com/project/Mapbox/mapbox-sdk-cs
- Commit with a message containing
[publish docs]
- can be anywhere within the commit message
- may be combined with
[publish nuget]
- Push
- AppVeyor build will publish to
gh-pages
- Verify the build itself and publishing finished successfully:
- AppVeyor build will publish to
This should not be done unless there is an emergency (e.g. AppVeyor is down)
SET MAPBOX_ACCESS_TOKEN=<MAPBOX-ACCESS-TOKEN>
SET NUGET_API_KEY=<NUGET-API-KEY-WITH-PERMISSION-TO-PUSH-NUPKG>
SET GITHUB_TOKEN=<GITHUB-TOKEN-WITH-PERMISSION-TO-PUSH-TO-GHPAGES>
- Increment the versions in
versions.txt
build-local.bat "APPVEYOR_REPO_COMMIT_MESSAGE=[publish nuget] [publish docs]"