GithubHelp home page GithubHelp logo

bubdm / readonlysourcetree Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aarnott/readonlysourcetree

0.0 0.0 0.0 45 KB

A NuGet package that makes your project build to top-level bin and obj directories.

License: Other

C# 100.00%

readonlysourcetree's Introduction

Read only source tree

Build status NuGet package

This project contains a NuGet package that will cause any project it is installed into to build its primary output and intermediate files to bin and obj directories at the root of your repository instead of as subdirectories to the project directory.

This makes structuring your repository after this pattern much easier:

RepoRoot\
    README.md
    LICENSE
    src\
        solution.sln
        project1\
        project2\
    bin\
        debug\
            project1\
            project2\
    obj\
        debug\
            project1\
            project2\
    packages\
        binary_dependency1\
        binary_dependency2\

This isolation of source files from build outputs can be useful for many reasons, including:

  1. Delete all build outputs for your entire repository just by deleting the top level bin and obj folders.
  2. Zip up your src directory and only get source -- no binaries.

Additional steps

Identifying the root of your repository

Heuristics are used by default to determine where the root of your repository is. You can see the heuristics in this MSBuild file's definition of the MSBuild RepoRoot property. It looks for files that are commonly found in the root of the repo. If the heuristics don't fit your repository, you can create an empty .RepoSrcRoot file in the top-level src folder of your repository.

Consolidate all NuGet packages

By default NuGet will expand packages to a directory beneath your solution directory. To get it to install packages to a sibling of your src directory instead, create a nuget.config file in the root of your repository with this content:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <config>
    <add key="repositorypath" value="packages" />
  </config>
</configuration>

readonlysourcetree's People

Contributors

aarnott 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.