GithubHelp home page GithubHelp logo

nu5129-build-props's Introduction

Demonstation of NU5129 warning

This repository contains a project which demonstrates, that NuGet will generate a NU5129 warning, when there are build\*.props files but the build\<package.id>.props file has a source name which is different:

Releated to NuGet issue #8806

PackageFiles
    build\A.Some.Props.File.props
        BuildAction = None
        Link = build\A.Some.Props.File.props
        Pack = true
        PackagePath = build/
    build\Package.props.default
        BuildAction = None
        Link = build\NU5129.Build.Props.Problem.props
        Pack = true
        PackagePath = build/NU5129.Build.Props.Problem.props

How-to

In the NU5129.Build.Props.Problem.csproj file set the $(Behaviour) property to

  • DifferentName: NU5129 build warning
  • SameName: No problem, everything works fine

DifferentName

> dotnet build -c release -t:Rebuild -p:Behaviour=DifferentName

Result:

Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 41,15 ms for E:\TFS\Bla\NU5129-build-props\NU5129.Build.Props.Problem.csproj.
  NU5129.Build.Props.Problem -> E:\TFS\Bla\NU5129-build-props\bin\Release\net461\NU5129.Build.Props.Problem.dll
  NU5129.Build.Props.Problem -> E:\TFS\Bla\NU5129-build-props\bin\Release\netstandard2.0\NU5129.Build.Props.Problem.dll
  Successfully created package 'E:\TFS\Bla\NU5129-build-props\bin\Release\NU5129.Build.Props.Problem.1.0.3.nupkg'.
C:\Program Files\dotnet\sdk\3.1.100\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(198,5): warning NU5129: - At least one .props file was found in 'build/', but 'build/NU5129.Build.Props.Problem.props' was not. [E:\TFS\Bla\NU5129-build-props\NU5129.Build.Props.Problem.csproj]
C:\Program Files\dotnet\sdk\3.1.100\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(198,5): warning NU5129:  [E:\TFS\Bla\NU5129-build-props\NU5129.Build.Props.Problem.csproj]
  Behaviour: DifferentName
  Pack Input
  PackTask::PackageFiles: PackagePath=build/; Identity=build\A.Some.Props.File.props;
  PackTask::PackageFiles: PackagePath=build/NU5129.Build.Props.Problem.props; Identity=build\Package.props.default;

Build succeeded.

C:\Program Files\dotnet\sdk\3.1.100\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(198,5): warning NU5129: - At least one .props file was found in 'build/', but 'build/NU5129.Build.Props.Problem.props' was not. [E:\TFS\Bla\NU5129-build-props\NU5129.Build.Props.Problem.csproj]
C:\Program Files\dotnet\sdk\3.1.100\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(198,5): warning NU5129:  [E:\TFS\Bla\NU5129-build-props\NU5129.Build.Props.Problem.csproj]
    1 Warning(s)
    0 Error(s)

Time Elapsed 00:00:02.62

SameName

> dotnet build -c release -t:Rebuild -p:Behaviour=SameName

Result:

Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 45,22 ms for E:\TFS\Bla\NU5129-build-props\NU5129.Build.Props.Problem.csproj.
  NU5129.Build.Props.Problem -> E:\TFS\Bla\NU5129-build-props\bin\Release\net461\NU5129.Build.Props.Problem.dll
  NU5129.Build.Props.Problem -> E:\TFS\Bla\NU5129-build-props\bin\Release\netstandard2.0\NU5129.Build.Props.Problem.dll
  Successfully created package 'E:\TFS\Bla\NU5129-build-props\bin\Release\NU5129.Build.Props.Problem.1.0.3.nupkg'.
  Behaviour: SameName
  Pack Input
  PackTask::PackageFiles: PackagePath=build/; Identity=build\A.Some.Props.File.props;
  PackTask::PackageFiles: PackagePath=build/NU5129.Build.Props.Problem.props; Identity=build/NU5129.Build.Props.Problem.props;

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:02.70

nu5129-build-props's People

Contributors

christophlindemann avatar

Watchers

 avatar  avatar

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.