Giter Site home page Giter Site logo

dcupreti / projectsimplifier Goto Github PK

View Code? Open in Web Editor NEW

This project forked from srivatsn/projectsimplifier

0.0 0.0 0.0 68 KB

Diff a given msbuild-based project with the default values that come from the .NET SDK

License: MIT License

C# 100.00%

projectsimplifier's Introduction

ProjectSimplifier

This is a tool that can be used to help with the conversion of old-style csprojs to ones based on the .NET SDK.

Build status

What does the tool do?

It loads up a given project and evaluates it to get a list of all properties and items. It then replaces the project in memory with a simple .NET SDK based template and then re-evaluates it. It does the second evaluation in the same project folder so that items that are automatically picked up by globbing will be known as well. It then produces a diff of the two states to identify the following:

  • Properties that can now be removed from the project because they are already implicitly defined by the SDK and the project had the default value.
  • Properties that need to be kept in the project either because they override the default or it's a property not defined in the SDK.
  • Items that can be removed because they are implicitly brought in by globs in the SDK
  • Items that need to be changed to the Update syntax because although they're brought by the SDK, there is extra metadata being added.
  • Items that need to be kept because theyr are not implicit in the SDK.

Usage:

From a VS 2017 Developer command prompt

ProjectSimplifier convert a.csproj -out:b.csproj

From a regular command prompt

ProjectSimplifier convert a.csproj -out:b.csproj -m:`<path to msbuild.exe>`

Caveats: If your project has custom imports, you might be changing semantics in a very subtle way by moving to the SDK and this tool doesnt know to find those cases.

projectsimplifier's People

Contributors

srivatsn avatar jbtule avatar dsplaisted 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.