- Notifications
You must be signed in to change notification settings - Fork79
Workbooks is an interactive programming environment that’s perfect for experimentation, learning, and documentation: an educational tool for learning the myriad of .NET platforms, APIs, and libraries.
License
microsoft/workbooks
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Xamarin Workbooks provide a blend of documentation and code that is perfectfor experimentation, learning, and creating guides and teaching aids.
Create a rich C# workbook for .NET Core, Android, iOS, Mac, or WPF, and getinstant live results as you learn these APIs. Workbooks also have access tothe vast NuGet package ecosystem to make learning new APIs a breeze.
Service | macOS | Windows | Linux |
---|---|---|---|
VSTS | |||
AppVeyor | |||
Travis |
Ensure git submodules are up-do-date:
git submodule syncgit submodule update --recursive --init
Now simply run:
msbuild /restore
Or for the strict .NET Core subset:
dotnet build
The top-level build system can be driven either by the systemmsbuild
or bythe installed .NET Core SDKdotnet build
. When usingdotnet build
, onlyprojects that can run on .NET Core will be built.
Additionally, the build can be shaped via profiles. Any number of profilesmay be selected. By default,all profiles will be selected.
Profiles are specified via the MSBuildProfile
property and may becombined with a+
delimiter:
msbuild /restore /p:Profile=Console+Web
Name | Description | Minimum Dependencies |
---|---|---|
Web | Build the ASP.NET Core Workbooks server | .NET Core ≥ 2.1,Node.js ≥ 8.10,Yarn ≥ 1.5.1 |
Console | Build the Console client | .NET Core ≥ 2.1 |
Desktop | Build the macOS or Windows desktop client | Visual Studio 2017 ≥ 15.6 |
Note: Support for Xamarin platforms will be detected automatically and builtif available. On macOS, the "macOS" platform (Xamarin.Mac) must be installedto build the client. Xamarin/mobile is entirely optional on Windows.
Many properties that can be specified on the command line will be persistedfor subsequent runs. For example:
# "Configure" and perform initial build:msbuild /restore \ /p:Profile=Web \ /p:Configuration=Release \ /p:WithoutXamarin=true# Rebuild with the same configuration as above, implied# thanks to _build/Configuration.props:msbuild
The following properties will persist and do not need to be specified onthe command line on subsequent runs:
Name | Description | Default Value |
---|---|---|
Profile | The set of profiles to build | Web+Console+Desktop |
Configuration | The build configuration (Debug orRelease ) | Debug |
Environnment: | ||
WithoutXamarin | A shortcut for setting allHaveXamarin* properties below tofalse | unset |
HaveXamarinMac | Whether or Xamarin.Mac is available to the build | auto-detected |
HaveXamarinIos | Whether or Xamarin.iOS is available to the build | auto-detected |
HaveXamarinAndroid | Whether or Xamarin.Android is available to the build | auto-detected |
External Tools: | ||
NuGet | Path tonuget.exe | resolved viaPATH |
Node | Path tonode | resolved viaPATH |
Yarn | Path toyarn | resolved viaPATH |
Npm | Path tonpm | resolved viaPATH |
If you want to build aRelease
build on Windows (for example, you want tobuild an installer), you will need to build in a slightly different fashion.First, make sure that you connect to a Mac build host via Visual Studio atleast once. You can do this by doing the following:
- Open Visual Studio
- Go toTools → Options → Xamarin → iOS Settings
- Click "Find Xamarin Mac Agent"
- Select a Mac on your network, or add one by name
- Enter credentials when prompted
Once the connection completes, click OK to close all the dialogs. Then,build theRelease
configuration by running the following:
msbuild \ /p:MacBuildHostAddress="<hostname-or-ip-of-your-mac>" \ /p:MacBuildHostUser="<mac-username>" \ /p:Configuration=Release /t:Build,Install
This is needed because the installer build now needs a zipped copy of theXamarin.iOS workbook app from the server. TheXamarin.Workbooks.iOS
projectwill do the build and copy automatically when a Mac build host is used. If youare building in Debug, you can omit those properties unless you need theWorkbook app to be copied locally, in which case, include them there as well.
Note: the build will read properties fromBuild/Local.props
as well,for example:
<Project> <PropertyGroup> <MacBuildHostAddress>porkbelly</MacBuildHostAddress> <MacBuildHostUser>aaron</MacBuildHostUser> </PropertyGroup></Project>
This project welcomes contributions and suggestions. Most contributions requireyou to agree to a Contributor License Agreement (CLA) declaring that you havethe right to, and actually do, grant us the rights to use your contribution.For details, visithttps://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whetheryou need to provide a CLA and decorate the PR appropriately (e.g., label,comment). Simply follow the instructions provided by the bot. You will onlyneed to do this once across all repositories using our CLA.
This project has adopted theMicrosoft Open Source Code of Conduct.For more information see theCode of Conduct FAQor contactopencode@microsoft.com with anyadditional questions or comments.
Official builds and releases of Xamarin Workbooks & Inspector from Microsoftcollect usage data and send it to Microsoft to help improve our productsand services.Read our privacy statement to learn more.
Users may opt out of telemetry and usage data collection from thePreferencesdialog.
Non-Microsoft builds do not enable telemetry collection at all.
Xamarin Workbooks & Inspector incorporates open source code from externalprojects. SeeThirdPartyNotices.txt for attribution.
About
Workbooks is an interactive programming environment that’s perfect for experimentation, learning, and documentation: an educational tool for learning the myriad of .NET platforms, APIs, and libraries.