Giter Site home page Giter Site logo

cake.xdttransform's Introduction

Hi there πŸ‘‹

My name is Jamie Phillips and I try to be involved in the community through creating content, contributing to open source, and participating on Twitter. Please reach out if you would like to chat!

Find me on the 🌎:

  • Contributing on: GitHub

  • Creating content on: Blog or YouTube

Sponsor me:

cake.xdttransform's People

Contributors

adaskothebeast avatar anlau avatar augustoproiete avatar daghb avatar gep13 avatar gitfool avatar ikoshelev avatar jericho avatar kcamp avatar nils-a avatar pascalberger avatar phillipsj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cake.xdttransform's Issues

Problem with new version

@phillipsj, There is a problem with latest version of addin.

I switched back to last working version to get rid of this.

Downloading NuGet.exe...
Installing Cake...
Running build script...
Analyzing build script...
Processing build script...
Installing tools...
Installing addins...
Compiling build script...
Error: Error occurred when compiling build script: (2595,161): error CS0234: The type or namespace name 'XmlTransform' does not exist in the namespace 'Microsoft.Web' (are you missing an assembly reference?)
(2597,5): error CS0012: The type 'IXmlTransformationLogger' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Web.XmlTransform, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
C:/Program Files (x86)/Jenkins/workspace/p-IRFHJPK7H7/common.cake(124,21): warning CS0168: The variable 'ex' is declared but never used

v0.17.0 uses Cake core version 0.32.1, not 0.33.0 as announced

There seems to be a discrepancy between what is announced (using Cake core 0.33.0) and what is actually referenced in the source.

packages.config on the master branch says

<?xml version="1.0" encoding="utf-8"?>
<packages>
    <package id="Cake" version="0.32.1" />
</packages>

Add documentation to aliases

If you go ahead and add some documentation to your aliases, include examples of how things work, you can then make a PR to this repo:

https://github.com/cake-build/website

to get your Addin added to the official documentation on CakeBuild.net.

I recently did this for my Addin:

https://github.com/gep13/Cake.Gitter

and you can see my PR here:

cake-build/website#12

and here is an example of the documentation that I added to my addin:

gep13/Cake.Gitter@8ad4340

This is a great addin to be added to the collection πŸ‘

Error "Could not load file or assembly 'DotNet.Xdt.resources'"

When running XdtTransform from inside build.cake, I get this error message:

Resolving assembly DotNet.Xdt.resources, Version=2.1.1.0, Culture=en-US, PublicKeyToken=null
Exception while resolving assembly DotNet.Xdt.resources: Could not load file or assembly 'DotNet.Xdt.resources' or one of its dependencies. The system cannot find the file specified.

Using latest version 0.17.0 from nuget.org

upgrade cake.xdttransform to cake.core 0.26.0

The current nuget available for Cake.XdtTransform is breaking after yesterday's Cake.Core upgrade to 0.26.0.
Getting the following error:

Error: The assembly 'Cake.XdtTransform, Version=0.10.0.0, Culture=neutral, PublicKeyToken=null'
is referencing an older version of Cake.Core (0.22.0).
This assembly need to reference at least Cake.Core version 0.26.0.
Another option is to downgrade Cake to an earlier version.
It's not recommended, but you can explicitly opt-out of assembly verification
by configuring the Skip Verification setting to true
(i.e. command line parameter "--settings_skipverification=true",
environment variable "CAKE_SETTINGS_SKIPVERIFICATION=true",
read more about configuration at https://cakebuild.net/docs/fundamentals/configuration)

Recommended changes resulting from automated audit

We performed an automated audit of your Cake addin and found that it does not follow all the best practices.

We encourage you to make the following modifications:

  • You are currently referencing Cake.Core 0.26.0. Please upgrade to 0.28.0
  • The Cake.Core reference should be private. Specifically, your addin's .csproj should have a line similar to this: <PackageReference Include="Cake.Core" Version="0.28.0" PrivateAssets="All" />
  • Your addin should target netstandard2.0. Please note that there is no need to multi-target, netstandard2.0 is sufficient.

Apologies if this is already being worked on, or if there are existing open issues, this issue was created based on what is currently published for this package on NuGet.org and in the project on github.

Would it be possible to use the Cake Contrib Icon for your NuGet Package?

Thanks again for creating this Cake Addin, we really appreciate the effort that you have put in to creating it.

We, the Cake Team, recently announced a new Cake Contrib Icon, details of which can be found here:

http://cakebuild.net/blog/2017/06/new-cake-contrib-icon

Would you consider changing the nuspec file for your NuGet Package to use this new Cake Contrib Icon? If so, the recommended URL to use is:

https://cdn.rawgit.com/cake-contrib/graphics/a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png

Details of the above URL can be found in the repository here:

https://github.com/cake-contrib/graphics

Please let me know if you have any questions.

Fix FluentAssertions usages in current tests

There are a number of usages of .Equals(..) in the fluent method chains in various tests that are incorrect - they trigger no assertion and are flagged as "return value .. never used".

Issues identified exist in
XdtTransformationTests, XdtTransformationLogTests, XdtTransformationLogEntryTests

These should more correctly invoke the .Be(...) (or equivalent) method that are extending off their respective assertion type, resulting in the correct Assert.

Version 0.15.0 is breaking dependencies

So I updated to the latest version and my script stopped working. it appears that it cannot find netstandard 2.0.
Here is the error:
Could not load Cake.XdtTransform (missing netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)

cake-contrib user on NuGet

First of all, I wanted to thank you for adding to the Cake community by adding this addin.

I was just wondering if you had seen this blog post:

http://cakebuild.net/blog/2016/08/cake-contribution-organization

We are currently going through a process of increasing the visibility of addins, and also trying to ensure their long term maintainability.

To that end, we are asking addin creators to add the cake-contrib user on NuGet as a co-owner (this can be done through the NuGet website by clicking on Manage Owners on the package page).

Would you be interested in doing this for Cake.XdtTransform? If you have any questions about this, please let me know. There was some initial concern that the Cake Team were trying to "take over" packages, and that couldn't be further from the truth, and if you have this concern, or others, I would like to address them.

Thanks!

Does not work with Cake 0.22

I am getting this error when using this addin with Cake 0.22:

Error: The assembly 'Cake.XdtTransform, Version=0.10.0.0, Culture=neutral, PublicKeyToken=null'
is referencing an older version of Cake.Core (0.16.2).
This assembly need to reference at least Cake.Core version 0.22.0.

Fix XMLDoc examples

There are a a couple of outdated/wrong bits in the code examples for the aliases.
Will create a PR to correct.

DotNet.Xdt Dll Missing

The newest version is missing the DotNet.Xdt dll that previous versions downloaded as a dependency and a fresh build.ps1 execution is failing.

Edit: This is for version 0.18.1

Recommended changes resulting from automated audit

We performed an automated audit of your Cake addin and found that it does not follow all the best practices.

We encourage you to make the following modifications:

  • You are currently referencing Cake.Core 0.28.1. Please upgrade to 0.33.0
  • The nuget package for your addin should use the cake-contrib icon. Specifically, your addin's .csproj should have a line like this: <PackageIconUrl>https://cdn.jsdelivr.net/gh/cake-contrib/graphics/png/cake-contrib-medium.png</PackageIconUrl>.

Apologies if this is already being worked on, or if there are existing open issues, this issue was created based on what is currently published for this package on NuGet.

This issue was created by a tool: Cake.AddinDiscoverer version 3.12.1

Create alias / overload that accepts an XML transform fragment

I've found need to be able to pass in a random transformations that aren't on the file system.
In general, I've just created a lightweight method right in my .cake file that exposes TransformConfig(FilePath file, string transformFragment) where the transformFragment is a well-formed <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> transformation string.

If there seems to be value in contributing that to the project, I'd gladly put something together.

It seems worthwhile to provide an appropriate overload for all the existing methods so that all the current functionality (loggers, etc.) can be enjoyed. The problem with this is the conversion between string and FilePath and any potential to break existing build scripts.

i.e.,

// existing
XdtTransformConfig(sourceFile, transformFile, targetFile);

// refactored for fragment -- this would collide
XdtTransformConfig(sourceFile, targetFile, transformString);

So my question becomes - what do you think is a good pattern for this?
Created named overloads?
Try to converge on a pattern?

It seems awkward to call something XdtTransformConfigUsingFragmentWithLogger or similar, and my own leaning would be to attempt to converge on a more unified set of method names.

My one thought might be to distill something like this ..

[CakeMethodAlias]
public static void XdtTransformConfig(this ICakeContext context, FilePath sourceFile, FilePath targetFile, XdtTransformOptions options) {
  // impl
}

public sealed class XdtTransformOptions 
{
    public FilePath TransformFile { get; set; }

    public string XmlTransformation { get; set; }
    
    public IXmlTransformationLogger Logger { get; set;  }
}

My one hesitation there is that we'd have to account for users specifying both the file + the xml string, and that speaks to precedence, which I think should be avoided. Other approaches could be just to strongly type the XmlTransform type as a wrapper around the string and allow implicit/explicit conversion so that it Just Worksβ„’
public static void XdtTransformConfig(FilePath source, FilePath target, XmlTransform transform)

Any thoughts or preferences on how to approach?

TransformConfigWithDefaultLogger unlike TransformConfig

I'm not sure if it's intentional: TransformConfigWithDefaultLogger unlike TransformConfig (the one without logger parameter) fails when source and target are the same file. This PR addresses this by changing the scope of the usings.

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.