File tree Expand file tree Collapse file tree 4 files changed +7
-3
lines changed
Expand file tree Collapse file tree 4 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -129,9 +129,11 @@ selecting the desired file from the Start button dropdown.
129129When running from the command-line, you can select the file to run by passing it as an argument to ` dotnet run ` :
130130
131131``` bash
132- dotnet run -p:ActiveFile program1.cs
132+ dotnet run -p:start= program1.cs
133133```
134134
135+ You can also use the shortcut ` -p:s=[FILE] ` .
136+
135137## How It Works
136138
137139This nuget package leverages in concert the following standalone and otherwise
Original file line number Diff line number Diff line change 77 <!-- Capture project-level properties before they are defaulted by Microsoft.Common.targets -->
88 <CustomBeforeMicrosoftCSharpTargets >$(MSBuildThisFileDirectory)\SmallSharp.Before.props</CustomBeforeMicrosoftCSharpTargets >
99
10- <UsingSmallSharpSDK Condition =" '$(UsingSmallSharpSDK)' == ''" >false</UsingSmallSharpSDK >
10+ <UsingSmallSharpSDK Condition =" '$(UsingSmallSharpSDK)' == ''" >false</UsingSmallSharpSDK >
1111 </PropertyGroup >
1212
1313 <Import Project =" SmallSharp.Version.props" />
Original file line number Diff line number Diff line change 1010 <!-- Backs compat -->
1111 <ActiveFile Condition =" '$(ActiveCompile)' != ''" >$(ActiveCompile)</ActiveFile >
1212 <StartupFile >$(ActiveFile)</StartupFile >
13+ <StartupFile Condition =" '$(StartupFile)' == ''" >$(Start)</StartupFile >
14+ <StartupFile Condition =" '$(StartupFile)' == ''" >$(S)</StartupFile >
1315 <StartupFile Condition =" '$(StartupFile)' == ''" >$(ActiveDebugProfile)</StartupFile >
1416 <FindStartupFile Condition =" '$(StartupFile)' == '' or !Exists('$(StartupFile)')" >true</FindStartupFile >
1517 <StartupFileDependsOn >EnsureProperties;CollectStartupFile;SelectStartupFile;SelectTopLevelCompile;UpdateLaunchSettings;EmitTargets</StartupFileDependsOn >
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ jq --arg version "$version" '.["msbuild-sdks"].SmallSharp = $version' global.jso
77# build with each top-level file as the active one
88foreach ($file in gci * .cs) {
99 # rm -r -fo obj -ea 0
10- dotnet build Demo.csproj - p:ActiveFile = $ ($file.Name ) - bl:" $ ( $file.BaseName ) .binlog"
10+ dotnet build Demo.csproj - p:start = $ ($file.Name ) - bl:" $ ( $file.BaseName ) .binlog"
1111 if ($LASTEXITCODE -ne 0 ) {
1212 Write-Error " Build failed for $ ( $file.Name ) "
1313 popd; popd;
You can’t perform that action at this time.
0 commit comments