Skip to content

Releases: 3F/MvsSln

2.7

29 Apr 21:02
@3F 3F
a00e3b3
Compare
Choose a tag to compare

MvsSln 2.7

NuGet 📦.nupkg
📑 What's new in 2.7 ...
  • NEW: Added default skeleton for SlnWriter in an attempt to make it easier to create from scratch.
    Empty .Write() methods will use it by default or merge it with the actual Map.

  • NEW: Added asynchronous metods* for SlnWriter
    *Both implementations including legacy netfx4.0 target platform, and async/await for modern.

  • NEW: Added SMap implementation to wrap ISlnResult.Map. More control over ISection and its handler.

  • NEW: Added LhDataHelper as an additional way to prepare default handlers from data (ISlnWhData).

LhDataHelper hdata = new();
hdata.SetHeader(SlnHeader.MakeDefault())
        .SetProjects(projects)
        .SetProjectConfigs(prjConfs)
        .SetSolutionConfigs(slnConf);

using SlnWriter w = new(solutionFile, hdata);

See related issue #61 for details.

  • NEW: Implemented CreateProjectsIfNotExist option for SlnWriter.
using SlnWriter w = new(solutionFile, hdata);
w.Options = SlnWriterOptions.CreateProjectsIfNotExist;
// it will write according ProjectType information (both legacy or sdk-style)
w.Write();

Use +IProjectsToucher to override implementation.
You can find complete example in #61

  • NEW: New modern LineBuilder to make creating new handlers easier or control EOL. Related issue #57.

  • NEW: Added DefaultHandlers wrapper to prepare all default according to ISlnResult(ISlnWhData).

  • NEW: SlnWriter: + WriteAsString() & WriteAsStringAsync() to save the result as string instead of file.

using SlnWriter w = new(handlers);
string data = await w.WriteAsStringAsync(sln.Result.Map);
  • NEW: Added platform independent IObjHandler.NewLine to specify the EOL for used w\handlers.
    +.UpdateNewLine() extension for a collection of handlers.

  • NEW: New modern IXProject.AddReference(.., AddReferenceOptions) to control everything for Reference nodes.
    Old signatures has been marked as obsolete and scheduled to be removed in future versions.

Default = HideEmbedInteropTypes | HideSpecificVersion,
DefaultResolve = Default | ResolveAssemblyName | OmitArchitecture | OmitCultureNeutral | ...
Mini = Default | HidePrivate,
MiniResolve = Mini | DefaultResolve | OmitCulture,

See related issue #61 for details.

  • NEW: SlnWriter now supports ISlnResult -> +ISlnWhData data to preapre default handlers itself.

  • NEW: Implemented overriding of GetHashCode/Equals for ImportElement, RoProperties, Projects.Item.

  • NEW: +IConfPlatform.IsEqualPair(IConfPlatform)

  • NEW: ProjectItem adds ability to generate a project name from a specified input path:
    slnDir\ProjectName\src.csproj -> ProjectName
    slnDir\ProjectName.csproj -> ProjectName

new ProjectItem(ProjectType.CsSdk, @$"{projName}\src.csproj", slnDir: baseDir)
  • FIXED: Fixed bug with a disappearing EndProject. See related #56

  • FIXED: Fixed duplicated lines when disabling some features through SlnItems.

  • FIXED: Fixed lines being ignored when handlers are not prepared.

  • FIXED: If the handler is not initialized as object, the corresponding entry is lost.

  • FIXED: Fixed PackageInfo == Equals for null.

  • CHANGED: SlnParser has been switched to UTF8 by default.

  • CHANGED: SlnWriter now will ignore W\handler that will return null value at IObjHandler.Extract().

  • CHANGED: Removed comparing of parent project and origin item in PropertyItem.Equals.

  • CHANGED: SlnHeader is sealed now with new ctors and added SlnHeader.MakeDefault().

  • CHANGED: ConfigPrj: new ctors +protected internal set for IncludeInBuild and IncludeInDeploy properties.

  • CHANGED: Projects.Item and PropertyItem:
    new ctors & renamed evaluatedValue, evaluatedInclude, unevaluatedValue, unevaluatedInclude
    Old access still is available but marked as obsolete and scheduled to be removed in future versions.

  • CHANGED: Updated path \ / logic between Windows and unix-like systems.

2.6.1

31 Jan 22:12
@3F 3F
8dd3956
Compare
Choose a tag to compare

NuGet package 📦 Download

📑 What's new in 2.6.1 ...
* FIXED: Incorrect project instances for the active solution configuration in XProject Environment.
         Related issue: https://github.com/3F/vsSolutionBuildEvent/issues/71

* FIXED: Fixed possible 'The path is not of a legal form.' when instantiating ProjectItem.

* NEW: Added .IsVc() extension method for ProjectItem objects.

* CHANGED: Updated logic for .IsSdk() extension method.
           Now it will use information from ProjectType when null or empty ProjectItem.fullPath.
           Otherwise, same logic from v2.5.3 described here:
           https://github.com/3F/MvsSln/blob/0ec96021b7/MvsSln/Extensions/ProjectItemExtension.cs#L59-L77                         

2.6

23 Aug 20:29
@3F 3F
f10c50c
Compare
Choose a tag to compare
2.6

NuGet package 📦 Download | What's new in 2.6:

packages.config support

using Sln l = new("Input.sln", SlnItems.AllNoLoad | SlnItems.PackagesConfig);

IPackageInfo found = l.Result.PackagesConfigs
                                .SelectMany(s => s.Packages)
                                .FirstOrDefault(p => p.Id.StartsWith("Microsoft."));
// found.MetaTFM ...

Version v = l.Result.PackagesConfigs.First().GetPackage("LX4Cnh")?.VersionParsed;
📑 Other changes in 2.6 ...
  • FIXED: Fixed CalculateHashCode() Extension.
    Internally affects many objects due to broken GetHashCode().

  • FIXED: Fixed SlnItems.ProjectDependenciesXml when empty input:
    Report #25 (comment)

  • NEW: packages.config support PR #30. Related issues #27, #28.
    To activate it, use the following flags:
    * PackagesConfig, PackagesConfigSolution, PackagesConfigLegacy.
    Including GetNuTool compatible packages, format:
    https://github.com/3F/GetNuTool#format-of-packages-list

  • NEW: Added HasValue and HasNothing properties in PropertyItem.

  • NEW: Added SlnItems.AllMinimal and SlnItems.AllNoLoad in addition to SlnItems.All.

  • NEW: Added IXProject.GetPackageReferences().

  • CHANGED: ConfigItem.Format() marked as obsolete.
    Use ToString() and IConfPlatform.Formatted instead.

2.5.3

23 Jul 18:45
@3F 3F
9ce5885
Compare
Choose a tag to compare
Public release. MvsSln 2.5.3

* FIXED: Fixed XProjectEnv. Issue #29
         XProjectByFile() can destroy original properties that was prepared for solution.
         Related WARN:
         `Project configuration is not found <- sln [Debug|Win32]`

* CHANGED: Improved init of blank ProjectItem for GetOrLoadProject() in XProjectEnv.
           Related issue #29.

* NEW: Added the following extensions for ProjectItem:

    * IsCs() - Checking both legacy `ProjectType.Cs` and modern `ProjectType.CsSdk` types.
    * IsFs() - Checking both legacy `ProjectType.Fs` and modern `ProjectType.FsSdk` types.
    * IsVb() - Checking both legacy `ProjectType.Vb` and modern `ProjectType.VbSdk` types.
    * IsSdk() - While ProjectType cannot inform the actual use of the modern Sdk style in projects,
                current method will try to detect this by using the extended logic:
                https://github.com/dotnet/project-system/blob/master/docs/opening-with-new-project-system.md

2.5.2

05 May 13:05
@3F 3F
cd39a8d
Compare
Choose a tag to compare
Public release. MvsSln 2.5.2

* NEW: Activating ProjectReferences for existing ProjectDependencies (shallow copy) through new flag.
       Issue #25.
        ```
        ProjectDependenciesXml = 0x0800 | ProjectDependencies | Env,
        ```
            Covers ProjectDependencies (SLN) logic using data from project files (XML).
            Helps eliminate miscellaneous units between VS and msbuild world:
            https://github.com/3F/MvsSln/issues/25#issuecomment-617956253
            Requires Env with loaded projects (LoadMinimalDefaultData or LoadDefaultData).

            A core feature in .NET DllExport Post-processing:
            https://github.com/3F/DllExport/pull/148

* NEW: `ProjectReference` support without obsolete projectguid. Issue #26.

* NEW: IXProject methods:
       ```
       +IXProject.GetFullPath(string relative)
       ```

* FIXED: Fixed possible empty records in SlnParser.SetProjectItemsConfigs.

* FIXED: Fixed `The given key was not present...` when different case for keys in Item.Metadata.

* FIXED: Fixed protected XProject GetProjectGuid() + GetProjectName() when empty property.

* CHANGED: Compatible signature update for `ForEach<T>` extension method:
           ```
           IEnumerable<T> ForEach<T>(this IEnumerable<T> items, Action<T> act)
           ```

* CHANGED: Updated Microsoft.CSharp 4.7.0 (Only for: netstandard2.0 + netcoreapp2.1)

* CHANGED: Updated Microsoft.Build 16.5.0 (Only for: netcoreapp2.1)

2.5.1

30 Jan 18:32
@3F 3F
389a2ab
Compare
Choose a tag to compare
Public release. MvsSln 2.5.1

* FIXED: Fixed NullReferenceException when empty xml nodes in PropertyItem through ProjectProperty.
         This is possible for global or environment properties, for example:
         ```
         GetProperty("Platform")
         GetProperty("Configuration")
         ```

* NEW: Added SDK based project types: .fsproj; .vbproj; .csproj
       https://github.com/dotnet/project-system/blob/master/docs/opening-with-new-project-system.md

* NEW: PropertyItem can now be safely compared between each other:
       ```
       new PropertyItem(...) == new PropertyItem(...)
       ```

* CHANGED: Updated package's tool hMSBuild 2.3

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

* CHANGED: Updated package's tool GetNuTool 1.8

           Release notes:
           https://github.com/3F/GetNuTool/releases/tag/1.8

* NOTE: You can also use high quality Visual Studio Project Icons together with MvsSln:
        https://twitter.com/GitHub3F/status/1219348325729816578

2.5

17 Oct 18:37
@3F 3F
1072a96
Compare
Choose a tag to compare
2.5
Public release. MvsSln 2.5

* FIXED: Fixed parallelism problems when using Sln wrapper.

* FIXED: Incorrect initialization for ProjectReferences class.

* NEW: Added .net core based target platforms: netcoreapp2.1. + netstandard2.0. Issue #11.

* NEW: Added netfx based target platforms: net472. PR #21.

* NEW: IXProject methods:
    ```
    +bool AddPackageReference(string id, string version, IEnumerable<KeyValuePair<string, string>> meta = null);
    +Item GetFirstPackageReference(string id);
    +bool RemovePackageReference(string id);
    ```

* CHANGED: EnvDTE features are obsolete now. Scheduled for removal in future major releases. Issue #22.

* CHANGED: MathExtension.CalculateHashCode now encapsulates GetHashCode() with null checking.

* CHANGED: Compatible signature changes for the following extension method:
    ```
    AddOrUpdate(this IDictionary<string, string> source, IEnumerable<KeyValuePair<string, string>> items)
    ```

* KNOWN: Various [ possible ] problems when using modern MSBuild assemblies.

        ! Solution and details in our wiki:
        https://github.com/3F/MvsSln/wiki/Advanced-Features

        Do not hesitate to contact: https://github.com/3F/MvsSln/issues

* NOTE: Discuss the planned v3.0 and its major changes:
        https://github.com/3F/MvsSln/milestone/4

v2.4

10 Aug 12:35
@3F 3F
a3694d5
Compare
Choose a tag to compare
Public release of the MvsSln 2.4

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

CI-build-50

07 Aug 20:12
@3F 3F
bb41888
Compare
Choose a tag to compare
CI-build-50 Pre-release
Pre-release

🎲 Nightly build of bb41888 ➾ Worker image: Visual Studio 2017; Console: ci.appveyor.com/.../build-50

Only for tests 🗨 Commit message:

Fixes #19

+updated tests

CI-build-49

04 Aug 18:05
@3F 3F
7d7fb00
Compare
Choose a tag to compare
CI-build-49 Pre-release
Pre-release

🎲 Nightly build of 7d7fb00 ➾ Worker image: Visual Studio 2017; Console: ci.appveyor.com/.../build-49

Only for tests 🗨 Commit message:

Merge pull request #17 from 3F/support/vssbe/pr53

XProjectEnv base, MSBuild Properties helpers, and other relevant changes due to integration with vsSolutionBuildEvent