Skip to content

Commit

Permalink
Public release of the MvsSln 2.4
Browse files Browse the repository at this point in the history
* FIXED: "The format ... of configuration is not supported". Issue #19.

* FIXED: Fixed loading of projects via `IsolatedEnv.LoadProjects()`.

* FIXED: Fixed possible NullReferenceException in `ProjectItem` constructors.

* NEW: Introduces XProjectEnv. PR #17.
       An splitted IsolatedEnv as the base but without IDisposable.
    ```
    IXProjectEnv slnEnv;
    ...
    slnEnv = new XProjectEnv(sln, properties);
    ...
    slnEnv = new IsolatedEnv(sln); // +IEnvironment, +IDisposable
    slnEnv.Assign();
    ...
    ((IDisposable)slnEnv)?.Dispose();
    ```

* NEW: Added `PropertyNames` type. Regular MSBuild Properties and related.

* NEW: Added `FileExt` type for work with `ProjectType` via its file only.

* NEW: Added `Kinds` type: PRJ_UNLOADED; PRJ_SLN_DIR

* NEW: New extension methods:
    ```
    +TVal GetOrDefault<TKey, TVal>(this IDictionary<TKey, TVal> data, TKey key, TVal def)
    +bool IsEqual(this Project a, Project b)
    +string GetSolutionDir(this Project eProject)
    +string GetProjectRelativePath(this Project eProject)
    +string GetConfig(this Project eProject)
    +string GetPlatform(this Project eProject)
    +string GetSolutionExt(this Project eProject)
    string GetDirectoryFromFile(this string file)
    Dictionary<string, string> GetFileProperties(this string file)
    IDictionary<string, string> AddOrUpdate(this IDictionary<string, string> source, IDictionary<string, string> items)
    bool Remove<T>(this IList<T> src, T elem, Func<T, T, bool> comparer)
    bool IsLimEqual(this IXProject x, IXProject prj)
    ```

* CHANGED: Removed pGuid checking from `IXProjectEnv.GetOrLoadProject()`
           Related to Issue #18.

* CHANGED: ISlnResult changes:
    ```
    +`string SolutionFile`
        Full path to an solution file.
        Old versions still can address it through Properties.
    ```

* CHANGED: IConfPlatform changes:
    ```
    +`bool IsEqualByRule(string config, string platform, bool icase = false);`
        Checking an config/platform by using {Rule} instance.
    ```

* CHANGED: IXProjectEnv (IEnvironment) changes:
    ```
    +`IXProject XProjectByFile(...);`
        Find project by full path to file.

    +`IEnumerable<IXProject> Assign(IEnumerable<Project> projects = null);`
        Assign an existing `Microsoft.Build.Evaluation.Project` instances for local collection.

    +`IXProject AddOrGet(Project project);`
        Adds `Microsoft.Build.Evaluation.Project` instance into IXProject collection if it does not exist.

    +`ProjectItemCfg ExtractItemCfg(Project project);`
        Prepares data from `Microsoft.Build.Evaluation.Project` instance.

    +`void UnloadAll(bool throwIfErr = true);`
        Unloads all evaluated projects at current time.

    +`bool Unload(IXProject xp);`
        Unloads specified project.

    +`IEnumerable<Project> ValidProjects`
        List of valid projects such as something except `.user`,`.metaproj` but contains FirstChild / LastChild XML node.
    ```

* CHANGED: Updated package's tool hMSBuild 2.2

           Release notes:
           https://github.com/3F/hMSBuild/releases/tag/v2.2

* NOTE: The most 2.4 changes is relevant to integration with vsSolutionBuildEvent.

        https://twitter.com/GitHub3F/status/1158091930309398528
        3F/vsSolutionBuildEvent#53
        #17

        Find any relevant use of the new features in that project.
  • Loading branch information
3F committed Aug 10, 2019
1 parent bb41888 commit a3694d5
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.0
2.4.0
2 changes: 1 addition & 1 deletion MvsSln/MvsSlnVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public struct MvsSlnVersion
{
public static readonly Version number = new Version(S_NUM_REV);

public const string S_NUM = "2.3.0";
public const string S_NUM = "2.4.0";
public const string S_REV = "0";

public const string S_NUM_REV = S_NUM + "." + S_REV;
Expand Down
12 changes: 6 additions & 6 deletions MvsSlnTest/MvsSlnTest.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.props')" />
<Import Project="..\packages\MSTest.TestAdapter.1.4.0\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.1.4.0\build\net45\MSTest.TestAdapter.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand Down Expand Up @@ -48,10 +48,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.1.1.11\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
<HintPath>..\packages\MSTest.TestFramework.1.4.0\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.1.1.11\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
<HintPath>..\packages\MSTest.TestFramework.1.4.0\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down Expand Up @@ -114,8 +114,8 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets'))" />
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.4.0\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.4.0\build\net45\MSTest.TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.4.0\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.4.0\build\net45\MSTest.TestAdapter.targets'))" />
</Target>
<Import Project="..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets')" />
<Import Project="..\packages\MSTest.TestAdapter.1.4.0\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.1.4.0\build\net45\MSTest.TestAdapter.targets')" />
</Project>
4 changes: 2 additions & 2 deletions MvsSlnTest/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MSTest.TestAdapter" version="1.1.11" targetFramework="net45" />
<package id="MSTest.TestFramework" version="1.1.11" targetFramework="net45" />
<package id="MSTest.TestAdapter" version="1.4.0" targetFramework="net45" />
<package id="MSTest.TestFramework" version="1.4.0" targetFramework="net45" />
</packages>
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![](https://raw.githubusercontent.com/3F/MvsSln/master/MvsSln/Resources/MvsSln_v1_96px.png)](https://github.com/3F/MvsSln)

🧩 Customizable VisualStudio .sln parser, complex support of the projects (.vcxproj, .csproj., …), lightweight r/w handlers at runtime, and more.
🧩 Customizable VisualStudio .sln parser, Complex support of the projects (.vcxproj, .csproj., …), Pluginable lightweight r/w handlers at runtime, and more

[![Build status](https://ci.appveyor.com/api/projects/status/if1t4rhhntpf6ut3/branch/master?svg=true)](https://ci.appveyor.com/project/3Fs/mvssln/branch/master)
[![release-src](https://img.shields.io/github/release/3F/MvsSln.svg)](https://github.com/3F/MvsSln/releases/latest)
Expand Down
103 changes: 100 additions & 3 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,103 @@
- - - -
MvsSln :: https://github.com/3F/MvsSln
_ _ _ _
MvsSln - https://github.com/3F/MvsSln
_ _ _ _


[v2.4] 2019.08.10

* FIXED: "The format ... of configuration is not supported". Issue #19.

* FIXED: Fixed loading of projects via `IsolatedEnv.LoadProjects()`.

* FIXED: Fixed possible NullReferenceException in `ProjectItem` constructors.

* NEW: Introduces XProjectEnv. PR #17.
An splitted IsolatedEnv as the base but without IDisposable.
```
IXProjectEnv slnEnv;
...
slnEnv = new XProjectEnv(sln, properties);
...
slnEnv = new IsolatedEnv(sln); // +IEnvironment, +IDisposable
slnEnv.Assign();
...
((IDisposable)slnEnv)?.Dispose();
```

* NEW: Added `PropertyNames` type. Regular MSBuild Properties and related.

* NEW: Added `FileExt` type for work with `ProjectType` via its file only.

* NEW: Added `Kinds` type: PRJ_UNLOADED; PRJ_SLN_DIR

* NEW: New extension methods:
```
+TVal GetOrDefault<TKey, TVal>(this IDictionary<TKey, TVal> data, TKey key, TVal def)
+bool IsEqual(this Project a, Project b)
+string GetSolutionDir(this Project eProject)
+string GetProjectRelativePath(this Project eProject)
+string GetConfig(this Project eProject)
+string GetPlatform(this Project eProject)
+string GetSolutionExt(this Project eProject)
string GetDirectoryFromFile(this string file)
Dictionary<string, string> GetFileProperties(this string file)
IDictionary<string, string> AddOrUpdate(this IDictionary<string, string> source, IDictionary<string, string> items)
bool Remove<T>(this IList<T> src, T elem, Func<T, T, bool> comparer)
bool IsLimEqual(this IXProject x, IXProject prj)
```

* CHANGED: Removed pGuid checking from `IXProjectEnv.GetOrLoadProject()`
Related to Issue #18.

* CHANGED: ISlnResult changes:
```
+`string SolutionFile`
Full path to an solution file.
Old versions still can address it through Properties.
```

* CHANGED: IConfPlatform changes:
```
+`bool IsEqualByRule(string config, string platform, bool icase = false);`
Checking an config/platform by using {Rule} instance.
```

* CHANGED: IXProjectEnv (IEnvironment) changes:
```
+`IXProject XProjectByFile(...);`
Find project by full path to file.

+`IEnumerable<IXProject> Assign(IEnumerable<Project> projects = null);`
Assign an existing `Microsoft.Build.Evaluation.Project` instances for local collection.

+`IXProject AddOrGet(Project project);`
Adds `Microsoft.Build.Evaluation.Project` instance into IXProject collection if it does not exist.

+`ProjectItemCfg ExtractItemCfg(Project project);`
Prepares data from `Microsoft.Build.Evaluation.Project` instance.

+`void UnloadAll(bool throwIfErr = true);`
Unloads all evaluated projects at current time.

+`bool Unload(IXProject xp);`
Unloads specified project.

+`IEnumerable<Project> ValidProjects`
List of valid projects such as something except `.user`,`.metaproj` but contains FirstChild / LastChild XML node.
```

* CHANGED: Updated package's tool hMSBuild 2.2

Release notes:
https://github.com/3F/hMSBuild/releases/tag/v2.2

* NOTE: The most 2.4 changes is relevant to integration with vsSolutionBuildEvent.

https://twitter.com/GitHub3F/status/1158091930309398528
https://github.com/3F/vsSolutionBuildEvent/pull/53
https://github.com/3F/MvsSln/pull/17

Find any relevant use of the new features in that project.


[v2.3] 2019.06.17

Expand Down
8 changes: 4 additions & 4 deletions tools/MvsSln.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>MvsSln</id>
<version>2.3.0</version>
<version>2.4.0</version>
<title>[ MvsSln ] Customizable VisualStudio .sln parser, projects, r/w handlers at runtime</title>
<authors>github.com/3F/MvsSln</authors>
<license type="file">License.txt</license>
Expand All @@ -14,7 +14,7 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>

Customizable VisualStudio .sln parser, complex support of the projects (.vcxproj, .csproj., …), lightweight r/w handlers at runtime, and more.
Customizable VisualStudio .sln parser, Complex support of the projects (.vcxproj, .csproj., …), Pluginable lightweight r/w handlers at runtime, and more

1. 🌌 We're providing most convenient work with projects, their dependencies, their lazy loading, any folders, any items, references, and lot of other important things.
2. 💡 We're customizable and extensible library at runtime. Make [your custom] .sln for everything!
Expand All @@ -33,15 +33,15 @@
~~~~~~~~
Get it via GetNuTool:
==========================================
gnt /p:ngpackages="MvsSln/2.3.0"
gnt /p:ngpackages="MvsSln/2.4.0"
==========================================
* https://github.com/3F/GetNuTool

Build info:
{build_info}

</description>
<summary>Customizable VisualStudio .sln parser, complex support of the projects (.vcxproj, .csproj., …), lightweight r/w handlers at runtime, and more. - https://github.com/3F/MvsSln</summary>
<summary>Customizable VisualStudio .sln parser, Complex support of the projects (.vcxproj, .csproj., …), Pluginable lightweight r/w handlers at runtime, and more - https://github.com/3F/MvsSln</summary>
<tags>sln visualstudio parser sln-parser projects sln-files csproj vcxproj visual-studio VS2019 VS2017 VS2015 VS2013 VS2012 VS2010 msbuild GetNuTool hMSBuild MvsSln</tags>
<releaseNotes> changelog: https://github.com/3F/MvsSln/blob/master/changelog.txt </releaseNotes>
<copyright>Copyright (c) 2013-2019 Denis Kuzmin [entry.reg@gmail.com] GitHub/3F </copyright>
Expand Down

0 comments on commit a3694d5

Please sign in to comment.