Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
4bec1a2
[release/8.0.1xx] Update branding to 8.0.126 (#9907)
vseanreesermsft Mar 3, 2026
f9fed38
[release/8.0.1xx] Update dependencies from dotnet/source-build-refere…
dotnet-maestro[bot] Mar 4, 2026
66e21ef
[release/8.0.1xx] Update dependencies from dotnet/arcade (#9860)
dotnet-maestro[bot] Mar 4, 2026
9de2d6d
[release/8.0.1xx] Update dependencies from dotnet/source-build-extern…
dotnet-maestro[bot] Mar 4, 2026
4d62c15
Merge branch 'release/8.0.4xx' of https://github.com/dotnet/templatin…
DonnaChen888 Mar 4, 2026
c6b91e6
[automated] Merge branch 'release/8.0.1xx' => 'release/8.0.4xx' (#9911)
DonnaChen888 Mar 4, 2026
ee641ca
Update dependencies from https://github.com/dotnet/arcade build 20260…
dotnet-maestro[bot] Mar 19, 2026
8e42054
Update dependencies from https://github.com/dotnet/arcade build 20260…
dotnet-maestro[bot] Mar 19, 2026
484c8dc
Update dependencies from https://github.com/dotnet/arcade build 20260…
dotnet-maestro[bot] Mar 19, 2026
58ec8d5
Update dependencies from https://github.com/dotnet/arcade build 20260…
dotnet-maestro[bot] Mar 31, 2026
fd8766b
Update dependencies from https://github.com/dotnet/arcade build 20260…
dotnet-maestro[bot] Apr 2, 2026
ac1d22c
Update dependencies from https://github.com/dotnet/source-build-refer…
dotnet-maestro[bot] Apr 4, 2026
75e5e46
Update branding on release/8.0.1xx
vseanreesermsft Apr 7, 2026
1396f07
Update branding on release/8.0.4xx
vseanreesermsft Apr 7, 2026
0172880
[release/8.0.1xx] Update branding to 8.0.127 (#10106)
DonnaChen888 Apr 8, 2026
7456879
[release/8.0.4xx] Update branding to 8.0.421 (#10107)
DonnaChen888 Apr 8, 2026
09fad54
[release/8.0.1xx] Update dependencies from dotnet/arcade (#10016)
DonnaChen888 Apr 8, 2026
f22882d
[release/8.0.1xx] Update dependencies from dotnet/source-build-refere…
DonnaChen888 Apr 8, 2026
3c61a6c
[release/8.0.4xx] Update dependencies from dotnet/arcade (#10018)
DonnaChen888 Apr 8, 2026
1b7ed29
Merge branch 'release/8.0.4xx' of https://github.com/dotnet/templatin…
DonnaChen888 Apr 8, 2026
6501d86
Merge branch 'release/9.0.1xx' of https://github.com/dotnet/templatin…
DonnaChen888 Apr 8, 2026
83def70
[automated] Merge branch 'release/8.0.4xx' => 'release/9.0.1xx' (#10111)
DonnaChen888 Apr 8, 2026
c181519
Update dependencies from https://github.com/dotnet/source-build-exter…
dotnet-maestro[bot] Apr 8, 2026
782ddc1
Remove unnecessary null-forgiving operator (IDE0370)
marcpopMSFT Apr 8, 2026
b862d32
Suppress IDE0370 (unnecessary null-forgiving operator) as suggestion
marcpopMSFT Apr 8, 2026
80d8da1
[release/9.0.1xx] Update dependencies from dotnet/arcade (#10020)
DonnaChen888 Apr 9, 2026
519a474
Merge branch 'release/9.0.3xx' into merge/release/9.0.1xx-to-release/…
DonnaChen888 Apr 9, 2026
4d37977
[automated] Merge branch 'release/9.0.1xx' => 'release/9.0.3xx' (#10118)
DonnaChen888 Apr 9, 2026
4b69d9b
Use source-build-assets repo
NikolaMilosavljevic Apr 11, 2026
16171fc
Remove unnecessary null-forgiving operators (IDE0370)
DonnaChen888 Apr 9, 2026
dd33133
Use source-build-assets repo (#10135)
NikolaMilosavljevic Apr 14, 2026
bed4c97
Addressing 'Suppression is unnecessary' warnings.
MiYanni Apr 15, 2026
2726c89
[automated] Merge branch 'release/9.0.1xx' => 'release/9.0.3xx' (#10138)
MiYanni Apr 15, 2026
3a05fad
[automated] Merge branch 'release/8.0.1xx' => 'release/8.0.4xx' (#10110)
MiYanni Apr 15, 2026
5f5334d
Merge branch 'release/10.0.1xx' of https://github.com/dotnet/templati…
DonnaChen888 Apr 15, 2026
48adf54
Remove unnecessary null-forgiving operators (IDE0370)
DonnaChen888 Apr 9, 2026
c9c96c8
[release/8.0.1xx] Update dependencies from dotnet/source-build-extern…
DonnaChen888 Apr 15, 2026
0b91fc6
Merge branch 'release/8.0.4xx' of https://github.com/dotnet/templatin…
DonnaChen888 Apr 15, 2026
e9d15eb
[automated] Merge branch 'release/9.0.3xx' => 'release/10.0.1xx' (#10…
DonnaChen888 Apr 15, 2026
28975e0
[automated] Merge branch 'release/8.0.4xx' => 'release/9.0.1xx' (#10141)
MiYanni Apr 15, 2026
d261029
[automated] Merge branch 'release/8.0.1xx' => 'release/8.0.4xx' (#10147)
MiYanni Apr 15, 2026
7a3da72
[automated] Merge branch 'release/8.0.4xx' => 'release/9.0.1xx' (#10150)
MiYanni Apr 15, 2026
8b1a22a
[automated] Merge branch 'release/9.0.1xx' => 'release/9.0.3xx' (#10149)
MiYanni Apr 15, 2026
252e51b
Update dependencies from build 310472
dotnet-maestro[bot] Apr 16, 2026
be9f577
[release/10.0.1xx] Source code updates from dotnet/dotnet (#10155)
DonnaChen888 Apr 16, 2026
6f5c6eb
[automated] Merge branch 'release/9.0.3xx' => 'release/10.0.1xx' (#10…
DonnaChen888 Apr 16, 2026
b0968cb
Update dependencies from build 310753
dotnet-maestro[bot] Apr 17, 2026
273a5be
Update dependencies from build 310711
dotnet-maestro[bot] Apr 17, 2026
e1a074a
[release/10.0.3xx] Source code updates from dotnet/dotnet (#10159)
DonnaChen888 Apr 17, 2026
ca541eb
[release/10.0.1xx] Source code updates from dotnet/dotnet (#10161)
DonnaChen888 Apr 17, 2026
dc242c5
Merge branch 'release/10.0.2xx' of https://github.com/dotnet/templati…
DonnaChen888 Apr 17, 2026
35e4380
[automated] Merge branch 'release/10.0.1xx' => 'release/10.0.2xx' (#1…
DonnaChen888 Apr 17, 2026
897bdda
[automated] Merge branch 'release/10.0.2xx' => 'release/10.0.3xx' (#1…
DonnaChen888 Apr 20, 2026
6fdd307
Revert changes in eng/Version.Details.props, eng/Version.Details.xml …
DonnaChen888 Apr 20, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ private static bool Evaluate(

private static int? AttemptBooleanComparison(object? left, object? right)
{
bool leftIsBool = Map.TryConvert(left!, out bool lb);
bool rightIsBool = Map.TryConvert(right!, out bool rb);
bool leftIsBool = Map.TryConvert(left, out bool lb);
bool rightIsBool = Map.TryConvert(right, out bool rb);

if (!leftIsBool || !rightIsBool)
{
Expand Down Expand Up @@ -240,12 +240,12 @@ private static bool Evaluate(

private static int? AttemptNumericComparison(object? left, object? right)
{
bool leftIsDouble = Map.TryConvert(left!, out double ld);
bool rightIsDouble = Map.TryConvert(right!, out double rd);
bool leftIsDouble = Map.TryConvert(left, out double ld);
bool rightIsDouble = Map.TryConvert(right, out double rd);

if (!leftIsDouble)
{
if (!Map.TryConvert(left!, out long ll))
if (!Map.TryConvert(left, out long ll))
{
return null;
}
Expand All @@ -255,7 +255,7 @@ private static bool Evaluate(

if (!rightIsDouble)
{
if (!Map.TryConvert(right!, out long rl))
if (!Map.TryConvert(right, out long rl))
{
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ internal static bool TryParse(string value, out NuGetFloatRangeSpecification? ve
{
if (FloatRange.TryParse(value, out FloatRange? versionRange))
{
#pragma warning disable IDE0370
version = new NuGetFloatRangeSpecification(versionRange!);
#pragma warning restore IDE0370
return true;
}
version = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ internal static bool TryParse(string value, out NuGetVersionRangeSpecification?
{
if (VersionRange.TryParse(value, out VersionRange? versionRange))
{
#pragma warning disable IDE0370
version = new NuGetVersionRangeSpecification(versionRange!);
#pragma warning restore IDE0370
return true;
}
version = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ internal static bool TryParse(string value, out NuGetVersionSpecification? versi
{
if (NuGetVersion.TryParse(value, out NuGetVersion? nuGetVersion))
{
#pragma warning disable IDE0370
version = new NuGetVersionSpecification(nuGetVersion!);
#pragma warning restore IDE0370
return true;
}
version = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public InputDataSet Build(bool evaluateConditions, IGenerator generator, ILogger
_resolvedValues.Select(p => p.Value.ToParameterData()).ToList());
}

return _result!;
return _result;
}

public void SetParameterDefault(IGenerator generator, ITemplateParameter parameter, IEngineEnvironmentSettings environment, bool useHostDefaults, bool isRequired, List<string> paramsWithInvalidValues)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private void ProcessEvaluationResults(IVariableCollection variableCollection, IR
continue;
}

string obtainedValue = currentTask.Result!;
string obtainedValue = currentTask.Result;
bool result = ParameterConverter.TryConvertLiteralToDatatype(obtainedValue, currentSymbol.DataType, out object? convertedValue);
if (result && convertedValue != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private static TemplateParameterPrecedence GetPrecedence(bool isRequired, JObjec
bool isEnabled = true;
if (jObject != null && jObject.TryGetValue("IsEnabled", StringComparison.OrdinalIgnoreCase, out JToken? isEnabledToken))
{
if (isEnabledToken!.TryParseBool(out bool enabledConst))
if (isEnabledToken.TryParseBool(out bool enabledConst))
{
isEnabled = enabledConst;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal RegexMatchMacroConfig(RegexMatchMacro macro, IGeneratedSymbolConfig gen
{
Source = GetMandatoryParameterValue(generatedSymbolConfig, "source");
Pattern = GetMandatoryParameterValue(generatedSymbolConfig, "pattern");
IsValidRegex(Pattern!, generatedSymbolConfig);
IsValidRegex(Pattern, generatedSymbolConfig);
}

internal string Source { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ internal static ConditionalOperationOptions FromJObject(JObject rawConfiguration
string? id = rawConfiguration.ToString("id");
if (!string.IsNullOrWhiteSpace(id))
{
options.Id = id!;
options.Id = id;
}

return options;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static bool TryAdd<TKey, TValue>(this IDictionary<TKey, TValue> dict, TKe
{
if (condition(value))
{
dict[key] = value!;
dict[key] = value;
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.TemplateEngine.Utils/DirectedGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private static Dictionary<T, HashSet<T>> GetDependentsMap(Dictionary<T, HashSet<
var dependentsMap = vertices.ToDictionary(v => v, v => new HashSet<T>());
foreach (KeyValuePair<T, HashSet<T>> keyValuePair in dependenciesMap)
{
foreach (T dependency in keyValuePair.Value!)
foreach (T dependency in keyValuePair.Value)
{
_ = dependentsMap[dependency].Add(keyValuePair.Key);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ private static string GetTestTemplateJsonContent()
string? thisDir = Path.GetDirectoryName(typeof(ExportCommandTests).Assembly.Location);
Assert.NotNull(thisDir);
string templateJsonPath = Path.GetFullPath(Path.Combine(
thisDir!,
thisDir,
"..",
"..",
"..",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private IEngineEnvironmentSettings LoadHostWithLocalizationTemplates(string? loc
Assert.True(localizedTemplates.Count != 0, "Test template couldn't be loaded.");
var template = localizedTemplates.FirstOrDefault(t => t.Identity == "TestAssets.TemplateWithLocalization");
Assert.NotNull(template);
localizationTemplate = template!;
localizationTemplate = template;

return env;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ internal async Task Update_CannotUpdateVulnerabilities()

var source = installResult.TemplatePackage as NuGetManagedTemplatePackage;
Assert.NotNull(source);
string oldMountPoint = source!.MountPointUri;
string oldMountPoint = source.MountPointUri;
Assert.True(File.Exists(oldMountPoint));
UpdateRequest updateRequest = new UpdateRequest(source, "12.0.3");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ internal async Task PhysicalConfigurationTest()
{
var userProfileDir = Environment.GetEnvironmentVariable(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "USERPROFILE" : "HOME");
Assert.NotNull(userProfileDir);
var hostDir = Path.Combine(userProfileDir!, ".templateengine", nameof(PhysicalConfigurationTest).ToString());
var hostDir = Path.Combine(userProfileDir, ".templateengine", nameof(PhysicalConfigurationTest).ToString());
try
{
var builtIns = BuiltInTemplatePackagesProviderFactory.GetComponents(TestTemplatesLocation);
Expand All @@ -42,7 +42,7 @@ internal async Task VirtualConfigurationTest()
string? userProfileDir = Environment.GetEnvironmentVariable(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "USERPROFILE" : "HOME");
Assert.NotNull(userProfileDir);

string baseDir = Path.Combine(userProfileDir!, ".templateengine");
string baseDir = Path.Combine(userProfileDir, ".templateengine");
var hostDir = Path.Combine(baseDir, nameof(VirtualConfigurationTest).ToString());

var builtIns = BuiltInTemplatePackagesProviderFactory.GetComponents(TestTemplatesLocation);
Expand Down Expand Up @@ -82,7 +82,7 @@ internal async Task PhysicalConfigurationTest_WithChangedHostLocation()
{
var userProfileDir = Environment.GetEnvironmentVariable(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "USERPROFILE" : "HOME");
Assert.NotNull(userProfileDir);
var unexpectedHostDir = Path.Combine(userProfileDir!, ".templateengine", nameof(PhysicalConfigurationTest_WithChangedHostLocation).ToString());
var unexpectedHostDir = Path.Combine(userProfileDir, ".templateengine", nameof(PhysicalConfigurationTest_WithChangedHostLocation).ToString());
var expectedHostDir = TestUtils.CreateTemporaryFolder();

var builtIns = BuiltInTemplatePackagesProviderFactory.GetComponents(TestTemplatesLocation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ internal async Task CanInstall_LocalNuGetPackage()

IManagedTemplatePackage? source = result[0].TemplatePackage;
Assert.NotNull(source);
Assert.Equal("Microsoft.DotNet.Common.ProjectTemplates.5.0", source!.Identifier);
Assert.Equal("Microsoft.DotNet.Common.ProjectTemplates.5.0", source.Identifier);
Assert.Equal("Global Settings", source.Provider.Factory.DisplayName);
Assert.Equal("NuGet", source.Installer.Factory.Name);
Assert.Equal("Microsoft", source.GetDetails()["Author"]);
Expand Down Expand Up @@ -107,7 +107,7 @@ internal async Task CanInstall_RemoteNuGetPackage()

IManagedTemplatePackage? source = result[0].TemplatePackage;
Assert.NotNull(source);
Assert.Equal("Take.Blip.Client.Templates", source!.Identifier);
Assert.Equal("Take.Blip.Client.Templates", source.Identifier);
Assert.Equal("Global Settings", source.Provider.Factory.DisplayName);
Assert.Equal("NuGet", source.Installer.Factory.Name);
source.GetDetails()["Author"].Should().NotBeNullOrEmpty();
Expand Down Expand Up @@ -144,7 +144,7 @@ internal async Task CanInstall_Folder()

IManagedTemplatePackage? source = result[0].TemplatePackage;
Assert.NotNull(source);
Assert.Equal(Path.GetFullPath(templateLocation), source!.Identifier);
Assert.Equal(Path.GetFullPath(templateLocation), source.Identifier);
Assert.Equal("Global Settings", source.Provider.Factory.DisplayName);
Assert.Equal("Folder", source.Installer.Factory.Name);
source.Version.Should().BeNullOrEmpty();
Expand Down Expand Up @@ -173,7 +173,7 @@ internal async Task CanCheckForLatestVersion_NuGetPackage()
Assert.True(result[0].Success);
IManagedTemplatePackage? source = result[0].TemplatePackage;
Assert.NotNull(source);
IReadOnlyList<CheckUpdateResult> checkUpdateResults = await bootstrapper.GetLatestVersionsAsync(new[] { source! }, CancellationToken.None);
IReadOnlyList<CheckUpdateResult> checkUpdateResults = await bootstrapper.GetLatestVersionsAsync(new[] { source }, CancellationToken.None);

Assert.Single(checkUpdateResults);
Assert.True(checkUpdateResults[0].Success);
Expand All @@ -198,7 +198,7 @@ internal async Task CanCheckForLatestVersion_Folder()
Assert.True(result[0].Success);
IManagedTemplatePackage? source = result[0].TemplatePackage;
Assert.NotNull(source);
IReadOnlyList<CheckUpdateResult> checkUpdateResults = await bootstrapper.GetLatestVersionsAsync(new[] { source! }, CancellationToken.None);
IReadOnlyList<CheckUpdateResult> checkUpdateResults = await bootstrapper.GetLatestVersionsAsync(new[] { source }, CancellationToken.None);

Assert.Single(checkUpdateResults);
Assert.True(checkUpdateResults[0].Success);
Expand Down Expand Up @@ -267,7 +267,7 @@ internal async Task CanUpdate_NuGetPackage()
Assert.True(result[0].Success);
IManagedTemplatePackage? source = result[0].TemplatePackage;
Assert.NotNull(source);
UpdateRequest updateRequest = new UpdateRequest(source!, "5.0.1");
UpdateRequest updateRequest = new UpdateRequest(source, "5.0.1");

IReadOnlyList<UpdateResult> updateResults = await bootstrapper.UpdateTemplatePackagesAsync(new[] { updateRequest }, CancellationToken.None);

Expand All @@ -279,7 +279,7 @@ internal async Task CanUpdate_NuGetPackage()

IManagedTemplatePackage? updatedSource = updateResults[0].TemplatePackage;
Assert.NotNull(updatedSource);
Assert.Equal("Global Settings", updatedSource!.Provider.Factory.DisplayName);
Assert.Equal("Global Settings", updatedSource.Provider.Factory.DisplayName);
Assert.Equal("NuGet", updatedSource.Installer.Factory.Name);
Assert.Equal("5.0.1", updatedSource.Version);

Expand Down Expand Up @@ -312,7 +312,7 @@ internal async Task CanUninstall_NuGetPackage()
Assert.Single(managedTemplatesPackages);
managedTemplatesPackages[0].Should().BeEquivalentTo(source);

IReadOnlyList<UninstallResult> uninstallResults = await bootstrapper.UninstallTemplatePackagesAsync(new[] { source! }, CancellationToken.None);
IReadOnlyList<UninstallResult> uninstallResults = await bootstrapper.UninstallTemplatePackagesAsync(new[] { source }, CancellationToken.None);

Assert.Single(uninstallResults);
Assert.True(uninstallResults[0].Success);
Expand All @@ -339,7 +339,7 @@ internal async Task CanUninstall_Folder()
Assert.True(result[0].Success);
IManagedTemplatePackage? source = result[0].TemplatePackage;
Assert.NotNull(source);
Assert.Equal(templateLocation, source!.MountPointUri);
Assert.Equal(templateLocation, source.MountPointUri);

IReadOnlyList<IManagedTemplatePackage> managedTemplatesPackages = await bootstrapper.GetManagedTemplatePackagesAsync(CancellationToken.None);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ private static void ValidateGuidMacroCreatedParametersWithResolvedValues(string
{
Assert.True(variables.ContainsKey(variableName));
Assert.NotNull(variables[variableName]);
Guid paramValue = Guid.Parse((string)variables[variableName]!);
Guid paramValue = Guid.Parse((string)variables[variableName]);

// check that all the param name variants were created, and their values all resolve to the same guid.
string guidFormats = GuidMacroConfig.DefaultFormats;
for (int i = 0; i < guidFormats.Length; ++i)
{
string otherFormatVariableName = variableName + "-" + guidFormats[i];
Assert.NotNull(variables[otherFormatVariableName]);
Guid testValue = Guid.Parse((string)variables[otherFormatVariableName]!);
Guid testValue = Guid.Parse((string)variables[otherFormatVariableName]);
Assert.Equal(paramValue, testValue);

// Test the new formats - that distinguish upper and lower case by tags that are
Expand All @@ -80,8 +80,8 @@ private static void ValidateGuidMacroCreatedParametersWithResolvedValues(string
(char.IsUpper(guidFormats[i]) ? GuidMacroConfig.UpperCaseDenominator : GuidMacroConfig.LowerCaseDenominator) +
guidFormats[i];

string resolvedValue = (string)variables[otherFormatVariableName]!;
testValue = Guid.Parse((string)variables[otherFormatVariableName]!);
string resolvedValue = (string)variables[otherFormatVariableName];
testValue = Guid.Parse((string)variables[otherFormatVariableName]);
Assert.Equal(paramValue, testValue);
Assert.Equal(char.IsUpper(guidFormats[i]), char.IsUpper(resolvedValue.First(char.IsLetter)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ internal async Task<string> DownloadPackageAsync(
else
{
_nugetLogger.LogDebug($"[NuGet Package Manager] Getting package metadata {identifier}@{version}.");
#pragma warning disable IDE0370
packageVersion = new NuGetVersion(version!);
#pragma warning restore IDE0370
(source, packageMetadata) = await GetPackageMetadataAsync(identifier, packageVersion, packagesSources, cancellationToken);
}

Expand Down Expand Up @@ -318,7 +320,7 @@ await Task.WhenAll(
continue;
}
atLeastOneSourceValid = true;
IPackageSearchMetadata? matchedVersion = foundPackages!.FirstOrDefault(package => package.Identity.Version == packageVersion);
IPackageSearchMetadata? matchedVersion = foundPackages.FirstOrDefault(package => package.Identity.Version == packageVersion);
if (matchedVersion != null)
{
_nugetLogger.LogDebug($"[NuGet Package Manager] Processed source {foundSource.Source}, found {matchedVersion.Identity.Id}@{matchedVersion.Identity.Version} package, cancelling other tasks.");
Expand Down
2 changes: 2 additions & 0 deletions test/Shared/TestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ private static string GetCodeBaseRoot()
{
throw new InvalidOperationException("The codebase root was not found");
}
#pragma warning disable IDE0370
if (!File.Exists(Path.Combine(codeBaseRoot!, "Microsoft.TemplateEngine.sln")))
{
throw new InvalidOperationException("Microsoft.TemplateEngine.sln was not found in codebase root");
Expand All @@ -78,6 +79,7 @@ private static string GetCodeBaseRoot()
throw new InvalidOperationException("Microsoft.TemplateEngine.TestTemplates was not found in test/");
}
return codeBaseRoot!;
#pragma warning restore IDE0370
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private static async Task SaveTemplateStringsFileAsync(
localizedText = templateString.Value;
}

valuesToWrite.Add((templateString.LocalizationKey, localizedText!));
valuesToWrite.Add((templateString.LocalizationKey, localizedText));

// A translation and the related comment should be next to each other. Write the comment now before any other text.
string commentKey = "_" + templateString.LocalizationKey + ".comment";
Expand Down
Loading