Giter Site home page Giter Site logo

slntools's Introduction

SLNTools

I helpful utility for managing Visual Studio solutions.

Key features include:

  • Merging 2 solution files
  • Maintaining subsets of a solution file from a master solution file

Requirements to build only:

  • Framework 4.0.
  • Start "SLNTools.BuildReleaseVersion.cmd", the result will be put in the "bin\Release" subfolder.

Requirements to build/modify:

  • Visual Studio 2010
  • Wix Toolset v3.5 (http://wix.codeplex.com/releases/view/60102), although its only used to modify the properties of the WiX projet. The project itself is build using the WiX binaries that has been included in the solution.

slntools's People

Contributors

christianwarren avatar jabpe avatar mtherien avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

slntools's Issues

Switch to Mercurial

Consider switching the source code repository to Mercurial. It makes it easier for people to contribute to the project.

This work item was migrated from CodePlex

CodePlex work item ID: '6839'
Vote count: '1'

Service Fabric projects cause NullReferenceException

When trying to create a filter for a solution containing Service Fabric projects (*.sfproj), when I check the checkbox next to such a project, an exception is thrown from Project.Dependencies:

System.NullReferenceException: Object reference not set to an instance of an object.
at CWDev.SLNTools.Core.Project.<get_Dependencies>d__f.MoveNext()
at CWDev.SLNTools.Core.Filter.FilterFile.AddRecursiveDependenciesToList(List`1 includedProjects, Project project)
at CWDev.SLNTools.Core.Filter.FilterFile.ApplyOn(SolutionFile original)
at CWDev.SLNTools.UIKit.CreateFilterForm.UpdateTreeView()
at CWDev.SLNTools.UIKit.CreateFilterForm.m_treeview_AfterCheck(Object sender, TreeViewEventArgs e)

The same exception happens if I edit the slnfilter file by hand, add an appropriate <ProjectToKeep> element and try to invoke "Create Filtered Solution Only" from the shell context menu.

Possibility to refresh the .sln from slnfilter context menu (explorer) without starting VisualStudio

Thanks for this great tool.
We use it to merge our SLN and also to filter our project while working in Blend.
 
It would be great if there was command in explorer context menu to generate the .SLN from the .slnfilter without starting VS.
Then we can open blend and open the SLN, without having to load VS everytime I want to modify the filter.

This work item was migrated from CodePlex

CodePlex work item ID: '3087'
Vote count: '1'

CWDev.SLNTools.Core.Project.FullPath throws ArgumentNullException

public string FullPath
{
get { return Path.Combine(Path.GetDirectoryName(m_container.SolutionFullPath), m_relativePath); }

}
 
in some cases, member variable m_container is null.
that's the reason why ArgumentNullException is thrown, when it refers to the m_containers.SolutionFullPath.
 
Even FullPath is not working, RelativePath returns a valid value.
Maybe you can reconstruct a right value of FullPath using the value of RelativePath.

This work item was migrated from CodePlex

CodePlex work item ID: '5219'
Vote count: '1'

GlobalSection(TeamFoundationVersionControl) doesn't always has solution SccLocalPath in index 0

The HandleVersionControlLines function in the SolutionFileReader uses the Regex ms_regexParseVersionControlName, which implicitly assumes that the SccLocalPath0 always holds the SccLocalPath for the solution itself. However, our VS2010 has put the solution's SccLocalPath at the bottom, resulting in the exeption "Missing property 'SccProjectUniqueName' for the element #{0} in the global section '{1}'.\nFound: Nothing.\nExpected: A property with the name 'SccProjectUniqueName{0}'." for that SccLocalPath. along with it, it won't read the first project (index 0), because the Regex doesn't match that at all. Attached solution was created by VS2010 after re-binding the solution to source control.

Attachments

IHCProducts.sln

This work item was migrated from CodePlex

CodePlex work item ID: '6355'
Vote count: '1'

When trying to Merge or Compare to files I get an error when processing the second solution file.

Here is the message I get:
 
"CWDev.SLNTools.Core.SolutionFileException: Invalid value for the property 'SccProjectUniqueName93' of the global section 'TeamFoundationVersionControl'.\nFound: Suite\UI\WebControls\WCSFControls\WCSFControls.csproj\nExpected: A value equal to the field 'RelativePath' of one of the projects in the solution.\r\n at CWDev.SLNTools.Core.SolutionFileReader.HandleVersionControlLines(String name, String type, String step, List`1 propertyLines) in C:\Users\f kent\Documents\Visual Studio 2008\Projects\SLN Tool\Main\CWDev.SLNTools.Core.dll\SolutionFileReader.cs:line 374\r\n at CWDev.SLNTools.Core.SolutionFileReader.ReadGlobalSection(String firstLine) in C:\Users\f kent\Documents\Visual Studio 2008\Projects\SLN Tool\Main\CWDev.SLNTools.Core.dll\SolutionFileReader.cs:line 238\r\n at CWDev.SLNTools.Core.SolutionFileReader.ReadGlobal() in C:\Users\f kent\Documents\Visual Studio 2008\Projects\SLN Tool\Main\CWDev.SLNTools.Core.dll\Soluti
onFileReader.cs:line 168\r\n at CWDev.SLNTools.Core.SolutionFileReader.ReadSolutionFile() in C:\Users\f kent\Documents\Visual Studio 2008\Projects\SLN Tool\Main\CWDev.SLNTools.Core.dll\SolutionFileReader.cs:line 75\r\n at CWDev.SLNTools.Core.SolutionFile.FromFile(String solutionFullPath) in C:\Users\f kent\Documents\Visual Studio 2008\Projects\SLN Tool\Main\CWDev.SLNTools.Core.dll\SolutionFile.cs:line 39\r\n at CWDev.SLNTools.CompareSolutionsCommand.Run(String[] args, MessageBoxErrorReporter reporter) in C:\Users\f kent\Documents\Visual Studio 2008\Projects\SLN Tool\Main\SLNTools.exe\CompareSolutionsCommand.cs:line 56\r\n at CWDev.SLNTools.Program.Main(String[] args) in C:\Users\f kent\Documents\Visual Studio 2008\Projects\SLN Tool\Main\SLNTools.exe\Program.cs:line 114"
 
I am beginning to debug this but any known issues/ fixes would be great.

This work item was migrated from CodePlex

CodePlex work item ID: '4625'
Vote count: '1'

error reading Visual Studio 2013 .sln files

I'm using SLNTools.Core 1.1.1. When I try to read a Visual Studio 2013 .sln files, I get this error:

unable to read solution files with:
Additional information: Invalid line read on line #4.
Found: VisualStudioVersion = 12.0.20827.3
Expected: A line beginning with 'Project(' or 'Global'.

Visual Studio adds a couple of additional headers:
Visual Studio 2013
VisualStudioVersion = 12.0.20827.3
MinimumVisualStudioVersion = 10.0.40219.1

As a workaround, I've been deleting those properties manually, but it would be cool to not have to do that.

btw, I just uploaded the binary to NuGet, because it wasn't there.
http://www.nuget.org/packages/SLNTools.Core/

Attachments

fix_read_vs2013.diff

This work item was migrated from CodePlex

CodePlex work item ID: '7650'
Vote count: '2'

Exception thrown on duplicate sections

Some SLN files can have duplicate sections. For example I encountered one with two copies of:
 
GlobalSection(SubversionScc) = preSolution
Svn-Managed = True
Manager = AnkhSVN - Subversion Support for Visual Studio
EndGlobalSection

 
Currently (r69120) this results in an ArgumentException. It would be useful if the tool could deal this.
 
(I am not sure how the solution file ended up with duplicate sections, but VS2010 will open such a SLN file.)

This work item was migrated from CodePlex

CodePlex work item ID: '6965'
Vote count: '1'

CreateFilterForm.SaveAs directory name comparison issue

First of all, thanks so much for sharing this tool - I was just about to write some custom code to do this, when I found your project.
 
Unfortunately I'm not able to use the tool to create a filter file. Here's the problem and the fix:
 
CreateFilterForm.SaveAs compares the directory names and fails with a message, "Filter file need to be in the same folder as the source solution." For some reason the drive letter is uppercase on one side of the comparison and lowercase in the other side (I'm not sure why, and haven't tried to diagnose).
 
The fix is to use a case-insensitive comparison, which should be safe since the Windows file system is case insensitive:
 
string.Equals(Path.GetDirectoryName(Path.GetFullPath(fileDialog.FileName)), Path.GetDirectoryName(Path.GetFullPath(m_filterFile.SourceSolutionFullPath)), StringComparison.InvariantCultureIgnoreCase)
 
I'd be happy to join as a contributor if you'd like me to fix this directly. For now I've made this change locally in my own copy.
 

Keith Brown, CTO Pluralsight

This work item was migrated from CodePlex

CodePlex work item ID: '6218'
Vote count: '1'

Feature idea: auto-including related projects based on convention

In several projects I work on there are certain groups of projects, which are logically related but do not necessarily have references in msbuild sense.
Example:

SomeProject
SomeProject.Tests
SomeProject.IntegrationTests
SomeProject.UiTests
SomeProject.Contracts

It would be useful if SLNTools could be configured to automatically include logical "child" projects based on naming conventions (so, in the above example, if I selected SomeProject in the slnfilter the filtered solution would contain all SomeProject.* projects).

Reading solutions with whitespace throws SolutionFileException

Hello,

I'm currently using SLNTools to manage my branches. Recently we hit an issue with an empty line. The solution file is valid, but leads to the following exception:

I looked at the file, and found there is a line of whitespace at line 1079, and confirmed that removing the line of whitespace resolves the issue.

Is there a reason to consider empty lines invalid, or would it be safe to adjust the check to ignore empty lines?

Thanks!

Attachments

SLNTools.sln

This work item was migrated from CodePlex

CodePlex work item ID: '8069'
Vote count: '1'

Support environment variables in reference paths

In .sln file you can use env variables: %MYVAR%\x\y\y.csproj

Or in .csproj file: $(MYVAR)\x\y\y.csproj

This is not supported by application, it will cause exception while resolving dependencies during CreateFilterFileFromSolution.

This work item was migrated from CodePlex

CodePlex work item ID: '8016'
Vote count: '1'

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.