C# JavaScript CSS TypeScript PowerShell Batchfile
Latest commit 67b4799 Feb 25, 2017 @vladsch vladsch committed with LeonidVeriga [1432] JSON serialization support (#2417) [skip travis]
* [98] [1306] [1432] Added proper support for JSON serialization/deserialization.

* Fixed bug with String overriding System.String.

* [1432] JSON serialization support

* [1432] Update current client test output

* [1432] JSON.js formatting

* [1432] Use System.DateTime.fromTicks

* [1432] Make tests more informative

* [1432] Added tests for array of complex objects

* Move Serialize/Deserialize to Bridge.JSON

* [2418] Correct Obsolete messages

* Update unit tests
Failed to load latest commit information.
.build Misc minor cleanup operations (#2376) Feb 15, 2017
.github Reordered template items Jan 25, 2017
.nuget [1482] [1719] Bridge project building on Mac + Linux (#1724) Sep 4, 2016
.vscode [1482] [1719] Bridge project building on Mac + Linux (#1724) Sep 4, 2016
Bridge [1432] JSON serialization support (#2417) [skip travis] Feb 25, 2017
Compiler [1432] JSON serialization support (#2417) [skip travis] Feb 25, 2017
Html5 [1432] JSON serialization support (#2417) [skip travis] Feb 25, 2017
PostBuild [2175] Rename Bridge.Builder.exe to bridge.exe (#2377) Feb 13, 2017
Tests [1432] JSON serialization support (#2417) [skip travis] Feb 25, 2017
packages [1943] bridge.js doesn't support NodeJS (#2400) Feb 18, 2017
.gitattributes [2015] Resource encoding and new North theme (#2016) Nov 2, 2016
.gitignore [2175] Rename Bridge.Builder.exe to bridge.exe (#2377) Feb 13, 2017
.travis.yml [CI] Commit labels to control build (#2104) Nov 28, 2016
Bridge.Dev.sln [2282] ObjectLiteralAttribute changes (#2283) Feb 4, 2017
Bridge.sln [2175] Rename Bridge.Builder.exe to bridge.exe (#2377) Feb 13, 2017
Gruntfile.js [2076] Javascript Global Namespace Pollution for linq.js (#2087) Nov 25, 2016
LICENSE.md Misc minor cleanup operations (#2376) Feb 15, 2017
README.md Removed flat style from the NuGet badge Jan 17, 2017
appveyor.yml [v16.0] Version bumping (#2350) Feb 7, 2017
package.json [1482] [1719] Bridge project building on Mac + Linux (#1724) Sep 4, 2016


Bridge.NET - C# to JavaScript Compiler

Build status Build Status NuGet Status Join the chat at https://gitter.im/bridgedotnet/Bridge CLA assistant

Bridge.NET is an open source C#-to-JavaScript Compiler.

Compile your C#...

using System;

class Program
    static void Main(string[] args)
        var msg = "Hello, world!";


into JavaScript

Bridge.assembly("Demo", function ($asm, globals) {
    "use strict";

    Bridge.define("Program", {
        $main: function (args) {
            var msg = "Hello, world!";


Run the sample above at Deck.NET.


Getting Started

A great place to start if you're new to Bridge is reviewing the Getting Started Knowledge Base article.

The easiest place to see Bridge in action is Deck.NET.


The following code sample demonstrates a simple App.cs class that will run automatically on page load and prompt with an alert message.

Example (Deck)

public class Program
    public static void Main()
        Console.WriteLine("Hello World!");

The C# class above will be compiled into JavaScript and added to /Bridge/ouput/demo.js within your project. By default, Bridge will use the Namespace name as the file name. In this case: demo.js. There are many options to control the output of your JavaScript files, and the Attribute Reference is an important Knowledge Base article to review.

Bridge.assembly("Demo", function ($asm, globals) {
    "use strict";

    Bridge.define("Demo.Program", {
        $main: function () {
            Bridge.Console.log("Hello World!");


A full list of installation options available at bridge.net/download/, including full support on Windows, Mac OS and Linux for Visual Studio Code and Mono Develop.

Bridge for Visual Studio

If you're using Visual Studio, the best way to get started is by adding the Bridge.NET for Visual Studio extension.

From within Visual Studio, go to the Tools > Extensions and Updates....

Visual Studio Extensions and Updates

From the options on the left side, be sure to select Online, then search for Bridge. Clicking Download will install Bridge for Visual Studio. After installation is complete, Visual Studio may require a restart.

Bridge for Visual Studio

Once installation is complete you will have a new Bridge.NET project type. When creating new Bridge enabled projects, select this project type.


Another option is installation of Bridge into a new C# Class Library project using NuGet. Within the NuGet Package Manager, search for Bridge and click to install.

Bridge can also be installed using the NuGet Command Line tool by running the following command:

Install-Package Bridge

More information regarding Nuget package installation for Bridge is available in the Documentation.


Interested in contributing to Bridge? Please see CONTRIBUTING.md.

We also flag some Issues as up-for-grabs. These are generally easy introductions to the inner workings of Bridge, and are items we just haven't had time to implement. Your help is always appreciated.


Show your support by adding a built with Bridge.NET badge to your projects README or website.

Built with Bridge.NET


[![Built with Bridge.NET](https://img.shields.io/badge/built%20with-Bridge.NET-blue.svg)](http://bridge.net/)


<a href="http://bridge.net/">
    <img src="https://img.shields.io/badge/built%20with-Bridge.NET-blue.svg" title="Built with Bridge.NET" />

How to Help

We need your help spreading the word about Bridge. Any of the following items will help:

  1. Add a Badge
  2. Star Bridge project on GitHub
  3. Leave a review on Visual Studio Gallery
  4. Blog about Bridge.NET
  5. Tweet about @bridgedotnet
  6. Start a discussion on Reddit
  7. Answer Bridge related questions on StackOverflow
  8. Give a local usergroup presentation on Bridge
  9. Give a conference talk on Bridge
  10. Provide feedback (forums, GitHub or email)
  11. Vote for Bridge.NET on UserVoice


Bridge is continually tested and the full test runner is available at http://testing.bridge.net/.


Bridge is developed by the team at Object.NET. Frameworks and Tools for .NET Developers.


Apache License, Version 2.0

Please see LICENSE for details.