Giter Site home page Giter Site logo

themotleyfool / slimjim Goto Github PK

View Code? Open in Web Editor NEW
26.0 53.0 16.0 2.42 MB

Visual Studio solution file generator. Generates solution file based on a root project, and pulls in all projects which have a reference to the root, as well as all of its own dependencies.

License: MIT License

C# 98.61% Smalltalk 1.39%

slimjim's Issues

FindProjectByProjectGuid issue

Hi,

I really like SlimJim. It greatly improved my development process.
Unfortunately I noticed a problem on a new Solution today:
In one of my .csproj files another project is referenced as

{21a04d4a-9152-4e90-9570-4380eda479b4}

while the project guid in the referenced project is

{21A04D4A-9152-4E90-9570-4380EDA479B4}

Because SlnBuilder.FindProjectByProjectGuid uses an '==' comparison, this project is not included in the generated sln. I changed the code to

return projectsList.Find(csp => string.Equals(csp.Guid, projectGuid, StringComparison.OrdinalIgnoreCase));

and now it is fine.

Setup .nuget automatically

Add a switch that will:

  1. Create $(SolutionDirectory)/.nuget
  2. Download nuget.exe into .nuget/
  3. Download NuGet.targets into .nuget/

NullReferenceException if ProjectReference is missing Guid

Some of my .csproj files don't have a guid in the ProjectReference

<ProjectReference Include="Whereever\Whatever.csproj">
  <Name>Whatever</Name>
</ProjectReference>

That causes SlimJim to crash:

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at SlimJim.Infrastructure.CsProjReader.<ReadReferencedProjectGuids>b__5(XElement pr) in c:\Users\jd.brennan\src\SlimJim\src\SlimJim\Infrastructure\CsProjReader.cs:line 66
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at SlimJim.Infrastructure.CsProjReader.ReadReferencedProjectGuids(XElement xml) in c:\Users\jd.brennan\src\SlimJim\src\SlimJim\Infrastructure\CsProjReader.cs:line 65
   at SlimJim.Infrastructure.CsProjReader.Read(FileInfo csProjFile) in c:\Users\jd.brennan\src\SlimJim\src\SlimJim\Infrastructure\CsProjReader.cs:line 25
   at SlimJim.Infrastructure.CsProjRepository.<ReadProjectFilesIntoCsProjObjects>b__0(FileInfo f) in c:\Users\jd.brennan\src\SlimJim\src\SlimJim\Infrastructure\CsProjRepository.cs:line 50
   at System.Collections.Generic.List`1.ConvertAll[TOutput](Converter`2 converter)
   at SlimJim.Infrastructure.CsProjRepository.ReadProjectFilesIntoCsProjObjects(List`1 files) in c:\Users\jd.brennan\src\SlimJim\src\SlimJim\Infrastructure\CsProjRepository.cs:line 50
   at SlimJim.Infrastructure.CsProjRepository.LookupCsProjsFromDirectory(SlnGenerationOptions options) in c:\Users\jd.brennan\src\SlimJim\src\SlimJim\Infrastructure\CsProjRepository.cs:line 23
   at SlimJim.SlnFileGenerator.GenerateSolutionFile(SlnGenerationOptions options) in c:\Users\jd.brennan\src\SlimJim\src\SlimJim\SlnFileGenerator.cs:line 27
   at SlimJim.SlimJimMain.Main(String[] args) in c:\Users\jd.brennan\src\SlimJim\src\SlimJim\SlimJimMain.cs:line 31

Output solution file contains 2 leading blank lines

This unfortunately breaks building of this solution file using msbuild (outside of visual studio) with the following error:
"Solution file error MSB5010: No file format header found."

Removing the leading blank lines fixes this.

Convert/Unconvert package hintpaths

The -c and -u switches should modify package hintpaths like ..\packages\foo to point to the packages directory relative to the solution being generated.

This will allow package restore to work correctly.

When unconverting, the default $(SolutionDir) in each csproj should be used to change the hint paths back.

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.