problems when change to VS2019 project file layout

Matthias Gerloff's Avatar

Matthias Gerloff

21 Oct, 2020 07:57 PM

Hello,

I try to change my c# nuget package to the new visual studio 2019 project layout.
Twpo problems arise
1. The build version is not patched to the version ot the build. Altought I have enabled the patching of the csproj files.
2. I created and publishes a nuget package for every assembly in the solution. I want this to restict to only on, but there seems not to be an option in the settings.

Thanks for looking into this.
Matthias

  1. Support Staff 1 Posted by Feodor Fitsner on 21 Oct, 2020 09:16 PM

    Feodor Fitsner's Avatar

    Hi Matthias,

    Could you drop a link to a build please?

  2. 2 Posted by matthias on 22 Oct, 2020 06:30 AM

    matthias's Avatar

    Hello Feodor,

     

    sorry – forgot to include that.

    https://ci.appveyor.com/project/Calteo/toolbox-commandline/builds/35883233

     

    Regards,

    Matthias

     

    Von: Feodor Fitsner <[email blocked]>
    Gesendet: Mittwoch, 21. Oktober 2020 23:17
    An: [email blocked]
    Betreff: Re: problems when change to VS2019 project file layout [Problems #28442]

  3. Support Staff 3 Posted by Feodor Fitsner on 23 Oct, 2020 04:37 PM

    Feodor Fitsner's Avatar

    Looking into that.

  4. Support Staff 4 Posted by Feodor Fitsner on 23 Oct, 2020 06:17 PM

    Feodor Fitsner's Avatar

    OK, so the issue is that patching algorithm is looking for special properties inside .csproj files, like <Version>, so they can be pathed. It's not adding them if they don't exist. Look at this build: as soon as I added element it started working.

    Full list of elements that can be patched:

    Version
    VersionPrefix
    PackageVersion
    AssemblyVersion
    FileVersion
    InformationalVersion
    
  5. 5 Posted by matthias on 27 Oct, 2020 08:18 AM

    matthias's Avatar

    Any ideas how to turn off the nuget publishing for certain projects?
    So far all projects in the solution get published, which is not indented for the test projects. Inside the solution the nuget publishing is turned off for these projects, but they gets published anyway.

     

    Thanks,
    Matthias

     

    Von: Feodor Fitsner <[email blocked]>
    Gesendet: Freitag, 23. Oktober 2020 20:18
    An: [email blocked]
    Betreff: Re: problems when change to VS2019 project file layout [Problems #28442]

  6. Support Staff 6 Posted by Feodor Fitsner on 27 Oct, 2020 11:03 PM

    Feodor Fitsner's Avatar

    You can provide your own dotnet pack commands instead of automatic packaging, say in after_build script.

  7. 7 Posted by matthias on 12 Dec, 2020 07:36 PM

    matthias's Avatar

    Hello Feodor,

     

    I managed to get it working. Had to put the packages somewhere and add it to the artifacts also manually.

    But would it not be more correct that the original step just packs those projects that have the “Generate NuGet package” – Option set to true?

     

    Maybe just my opinion.

    Greetings,

    Matthias

     

    Von: Feodor Fitsner <[email blocked]>
    Gesendet: Mittwoch, 28. Oktober 2020 00:04
    An: [email blocked]
    Betreff: Re: problems when change to VS2019 project file layout [Problems #28442]

  8. Support Staff 8 Posted by Feodor Fitsner on 13 Dec, 2020 08:13 PM

    Feodor Fitsner's Avatar

    Thanks for the update!

    Well, not all cases can be guessed/covered by build agent, but we'll keep improving.

  9. Feodor Fitsner closed this discussion on 12 Feb, 2021 09:03 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac