Skip to content

Commit bb4137a

Browse files
committed
Merge branch 'main' into wix5
2 parents 8948dac + f2c8ed6 commit bb4137a

File tree

237 files changed

+4160
-2990
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+4160
-2990
lines changed

.github/copilot-instructions.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ Output Considerations:
1212

1313
Localization:
1414
- Avoid modifying .xlf files and instead prompt the user to update them using the `/t:UpdateXlf` target on MSBuild.
15-
- Consider localizing strings in .resx files when possible.
15+
- Consider localizing strings in .resx files when possible.
16+
17+
Documentation:
18+
- Do not manually edit files under documentation/manpages/sdk as these are generated based on documentation and should not be manually modified.

.vsts-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ extends:
107107
templateFolderName: templates-official
108108
publishTaskPrefix: 1ES.
109109
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
110-
locBranch: release/9.0.3xx
110+
locBranch: main
111111
# WORKAROUND: BinSkim requires the folder exist prior to scanning.
112112
preSteps:
113113
- powershell: New-Item -ItemType Directory -Path $(Build.SourcesDirectory)/artifacts/bin -Force

TemplateEngine.slnf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"solution": {
3-
"path": "sdk.sln",
3+
"path": "sdk.slnx",
44
"projects": [
55
"test\\TestAssets\\TestPackages\\dotnet-new\\Microsoft.TemplateEngine.TestTemplates.csproj",
66
"src\\Cli\\Microsoft.DotNet.Cli.Sln.Internal\\Microsoft.DotNet.Cli.Sln.Internal.csproj",
@@ -21,4 +21,4 @@
2121
"template_feed\\Microsoft.DotNet.Common.ProjectTemplates.10.0\\Microsoft.DotNet.Common.ProjectTemplates.10.0.csproj"
2222
]
2323
}
24-
}
24+
}

containers.slnf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"solution": {
3-
"path": "sdk.sln",
3+
"path": "sdk.slnx",
44
"projects": [
55
"src\\Cli\\Microsoft.DotNet.Cli.Utils\\Microsoft.DotNet.Cli.Utils.csproj",
66
"src\\Cli\\Microsoft.DotNet.InternalAbstractions\\Microsoft.DotNet.InternalAbstractions.csproj",
@@ -13,4 +13,4 @@
1313
"test\\containerize.UnitTests\\containerize.UnitTests.csproj"
1414
]
1515
}
16-
}
16+
}

documentation/general/dotnet-run-file.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ For example, the remaining command-line arguments after the first argument (the
6565
(except for the arguments recognized by `dotnet run` unless they are after the `--` separator)
6666
and working directory is not changed (e.g., `cd /x/ && dotnet run /y/file.cs` runs the program in directory `/x/`).
6767

68+
`dotnet path.cs` is a shortcut for `dotnet run path.cs` provided that `path.cs` is a valid [target path](#target-path).
69+
6870
### Other commands
6971

7072
Commands `dotnet restore file.cs` and `dotnet build file.cs` are needed for IDE support and hence work for file-based programs.
@@ -161,14 +163,16 @@ They are not cleaned immediately because they can be re-used on subsequent runs
161163

162164
It is possible to specify some project metadata via *file-level directives*
163165
which are [ignored][ignored-directives] by the C# language but recognized by the SDK CLI.
164-
Directives `sdk`, `package`, and `property` are translated into `<Project Sdk="...">`, `<PackageReference>`, and `<Property>` project elements, respectively.
166+
Directives `sdk`, `package`, `property`, and `project` are translated into
167+
`<Project Sdk="...">`, `<PackageReference>`, `<PropertyGroup>`, and `<ProjectReference>` project elements, respectively.
165168
Other directives result in an error, reserving them for future use.
166169

167170
```cs
168171
#:sdk Microsoft.NET.Sdk.Web
169172
#:property TargetFramework=net11.0
170173
#:property LangVersion=preview
171174
175+
#:project ../MyLibrary
172176
```
173177

174178
The value must be separated from the kind (`package`/`sdk`/`property`) of the directive by whitespace
@@ -182,6 +186,9 @@ The value of `#:property` is split by the separator and injected as `<{0}>{1}</{
182186
It is an error if no separator appears in the value or if the first part (property name) is empty (the property value is allowed to be empty) or contains invalid characters.
183187
The value of `#:package` is split by the separator and injected as `<PackageReference Include="{0}" Version="{1}">` (or without the `Version` attribute if there is no separator) in an `<ItemGroup>`.
184188
It is an error if the first part (package name) is empty (the package version is allowed to be empty, but that results in empty `Version=""`).
189+
The value of `#:project` is injected as `<ProjectReference Include="{0}" />` in an `<ItemGroup>`.
190+
If the value points to an existing directory, a project file is found inside that directory and its path is used instead
191+
(because `ProjectReference` items don't support directory paths).
185192

186193
Because these directives are limited by the C# language to only appear before the first "C# token" and any `#if`,
187194
dotnet CLI can look for them via a regex or Roslyn lexer without any knowledge of defined conditional symbols
@@ -294,28 +301,24 @@ Also, `InternalsVisibleTo` needs to be added into a C# file as an attribute, or
294301

295302
### Shebang support
296303

297-
It might be beneficial to also ship `dotnet-run` binary
298-
(or `dotnet-run-file` that would only work with file-based programs, not project-based ones, perhaps simply named `cs`)
299-
because some shells do not support multiple command-line arguments in the shebang
304+
Some shells do not support multiple command-line arguments in the shebang
300305
which is needed if one wants to use `/usr/bin/env` to find the `dotnet` executable
301-
(although `-S` argument can be sometimes used to enable multiple argument support):
306+
(although `-S` argument can be sometimes used to enable multiple argument support),
307+
so `dotnet file.cs` instead of `dotnet run file.cs` should be used in shebangs:
302308

303309
```cs
304310
#!/usr/bin/env dotnet run
305311
// ^ Might not work in all shells. "dotnet run" might be passed as a single argument to "env".
306312
```
307313
```cs
308-
#!/usr/bin/env dotnet-run
314+
#!/usr/bin/env dotnet
309315
// ^ Should work in all shells.
310316
```
311317
```cs
312318
#!/usr/bin/env -S dotnet run
313-
// ^ Workaround in some shells.
319+
// ^ Works in some shells.
314320
```
315321

316-
We could also consider making `dotnet file.cs` work because `dotnet file.dll` also works today
317-
but that would require changes to the native dotnet host.
318-
319322
### Other possible commands
320323

321324
We can consider supporting other commands like `dotnet pack`, `dotnet watch`,
@@ -332,8 +335,8 @@ We could also add `dotnet compile` command that would be the equivalent of `dotn
332335
e.g., via `dotnet clean --file-based-program <path-to-entry-point>`
333336
or `dotnet clean --all-file-based-programs`.
334337

335-
Adding package references via `dotnet package add` could be supported for file-based programs as well,
336-
i.e., the command would add a `#:package` directive to the top of a `.cs` file.
338+
Adding references via `dotnet package add`/`dotnet reference add` could be supported for file-based programs as well,
339+
i.e., the command would add a `#:package`/`#:project` directive to the top of a `.cs` file.
337340

338341
### Explicit importing
339342

documentation/manpages/sdk/dotnet-build-server.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
. ftr VB CB
1515
. ftr VBI CBI
1616
.\}
17-
.TH "dotnet-build-server" "1" "2025-05-30" "" ".NET Documentation"
17+
.TH "dotnet-build-server" "1" "2025-06-13" "" ".NET Documentation"
1818
.hy
1919
.SH dotnet build-server
2020
.PP

documentation/manpages/sdk/dotnet-build.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
. ftr VB CB
1515
. ftr VBI CBI
1616
.\}
17-
.TH "dotnet-build" "1" "2025-05-30" "" ".NET Documentation"
17+
.TH "dotnet-build" "1" "2025-06-13" "" ".NET Documentation"
1818
.hy
1919
.SH dotnet build
2020
.PP

documentation/manpages/sdk/dotnet-clean.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
. ftr VB CB
1515
. ftr VBI CBI
1616
.\}
17-
.TH "dotnet-clean" "1" "2025-05-30" "" ".NET Documentation"
17+
.TH "dotnet-clean" "1" "2025-06-13" "" ".NET Documentation"
1818
.hy
1919
.SH dotnet clean
2020
.PP

documentation/manpages/sdk/dotnet-dev-certs.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
. ftr VB CB
1616
. ftr VBI CBI
1717
.\}
18-
.TH "dotnet-dev-certs" "1" "2025-05-30" "" ".NET Documentation"
18+
.TH "dotnet-dev-certs" "1" "2025-06-13" "" ".NET Documentation"
1919
.hy
2020
.SH dotnet dev-certs
2121
.PP

documentation/manpages/sdk/dotnet-environment-variables.7

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
. ftr VB CB
1515
. ftr VBI CBI
1616
.\}
17-
.TH "dotnet-environment-variables" "7" "2025-05-30" "" ".NET Documentation"
17+
.TH "dotnet-environment-variables" "7" "2025-06-13" "" ".NET Documentation"
1818
.hy
1919
.SH NAME
2020
.PP

0 commit comments

Comments
 (0)