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.
129
129
When running from the command-line, you can select the file to run by passing it as an argument to ` dotnet run ` :
130
130
131
131
``` bash
132
- dotnet run -p:ActiveFile program1.cs
132
+ dotnet run -p:start= program1.cs
133
133
```
134
134
135
+ You can also use the shortcut ` -p:s=[FILE] ` .
136
+
135
137
## How It Works
136
138
137
139
This nuget package leverages in concert the following standalone and otherwise
Original file line number Diff line number Diff line change 7
7
<!-- Capture project-level properties before they are defaulted by Microsoft.Common.targets -->
8
8
<CustomBeforeMicrosoftCSharpTargets >$(MSBuildThisFileDirectory)\SmallSharp.Before.props</CustomBeforeMicrosoftCSharpTargets >
9
9
10
- <UsingSmallSharpSDK Condition =" '$(UsingSmallSharpSDK)' == ''" >false</UsingSmallSharpSDK >
10
+ <UsingSmallSharpSDK Condition =" '$(UsingSmallSharpSDK)' == ''" >false</UsingSmallSharpSDK >
11
11
</PropertyGroup >
12
12
13
13
<Import Project =" SmallSharp.Version.props" />
Original file line number Diff line number Diff line change 10
10
<!-- Backs compat -->
11
11
<ActiveFile Condition =" '$(ActiveCompile)' != ''" >$(ActiveCompile)</ActiveFile >
12
12
<StartupFile >$(ActiveFile)</StartupFile >
13
+ <StartupFile Condition =" '$(StartupFile)' == ''" >$(Start)</StartupFile >
14
+ <StartupFile Condition =" '$(StartupFile)' == ''" >$(S)</StartupFile >
13
15
<StartupFile Condition =" '$(StartupFile)' == ''" >$(ActiveDebugProfile)</StartupFile >
14
16
<FindStartupFile Condition =" '$(StartupFile)' == '' or !Exists('$(StartupFile)')" >true</FindStartupFile >
15
17
<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
7
7
# build with each top-level file as the active one
8
8
foreach ($file in gci * .cs) {
9
9
# 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"
11
11
if ($LASTEXITCODE -ne 0 ) {
12
12
Write-Error " Build failed for $ ( $file.Name ) "
13
13
popd; popd;
You can’t perform that action at this time.
0 commit comments