Skip to content

Fallout.Migrate: Also recognize csproj variables #477

Description

@IT-VBFK

Description

When doing fallout-migrate on a project which does have mulitple Fallout.* packages installed, and using a shared variable for the version, like:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net10.0</TargetFramework>
    <RootNamespace></RootNamespace>
    <NoWarn>CS0649;CS0169</NoWarn>
    <FalloutRootDirectory>..\</FalloutRootDirectory>
    <FalloutScriptDirectory>..\</FalloutScriptDirectory>
    <NukeVersion>10.3.49</NukeVersion >
    <FalloutTelemetryVersion>1</FalloutTelemetryVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageDownload Include="GitVersion.Tool" Version="[6.5.1]" />
    <PackageDownload Include="ReportGenerator" Version="[5.5.0]" />
    <PackageDownload Include="xunit.runner.console" Version="[2.9.2]" />
    <PackageReference Include="LibGit2Sharp" Version="0.31.0" />
    <PackageReference Include="Nuke.Common" Version="$(NukeVersion)" />
    <PackageReference Include="Nuke.Components" Version="$(NukeVersion)" />
    <PackageReference Include="SharpCompress" Version="0.48.0" />
    <!-- Replace the implicitly referenced version 6.12.1, which is defined by the package Fallout.Common and has known vulnerabilities, with a fixed version -->
    <PackageReference Include="Nuget.Packaging" Version="7.3.1" />
  </ItemGroup>
</Project>

Neither the variable "NukeVersion" is converted, nor the version is replaced.

Usage Example

Just doing fallout-migrate and have this automagically done

Alternative

Doing it yourself

Could you help with a pull-request?

Yes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions