diff --git a/readme.md b/readme.md index 239ebf7..444ab3e 100644 --- a/readme.md +++ b/readme.md @@ -129,9 +129,11 @@ selecting the desired file from the Start button dropdown. When running from the command-line, you can select the file to run by passing it as an argument to `dotnet run`: ```bash -dotnet run -p:ActiveFile program1.cs +dotnet run -p:start=program1.cs ``` +You can also use the shortcut `-p:s=[FILE]`. + ## How It Works This nuget package leverages in concert the following standalone and otherwise diff --git a/src/SmallSharp/SmallSharp.props b/src/SmallSharp/SmallSharp.props index 927055f..7596d39 100644 --- a/src/SmallSharp/SmallSharp.props +++ b/src/SmallSharp/SmallSharp.props @@ -7,7 +7,7 @@ $(MSBuildThisFileDirectory)\SmallSharp.Before.props - false + false diff --git a/src/SmallSharp/SmallSharp.targets b/src/SmallSharp/SmallSharp.targets index 82f5cdf..f49a053 100644 --- a/src/SmallSharp/SmallSharp.targets +++ b/src/SmallSharp/SmallSharp.targets @@ -10,6 +10,8 @@ $(ActiveCompile) $(ActiveFile) + $(Start) + $(S) $(ActiveDebugProfile) true EnsureProperties;CollectStartupFile;SelectStartupFile;SelectTopLevelCompile;UpdateLaunchSettings;EmitTargets diff --git a/src/demo.ps1 b/src/demo.ps1 index 3063ce5..fcb1cf1 100644 --- a/src/demo.ps1 +++ b/src/demo.ps1 @@ -7,7 +7,7 @@ jq --arg version "$version" '.["msbuild-sdks"].SmallSharp = $version' global.jso # build with each top-level file as the active one foreach ($file in gci *.cs) { # rm -r -fo obj -ea 0 - dotnet build Demo.csproj -p:ActiveFile=$($file.Name) -bl:"$($file.BaseName).binlog" + dotnet build Demo.csproj -p:start=$($file.Name) -bl:"$($file.BaseName).binlog" if ($LASTEXITCODE -ne 0) { Write-Error "Build failed for $($file.Name)" popd; popd;