GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — windows/NativeScriptWindowsDemo at main · NativeScript/windows

Expand file tree

/

NativeScriptWindowsDemo

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

NativeScriptWindowsDemo

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
App
App
 
 
Assets
Assets
 
 
Properties
Properties
 
 
App.xaml
App.xaml
 
 
App.xaml.cs
App.xaml.cs
 
 
CrashDiagnostics.cs
CrashDiagnostics.cs
 
 
NativeScriptWindowsDemo.csproj
NativeScriptWindowsDemo.csproj
 
 
NativeScriptWindowsDemo.csproj.user
NativeScriptWindowsDemo.csproj.user
 
 
NativeScriptWindowsDemo.sln
NativeScriptWindowsDemo.sln
 
 
Package.appxmanifest
Package.appxmanifest
 
 
Program.cs
Program.cs
 
 
README.md
README.md
 
 
RuntimeHost.cs
RuntimeHost.cs
 
 

README.md

Outline

NativeScriptWindowsDemo Template (Windows)

This is the base C# harness template for NativeScript Windows apps generated by the CLI.

Layout

  • App/main.js: JavaScript app entry.
  • libs/: Place native runtime bridge binaries here (for example nativescript.dll).
  • RuntimeHost.cs: Runtime bootstrap and script execution glue.

Runtime integration

RuntimeHost calls into the exported bridge functions:

  • runtime_install_ctrlc_handler(exitCode)
  • runtime_init(appRoot)
  • runtime_runscript(runtime, script)
  • runtime_deinit(runtime)

Running conformance tests

app/main.js includes runtime conformance checks for:

  • Class.extend({ ... })
  • Class.extend("Name", { ... })
  • new SomeInterface({ ... })
  • Object.extend({ interfaces: [...], ... })
  • delegate/event helper semantics (NSWinRT.asDelegate, NSWinRT.createEventEmitter)

The script prints per-test lines and a summary:

  • [PASS] <test name>
  • [FAIL] <test name> - <reason>
  • [TEST SUMMARY] passed=X, failed=Y

Fast loop with ConsoleNativeScriptWindowsDemo

From workspace root:

  1. Build bridge DLL:
    • cargo build -p nativescript
  2. Copy script and DLL:
    • copy /Y NativeScriptWindowsDemo\\app\\main.js ConsoleNativeScriptWindowsDemo\\app\\main.js
    • copy /Y target\\debug\\nativescript.dll ConsoleNativeScriptWindowsDemo\\libs\\nativescript.dll
  3. Run harness:
    • dotnet run --project ConsoleNativeScriptWindowsDemo\\ConsoleNativeScriptWindowsDemo.csproj

UWP template run

  1. Ensure nativescript.dll exists under NativeScriptWindowsDemo/libs.
  2. Build and deploy NativeScriptWindowsDemo.sln from Visual Studio (Debug/x64 recommended for dev).
  3. Inspect Debug Output for the same PASS/FAIL summary lines.

Template expectations

The CLI should:

  1. Copy/produce runtime binaries into libs/.
  2. Populate app/main.js (or additional files under app/).
  3. Build/deploy the UWP app project.

Notes

app and libs are copied to output via wildcard include in NativeScriptWindowsDemo.csproj.

  • This harness is intentionally minimal and template-friendly.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.