Code Monkey home page Code Monkey logo

package.util's Introduction

OCS.Package.Util

OCS.Package.Util has been added to your project.

A solution folder name '.tools' has been added to your solution containing the following files:

  • ocs.package.util.targets
  • OCS.Package.Util.exe

The ocs.package.util.targets contains a target named = 'PackageFactory'

<Target Name="PackageFactory"  AfterTargets="CopyFilesToOutputDirectory" >
  <Exec Command="$(PackageCreateCommand)"  LogStandardErrorAsError="true"/>
</Target>

If you want to restrict which configuration to build and publish the package add a condition to the Target tag like

<Target Name="PackageFactory"  AfterTargets="CopyFilesToOutputDirectory" Condition="'$(Configuration)'=='Release'" >
  <Exec Command="$(PackageCreateCommand)"  LogStandardErrorAsError="true"/>
</Target>

nuspec-def.xml file

Remember to include a nuspec-def.xml file if you need to build packages with more tooling and content.
Example of a nuspec-def.xml file

Following tokens in nuspec-def.xml can be used:

  • ##TargetDir## => which is the outputpath of build (in given configuration)
  • ##ProjectDir## => which is the path to the project root folder.
Example file:
<?xml version="1.0" encoding="utf-8" ?>
  <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
  <metadata>
    <id>id of package if different from assembly name</id>
    <summary>A package create and deploy tool...</summary>
    <isToolsOnly>true/false => no lib folder if true.</isToolsOnly>
    <includePdb>false/true => to include pdb in package</includePdb>
    <publishPackage>true/false => true if to push package to ocsutv01</publishPackage>
  </metadata>
  <files>
    <file src="##ProjectDir##\Areas\Onboard\**" target="Content\NewVersion\Areas\Onboard" exclude="**.nupkg;**.pdb;*.config;bin\**;obj\**;**.cs;**csproj*;*.xml;*.nuspec;**.old;**.tt;" />
    <file src="OCS.Package.Util.exe" target=".utils" />
    <file src="..\..\psScripts\init.ps1" target="tools\Init.ps1" />
    <file src="..\..\psScripts\Install.ps1" target="tools" />
    <file src="..\..\readme.md" target="content" />
    <file src="##TargetDir##\**.dll" target="lib\net40 " />
    <file src="##TargetDir##\**.xml" target="lib\net40 " />
  </files>
</package>


This part is just left for references. To learn more about the markdown syntax, refer to these links:

package.util's People

Watchers

Erlend Torsvik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.