Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
MSBuild で FizzBuzz
<?xml version="1.0" encoding="utf-8" ?>
To run: MSBuild /nologo /verbosity:minimal fizzbuzz.proj
<Project DefaultTargets="FizzBuzz"
<PropertyGroup Condition=" '$(Current)' == '' ">
<When Condition=" $([MSBuild]::Modulo($(Current), 15)) == 0 ">
<When Condition=" $([MSBuild]::Modulo($(Current), 5)) == 0 ">
<When Condition=" $([MSBuild]::Modulo($(Current), 3)) == 0 ">
<Target Name="FizzBuzz" Condition=" $(Current) &lt;= 100 ">
<Message Text="$(Display)" Importance="high" />
<MSBuild Projects="$(MSBuildProjectFile)"
Properties="Current=$([MSBuild]::Add($(Current), 1))" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.