nil4 / dotnet-transform-xdt

Modern .NET tools and library for XDT (Xml Document Transformation)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nice but

olivier-voutat opened this issue · comments

I suggest creating an installer (with framework 462 for an exe) instead of a nuget package.

Two reasons:

  1. Install once, and allow all applications to use it is easier
  2. if the application is aspnet core with framework, it is not compatible
commented

Thank you for your feedback, @olivier-voutat; that's an interesting suggestion.

It looks like it will soon be possible to install tools like dotnet-transform-xdt globally, and call them as if they were executables (details here and here). I think this would cover your first use case without giving up on cross-platform advantages. As the global tool support is still being actively developed, I plan to evaluate it in more depth once it stabilizes (likely after .NET Core 2.1 is released).

The current dotnet-transform-xdt tool works fine in an ASP.NET Core application targeting the full .NET framework. You can test this by cloning the samples repository and changing e.g. the WebServerSettingsSample.csproj file from:

<TargetFramework>netcoreapp2.0</TargetFramework>

to

<TargetFramework>net462</TargetFramework>

Run dotnet restore, then dotnet publish -c Release, and the tool will be invoked to transform Web.config. I hope this helps.

It is what I did. And I put the exe in my C:\Program Files\dotnet folder (in the TFS agents servers too). So no need to have it in all the projects.

commented

Glad to hear that you found a workaround.

I will close this issue and open one to track making dotnet-transform-xdt available as a global tool.

commented

@olivier-voutat a preview version of the .NET CLI global tool is now available; details here.

A standalone executable for .NET 4.6.1 or later is also produced on every AppVeyor build: https://ci.appveyor.com/project/nil4/dotnet-transform-xdt/build/artifacts