Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion documentation/TemplateEngine/Post-Action-Registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Used to restore NuGet packages after project create.
- `dotnet new3`
- `dotnet new` (2.0.0 or higher)
- **Ignored in**:
- `Visual Studio` - Visual Studio restores all projects automatically, so post action will be be ignored.
- `Visual Studio` - Visual Studio restores all projects automatically, so post action will be ignored.

Note: when using `files` argument it should contain the path to the file in source template definition, and ignore all the path and filename changes that can happen when instantiating template. For more details, see [the article](Using-Primary-Outputs-for-Post-Actions.md).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ The very basic implementation may be:
```

`IMacroConfigDependency` interface depicts macro capability to derive it value(s) from other macros.
Dependencies are defined based on passed `IReadOnlyList<string> symbols` collection. An example of implemetation can be find here: [`CoalesceMacroConfig.cs`](../../src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Macros/CoalesceMacroConfig.cs).
Dependencies are defined based on passed `IReadOnlyList<string> symbols` collection. An example of implementation can be find here: [`CoalesceMacroConfig.cs`](../../src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Macros/CoalesceMacroConfig.cs).

`IGeneratedSymbolConfig` config already contains the pre-parsed JSON from template.json. It has properties for: symbol name, data type (if specified) and parameters collection.
Parameters collection contains parameter key-value pairs from JSON. Note that value is in JSON format, i.e. if the parameter value is string, then it contains `"\"string-value\""`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ Argument (name) matching: exact or partial short name or name, optional.

### Template parameter filters

This feature is currently unsupported (support was removed with moving o a new command line parser) - but it's being [tracked](https://github.com/dotnet/templating/issues/4061)
This feature is currently unsupported (support was removed with moving to a new command line parser) - but it's being [tracked](https://github.com/dotnet/templating/issues/4061)

### Error cases

Expand Down Expand Up @@ -278,7 +278,7 @@ filters applied.

### Template parameter filters

This feature is currently unsupported (support was removed with moving o a new command line parser) - but it's being [tracked](https://github.com/dotnet/templating/issues/4061)
This feature is currently unsupported (support was removed with moving to a new command line parser) - but it's being [tracked](https://github.com/dotnet/templating/issues/4061)

### Error cases

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Both `SelfContained` and `RuntimeIdentifier` will flow to a referenced project i

- The `IsRidAgnostic` property is set to `false`
- The `OutputType` is `Exe` or `WinExe`
- Either the `RuntimeIdentifer` or `RuntimeIdentifiers` property is non-empty
- Either the `RuntimeIdentifier` or `RuntimeIdentifiers` property is non-empty

## Type of breaking change

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Microsoft.DotNet.ApiSymbolExtensions.Filtering;
public static class SymbolFilterFactory
{
/// <summary>
/// Creates a composite filter to exclude APIs using the DocIDs provided in the specifed file paths.
/// Creates a composite filter to exclude APIs using the DocIDs provided in the specified file paths.
/// </summary>
/// <param name="apiExclusionFilePaths">A collection of paths where the exclusion files should be searched.</param>
/// <param name="accessibilitySymbolFilter">An optional custom accessibility symbol filter to use.</param>
Expand All @@ -38,7 +38,7 @@ public static ISymbolFilter GetFilterFromFiles(string[]? apiExclusionFilePaths,
}

/// <summary>
/// Creates a composite filter to exclude APIs using the DocIDs provided in the specifed list.
/// Creates a composite filter to exclude APIs using the DocIDs provided in the specified list.
/// </summary>
/// <param name="apiExclusionList">A collection of exclusion list.</param>
/// <param name="accessibilitySymbolFilter">An optional custom accessibility symbol filter to use.</param>
Expand Down
2 changes: 1 addition & 1 deletion src/Dotnet.Watch/Watch/Process/ProcessRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static IReadOnlyCollection<int> GetRunningApplicationProcesses()

/// <summary>
/// Launches a process.
/// Virutal for testing.
/// Virtual for testing.
/// </summary>
public virtual async Task<int> RunAsync(ProcessSpec processSpec, ILogger logger, ProcessLaunchResult? launchResult, CancellationToken processTerminationToken)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Dotnet.Watch/dotnet-watch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Updating a compiled file requires two requirements -

The former has been available as a compiler feature to support debugger / IDE's Edit and Continue capabilities. Starting in 6.0, the runtime (.NET Core and Mono) [expose APIs](https://github.com/dotnet/runtime/blob/f15722c2c25ce945f2f1c7673ff3f4fbdb244feb/src/mono/System.Private.CoreLib/src/System/Reflection/Metadata/AssemblyExtensions.cs#L28) to patch a running app. The combination of the two makes it possible to hot reload changes to files that are compiled as part of the application. The first bullet point is easy for files that are already compiled as part of the app e.g. .cs or .vb files. For any other file types, source generators offer a way to participate in the compilation process. This is the route taken by Razor Source Generator for .razor and .cshtml files.

To enable this, dotnet-watch hosts a Roslyn workspace that contains the project and all of it's references. When a change to .cs, .razor, or .cshtml file is found, it updates the workspace and uses it's APIs to produce a patch. Not all source changes can however produce a patch. These are called rude-edits (since it rudely interrupts your workflow) and in this case, watch falls back to doing a regular build to update and restart the app. If a patch is successfuly produced, watch now has the task of sending these patches to the app. In a webapp, we're able to display these rude-edit diagnostics, as well as any compilation errors using the WebSocket connection that was previously discussed.
To enable this, dotnet-watch hosts a Roslyn workspace that contains the project and all of it's references. When a change to .cs, .razor, or .cshtml file is found, it updates the workspace and uses it's APIs to produce a patch. Not all source changes can however produce a patch. These are called rude-edits (since it rudely interrupts your workflow) and in this case, watch falls back to doing a regular build to update and restart the app. If a patch is successfully produced, watch now has the task of sending these patches to the app. In a webapp, we're able to display these rude-edit diagnostics, as well as any compilation errors using the WebSocket connection that was previously discussed.

Since different app models have different constraints, this implementation is app-model specific:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ These tests are expected to live in the dotnet/roslyn-analyzers repo to make loc

#### End-to-End Tests

An end-to-end compilation test that measures how long the build takes on a large real-world project (based off existing scenarios [here](https://github.com/dotnet/performance/blob/main/docs/sdk-scenarios.md#sdk-build-throughput-scenario)). This test will be run twice, once with all mutli-core build features disabled (no `/m` is passed to msbuild, and `/parallel-` is passed to the compiler) and once with the SDK defaults enabled. The reason we will want a test with no parallelism is to make it easier to see the source of regressions. These test will not just measure how long it takes analyzers to execute but the entire SDK-based build process. It will need to collect an ETL file for investigation as well as the following metrics in a binlog file
An end-to-end compilation test that measures how long the build takes on a large real-world project (based off existing scenarios [here](https://github.com/dotnet/performance/blob/main/docs/sdk-scenarios.md#sdk-build-throughput-scenario)). This test will be run twice, once with all multi-core build features disabled (no `/m` is passed to msbuild, and `/parallel-` is passed to the compiler) and once with the SDK defaults enabled. The reason we will want a test with no parallelism is to make it easier to see the source of regressions. These test will not just measure how long it takes analyzers to execute but the entire SDK-based build process. It will need to collect an ETL file for investigation as well as the following metrics in a binlog file

- How much time was spend in analysis (`/p:reportanalyzer=true`)
- How long each build task took (recorded by default in the binlog file)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ private static bool TryRewriteMethodCall(SyntaxNode node, DocumentEditor editor,
return false;
}

SyntaxAnnotation renameIdentiferAnnotation = RenameAnnotation.Create();
SyntaxAnnotation renameIdentifierAnnotation = RenameAnnotation.Create();

IdentifierNameSyntax nonNullPtrIdentifierNode = SyntaxFactory.IdentifierName(nonNullPtrIdentifier);

if (addRenameAnnotation)
{
nonNullPtrIdentifierNode = nonNullPtrIdentifierNode.WithAdditionalAnnotations(renameIdentiferAnnotation);
nonNullPtrIdentifierNode = nonNullPtrIdentifierNode.WithAdditionalAnnotations(renameIdentifierAnnotation);
}

var pointerCast = editor.Generator.CastExpression(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public static string GetNonEmptyParentName(ISymbol symbol)
/// This method returns the assembly version of mscorlib for .NET Framework prior version 4.0.
/// It is using API diff tool to compare new classes in different versions and decide which version it is referencing
/// i.e. for .NET framework 3.5, the returned version would be 2.0.0.0.
/// For .NET Framework 4.X, this method returns the actual framework version instead of assembly verison of mscorlib,
/// For .NET Framework 4.X, this method returns the actual framework version instead of assembly version of mscorlib,
/// i.e. for .NET framework 4.5.2, this method return 4.5.2 instead of 4.0.0.0.
/// </remarks>
public static Version? GetDotNetFrameworkVersion([NotNullWhen(returnValue: true)] Compilation? compilation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1993,7 +1993,7 @@ public static void TestWithBrowserUnsupported()
[|Target.SupportedOnBrowser()|]; // This call site is unreachable on: 'browser'. 'Target.SupportedOnBrowser()' is only supported on: 'browser'.
[|Target.SupportedOnWindowsAndBrowser()|]; // This call site is unreachable on: 'browser'. 'Target.SupportedOnWindowsAndBrowser()' is only supported on: 'browser', 'windows'.

Target.UnsupportedOnWindows(); // if call site has now support of it and MSbuild list not containg the platform name it will not be warned
Target.UnsupportedOnWindows(); // if call site has now support of it and MSbuild list not containing the platform name it will not be warned
Target.UnsupportedOnBrowser();
Target.UnsupportedOnWindowsAndBrowser(); // same here
}
Expand Down
2 changes: 1 addition & 1 deletion src/RazorSdk/Tool/ShadowCopyManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Microsoft.NET.Sdk.Razor.Tool
// if concurrency is required.
internal class ShadowCopyManager : IDisposable
{
// Note that this class uses the *existance* of the Mutex to lock a directory.
// Note that this class uses the *existence* of the Mutex to lock a directory.
//
// Nothing in this code actually ever acquires the Mutex, we just try to see if it exists
// already.
Expand Down
6 changes: 3 additions & 3 deletions src/Tasks/Microsoft.NET.Build.Tasks/GenerateDepsFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ bool ShouldIncludeRuntimeAsset(ITaskItem item)
var affectedRids = new List<string>();
foreach (var lib in dependencyContext.RuntimeLibraries)
{
var warnOnRids = lib.RuntimeAssemblyGroups.Select(g => g.Runtime).Where(ShouldWarnOnRuntimeIdentifer)
.Concat(lib.NativeLibraryGroups.Select(g => g.Runtime).Where(ShouldWarnOnRuntimeIdentifer));
var warnOnRids = lib.RuntimeAssemblyGroups.Select(g => g.Runtime).Where(ShouldWarnOnRuntimeIdentifier)
.Concat(lib.NativeLibraryGroups.Select(g => g.Runtime).Where(ShouldWarnOnRuntimeIdentifier));
if (warnOnRids.Any())
{
affectedLibs.Add(lib.Name);
Expand All @@ -303,7 +303,7 @@ bool ShouldIncludeRuntimeAsset(ITaskItem item)
}
}

private bool ShouldWarnOnRuntimeIdentifer(string runtimeIdentifier)
private bool ShouldWarnOnRuntimeIdentifier(string runtimeIdentifier)
{
if (string.IsNullOrEmpty(runtimeIdentifier))
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Microsoft.NET.Build.Tasks
/// assets specified in the lock file.
/// </summary>
/// <remarks>
/// Only called for backwards compatability, when <c>ResolvePackageDependencies</c> is true.
/// Only called for backwards compatibility, when <c>ResolvePackageDependencies</c> is true.
/// </remarks>
[MSBuildMultiThreadableTask]
public sealed class ResolvePackageDependencies : TaskBase, IMultiThreadableTask
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Copyright (c) .NET Foundation. All rights reserved.
</ItemGroup>

<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Windows'">
<!-- Normalize the last part of TFM to .0 when ending with .1 as that indicates the use of the CsWinRT 3.0 verison. -->
<!-- Normalize the last part of TFM to .0 when ending with .1 as that indicates the use of the CsWinRT 3.0 version. -->
<_NormalizedWindowsSdkSupportedTargetPlatformVersion Include="@(WindowsSdkSupportedTargetPlatformVersion)">
<NormalizedSupportedTargetPlatformVersion
Condition="$([System.Text.RegularExpressions.Regex]::IsMatch(%(Identity), '^((\d+\.){3})1$'))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public ExportResult(string? templateJsonPath, string? errorMessage, Exception? i
/// <summary>
/// Gets the related exception in the case that the operation fails.
/// Value of this property may be null if the underlying error is detected
/// at the application logic and no actual exceptions occured.
/// at the application logic and no actual exceptions occurred.
/// </summary>
public Exception? InnerException { get; }

Expand Down
2 changes: 1 addition & 1 deletion src/WebSdk/Publish/Tasks/MsDeploy/CommonUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ internal static PriorityIndexComparer ParameterTaskComparer
Utilities.TaskItem newItem = new(item);
newItem.SetMetadata(PropertyName, itemData);
optimizedValueList[currentItemIndex] = newItem;
FoundDictionary[itemSpec] = true; // mark that we already fond teh item;
FoundDictionary[itemSpec] = true; // mark that we already found the item;
found = true;
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private string ConstructServiceUrlForDeployThruWMSVC(string serviceUrl)
serviceUriBuilder.Path = msddepaxd;
}

// user did not explicityly set the scheme
// user did not explicitly set the scheme
if (serviceUrl.IndexOf(serviceUriBuilder.Scheme, StringComparison.OrdinalIgnoreCase) == -1)
{
serviceUriBuilder.Scheme = https;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ public void It_warns_on_nonportable_rids(string targetFramework, string[] rids,
{
var packageProject = CreateProjectWithRidAssets(targetFramework, rids, addLibAssets, addNativeAssets);

// Identifer based on test inputs to create test assets that are unique for each test case
// Identifier based on test inputs to create test assets that are unique for each test case
string assetIdentifier = $"{targetFramework}{string.Join(null, rids)}{addLibAssets}{addNativeAssets}{useRidGraph}{shouldWarn}";

var packCommand = new PackCommand(TestAssetsManager.CreateTestProject(packageProject, assetIdentifier));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public void Netfx_is_implicit_for_Netstandard_and_Netcore_20(string targetFramew
{
var testProjectName = targetFramework.Replace(".", "_") + "implicit_atf";

var (testProjectTestAsset, testPackageReference) = CreateTestAsset(testProjectName, targetFramework, "net461", identifer: targetFramework);
var (testProjectTestAsset, testPackageReference) = CreateTestAsset(testProjectName, targetFramework, "net461", identifier: targetFramework);

var restoreCommand = testProjectTestAsset.GetRestoreCommand(Log, relativePath: testProjectName);

Expand All @@ -181,7 +181,7 @@ public void Netfx_is_not_implicit_for_Netstandard_and_Netcore_less_than_20(strin
{
var testProjectName = targetFramework.Replace(".", "_") + "non_implicit_atf";

var (testProjectTestAsset, testPackageReference) = CreateTestAsset(testProjectName, targetFramework, "net461", identifer: targetFramework);
var (testProjectTestAsset, testPackageReference) = CreateTestAsset(testProjectName, targetFramework, "net461", identifier: targetFramework);

var restoreCommand = testProjectTestAsset.GetRestoreCommand(Log, relativePath: testProjectName);
NuGetConfigWriter.Write(testProjectTestAsset.TestRoot, Path.GetDirectoryName(testPackageReference.NupkgPath));
Expand Down Expand Up @@ -238,9 +238,9 @@ public void It_chooses_lowest_netfx_in_default_atf()
string calleeTargetFrameworks,
Dictionary<string, string> additionalProperties = null,
[CallerMemberName] string testName = null,
string identifer = null)
string identifier = null)
{
var testPackageReference = CreateTestPackage(calleeTargetFrameworks, testName, identifer);
var testPackageReference = CreateTestPackage(calleeTargetFrameworks, testName, identifier);

var testProject =
new TestProject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -855,8 +855,8 @@ public void It_publishes_with_a_publish_profile(bool? selfContained, bool? useAp
IsExe = true,
};

var identifer = (selfContained == null ? "null" : selfContained.ToString()) + (useAppHost == null ? "null" : useAppHost.ToString());
var testProjectInstance = TestAssetsManager.CreateTestProject(testProject, identifier: identifer);
var identifier = (selfContained == null ? "null" : selfContained.ToString()) + (useAppHost == null ? "null" : useAppHost.ToString());
var testProjectInstance = TestAssetsManager.CreateTestProject(testProject, identifier: identifier);

var projectDirectory = Path.Combine(testProjectInstance.Path, testProject.Name);
var publishProfilesDirectory = Path.Combine(projectDirectory, "Properties", "PublishProfiles");
Expand Down Expand Up @@ -1138,7 +1138,7 @@ public static void Main()
if (appRelativeDotNet != null)
testProject.AdditionalProperties.Add("AppHostRelativeDotNet", appRelativeDotNet);

// Identifer based on test inputs to create test assets that are unique for each test case
// Identifier based on test inputs to create test assets that are unique for each test case
string assetIdentifier = $"{searchLocation}{appRelativeDotNet}{expectedLocation}";
var testAsset = TestAssetsManager.CreateTestProject(testProject, identifier: assetIdentifier);

Expand Down
Loading