Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including assembly-source with all npm packages installed. Try it out:

var assemblySource = require("assembly-source")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

assembly-source v0.1.0

Create or change .NET assembly attributes in C# and JScript source code

assembly-source

Create or change .NET assembly attributes in C# and JScript source code.

npm status node Travis build status AppVeyor build status Dependency status

usage

const Assembly = require('assembly-source')
const fs = require('fs')

// Construct from source code
const assembly = Assembly(fs.readFileSync('./AssemblyInfo.cs'))

// Read attributes (strings, booleans and numbers)
console.log(assembly.get('AssemblyVersion'))

// Modify and add attributes
assembly.set('AssemblyVersion', '1.2.3')
assembly.set('ComVisible', true)

// Then save
fs.writeFileSync('./AssemblyInfo.cs', assembly.toSource())

Or create metadata from scratch for JScript:

const assembly = Assembly({ language: 'jscript' })

assembly.set('AssemblyFileVersion', '1.2.3.4')
assembly.set('AssemblyInformationalVersion', '1.2.3')

const js = assembly.toSource({ preamble: true })

install

With npm do:

npm install assembly-source

license

MIT © Vincent Weevers

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free