microsoft / slow-cheetah

Tooling for XML and JSON file transforms on build from Visual Studio and MSBuild
Other
323 stars 67 forks source link

Microsoft.VisualStudio.SlowCheetah NuGet package should be marked as a development-only dependency #113

Closed sean-rose closed 6 years ago

sean-rose commented 6 years ago

The Microsoft.VisualStudio.SlowCheetah NuGet package is not currently marked as a development-only dependency, so if a project using that package is itself being packaged then SlowCheetah will be included as a dependency unless the project's SlowCheetah package reference is manually designated as a development-only dependency by adding developmentDependency="true" for packages.config or <PrivateAssets>all</PrivateAssets> for newer SDK-style projects.

It would be better if the SlowCheetah package were marked as a development-only dependency by default by having <developmentDependency>true</developmentDependency> in the package metadata, and since NuGet/Home#4694 has been resolved it would be easy to implement.

StingyJack commented 6 years ago

I don't want it marked as dev dependency, I want to use xdt transformations in a program, not just as build time.

I already have to reference the assembly manually as the package doesnt have a lib folder and only adds statements.

I would think that nuget bringing it into a project when its only referenced by targets is a problem with NuGet.

sean-rose commented 6 years ago

@StingyJack Marking the SlowCheetah NuGet package as a development-only dependency shouldn't affect what you're doing. That setting would only apply when creating NuGet packages from projects which reference SlowCheetah, or as the docs say it would "prevent the [SlowCheetah] package from being included as a dependency in other packages."

That aside, SlowCheetah is specifically for doing config transformations at build time (as you found it's packaged as a tool, not a library) so I'd think something like Microsoft.Web.Xdt might work better for your use case of doing transformations at run time.

CZEMacLeod commented 6 years ago

@sean-rose @davilimap I also use Xdt in my application. Is Microsoft.Web.Xdt on GitHub now or is it internal to Microsoft. The nuget package was update 3 months ago, but the project URL is https://xdt.codeplex.com/ and the description has a link to https://msdn.microsoft.com/en-us/library/dd465326.aspx?f=255&MSPPError=-2147217396 which seems to be over 5 years old! Is the documentation (going to be) moved to the new docs.microsoft.com? Where are the release notes and changes for the last update?

sean-rose commented 6 years ago

@CZEMacLeod I don't know about the Microsoft internal stuff, but I compared the recent Microsoft.Web.Xdt 2.1.2 package with the previous 2.1.1 package and it looks like it's mainly just metadata changes:

I also compared the disassembled code, and while there are some differences they look functionally equivalent, so I think maybe that's just a newer compiler making slightly different optimizations.