https://github.com/vweevers/assembly-source
Create or change .NET assembly attributes in C# and JScript source code.
https://github.com/vweevers/assembly-source
csharp dotnet dotnet-assembly jscript nodejs
Last synced: 5 months ago
JSON representation
Create or change .NET assembly attributes in C# and JScript source code.
- Host: GitHub
- URL: https://github.com/vweevers/assembly-source
- Owner: vweevers
- License: mit
- Created: 2017-06-05T19:51:23.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-10-10T09:34:21.000Z (about 5 years ago)
- Last Synced: 2025-07-04T23:54:40.506Z (6 months ago)
- Topics: csharp, dotnet, dotnet-assembly, jscript, nodejs
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# assembly-source
**Create or change .NET assembly attributes in C# and JScript source code.**
[](https://www.npmjs.org/package/assembly-source)
[](https://www.npmjs.org/package/assembly-source)
[](http://travis-ci.com/vweevers/assembly-source)
## Usage
```js
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:
```js
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](https://npmjs.org) do:
```
npm install assembly-source
```
## License
[MIT](LICENSE) © Vincent Weevers