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
5 changes: 2 additions & 3 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-dotnet -->
<add key="darc-pub-dotnet-dotnet-fad253f" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-dotnet-fad253f5/nuget/v3/index.json" />
<add key="darc-int-dotnet-dotnet-fad253f" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-dotnet-fad253f5/nuget/v3/index.json" />
<add key="darc-int-dotnet-dotnet-4452502" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-dotnet-44525024/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-dotnet -->
<!-- Begin: Package sources from microsoft-testfx -->
<!-- End: Package sources from microsoft-testfx -->
Expand Down Expand Up @@ -41,7 +40,7 @@
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-dotnet -->
<add key="darc-int-dotnet-dotnet-fad253f" value="true" />
<add key="darc-int-dotnet-dotnet-4452502" value="true" />
<!-- End: Package sources from dotnet-dotnet -->
<!-- Begin: Package sources from dotnet-runtime -->
<!-- End: Package sources from dotnet-runtime -->
Expand Down
262 changes: 131 additions & 131 deletions eng/Version.Details.props

Large diffs are not rendered by default.

524 changes: 262 additions & 262 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion eng/common/internal-feed-operations.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function SetupCredProvider {
$url = 'https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1'

Write-Host "Writing the contents of 'installcredprovider.ps1' locally..."
Invoke-WebRequest $url -OutFile installcredprovider.ps1
Invoke-WebRequest $url -UseBasicParsing -OutFile installcredprovider.ps1

Write-Host 'Installing plugin...'
.\installcredprovider.ps1 -Force
Expand Down
2 changes: 1 addition & 1 deletion eng/common/post-build/nuget-verification.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if ($NuGetExePath) {
Write-Host "Downloading nuget.exe from $nugetExeUrl..."
$ProgressPreference = 'SilentlyContinue'
try {
Invoke-WebRequest $nugetExeUrl -OutFile $downloadedNuGetExe
Invoke-WebRequest $nugetExeUrl -UseBasicParsing -OutFile $downloadedNuGetExe
$ProgressPreference = 'Continue'
} catch {
$ProgressPreference = 'Continue'
Expand Down
6 changes: 3 additions & 3 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ function GetDotNetInstallScript([string] $dotnetRoot) {

Retry({
Write-Host "GET $uri"
Invoke-WebRequest $uri -OutFile $installScript
Invoke-WebRequest $uri -UseBasicParsing -OutFile $installScript
})
}

Expand Down Expand Up @@ -510,7 +510,7 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
Write-Host "Downloading $packageName $packageVersion"
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
Retry({
Invoke-WebRequest "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/flat2/$packageName/$packageVersion/$packageName.$packageVersion.nupkg" -OutFile $packagePath
Invoke-WebRequest "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/flat2/$packageName/$packageVersion/$packageName.$packageVersion.nupkg" -UseBasicParsing -OutFile $packagePath
})

if (!(Test-Path $packagePath)) {
Expand Down Expand Up @@ -556,7 +556,7 @@ function LocateVisualStudio([object]$vsRequirements = $null){
Write-Host "Downloading vswhere $vswhereVersion"
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
Retry({
Invoke-WebRequest "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/vswhere/$vswhereVersion/vswhere.exe" -OutFile $vswhereExe
Invoke-WebRequest "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/vswhere/$vswhereVersion/vswhere.exe" -UseBasicParsing -OutFile $vswhereExe
})
}

Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25605.3",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25605.3",
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25611.1",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25611.1",
"Microsoft.Build.NoTargets": "3.7.0",
"Microsoft.Build.Traversal": "3.4.0",
"Microsoft.WixToolset.Sdk": "5.0.2-dotnet.2811440"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8197,8 +8197,8 @@ class B : IDisposable
{
public void Dispose()
{
A x = new A();{|CS1525:|}
= x{|CS1002:|}
A x = new A();
{|CS1525:=|} x{|CS1002:|}
}
}
");
Expand Down
5 changes: 3 additions & 2 deletions src/RazorSdk/Tool/DiscoverCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,14 @@ private int ExecuteCore(RazorConfiguration configuration, string projectDirector

b.Features.Add(new DefaultMetadataReferenceFeature() { References = metadataReferences });
b.Features.Add(new CompilationTagHelperFeature());
b.Features.Add(new DefaultTagHelperDescriptorProvider());

b.RegisterDefaultTagHelperProducer();

CompilerFeatures.Register(b);
});

var feature = engine.Engine.Features.OfType<ITagHelperFeature>().Single();
var tagHelpers = feature.GetDescriptors();
var tagHelpers = feature.GetTagHelpers();

using (var stream = new MemoryStream())
{
Expand Down
19 changes: 9 additions & 10 deletions src/RazorSdk/Tool/GenerateCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#nullable disable

using System.Collections.Immutable;
using System.Diagnostics;
using System.Threading;
using Microsoft.AspNetCore.Razor.Language;
Expand Down Expand Up @@ -190,7 +191,7 @@ private int ExecuteCore(
{
b.RegisterExtensions();

b.Features.Add(new StaticTagHelperFeature() { TagHelpers = tagHelpers, });
b.Features.Add(new StaticTagHelperFeature(tagHelpers));

b.ConfigureCodeGenerationOptions(b =>
{
Expand Down Expand Up @@ -297,11 +298,11 @@ private VirtualRazorProjectFileSystem GetVirtualRazorProjectSystem(SourceItem[]
return project;
}

private IReadOnlyList<TagHelperDescriptor> GetTagHelpers(string tagHelperManifest)
private static TagHelperCollection GetTagHelpers(string tagHelperManifest)
{
if (!File.Exists(tagHelperManifest))
{
return Array.Empty<TagHelperDescriptor>();
return [];
}

using (var stream = File.OpenRead(tagHelperManifest))
Expand All @@ -311,8 +312,9 @@ private IReadOnlyList<TagHelperDescriptor> GetTagHelpers(string tagHelperManifes
var serializer = new JsonSerializer();
serializer.Converters.Add(TagHelperDescriptorJsonConverter.Instance);

var descriptors = serializer.Deserialize<IReadOnlyList<TagHelperDescriptor>>(reader);
return descriptors;
var tagHelpers = serializer.Deserialize<IReadOnlyList<TagHelperDescriptor>>(reader);

return TagHelperCollection.Create(tagHelpers);
}
}

Expand Down Expand Up @@ -430,12 +432,9 @@ public SourceItem(string sourcePath, string outputPath, string physicalRelativeP
public string CssScope { get; }
}

private class StaticTagHelperFeature : RazorEngineFeatureBase, ITagHelperFeature
private sealed class StaticTagHelperFeature(TagHelperCollection tagHelpers) : RazorEngineFeatureBase, ITagHelperFeature
{
public IReadOnlyList<TagHelperDescriptor> TagHelpers { get; set; }

public IReadOnlyList<TagHelperDescriptor> GetDescriptors(CancellationToken cancellationToken) => TagHelpers;
public IReadOnlyList<TagHelperDescriptor> GetDescriptors() => TagHelpers;
public TagHelperCollection GetTagHelpers(CancellationToken cancellationToken) => tagHelpers;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ public void It_does_not_error_on_duplicate_package_names()
`net5.0`: {
`targetAlias`: `net5.0`
}
},
`restore`: {
`frameworks`: {
`net5.0`: {
`targetAlias`: `net5.0`
}
}
}
}
}".Replace('`', '"');
Expand Down Expand Up @@ -139,6 +146,13 @@ private static string AssetsFileWithInvalidLocale(string tfm, string locale) =>
`{tfm}`: {
`targetAlias`: `{tfm}`
}
},
`restore`: {
`frameworks`: {
`{tfm}`: {
`targetAlias`: `{tfm}`
}
}
}
}
}".Replace("`", "\"").Replace("{tfm}", tfm).Replace("{locale}", locale);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void CanOverrideScopeIdentifiers()
var scoped = Path.Combine(intermediateOutputPath, "scopedcss", "Styles", "Pages", "Counter.rz.scp.css");
new FileInfo(scoped).Should().Exist();
new FileInfo(scoped).Should().Contain("b-overridden");
var generated = Path.Combine(intermediateOutputPath, "generated", "Microsoft.CodeAnalysis.Razor.Compiler", "Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator", "Components_Pages_Counter_razor.g.cs");
var generated = Path.Combine(intermediateOutputPath, "generated", "Microsoft.CodeAnalysis.Razor.Compiler", "Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator", "Components", "Pages", "Counter_razor.g.cs");
new FileInfo(generated).Should().Exist();
new FileInfo(generated).Should().Contain("b-overridden");
new FileInfo(Path.Combine(intermediateOutputPath, "scopedcss", "Components", "Pages", "Index.razor.rz.scp.css")).Should().NotExist();
Expand Down Expand Up @@ -318,7 +318,7 @@ public void Build_RemovingScopedCssAndBuilding_UpdatesGeneratedCodeAndBundle()
new FileInfo(generatedBundle).Should().Exist();
var generatedProjectBundle = Path.Combine(intermediateOutputPath, "scopedcss", "projectbundle", "ComponentApp.bundle.scp.css");
new FileInfo(generatedProjectBundle).Should().Exist();
var generatedCounter = Path.Combine(intermediateOutputPath, "generated", "Microsoft.CodeAnalysis.Razor.Compiler", "Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator", "Components_Pages_Counter_razor.g.cs");
var generatedCounter = Path.Combine(intermediateOutputPath, "generated", "Microsoft.CodeAnalysis.Razor.Compiler", "Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator", "Components", "Pages", "Counter_razor.g.cs");
new FileInfo(generatedCounter).Should().Exist();

var componentThumbprint = FileThumbPrint.Create(generatedCounter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@
TestAssets.TemplateWithFileRenameDate TestAssets.TemplateWithFileRenameDate Test Asset
TemplateWithJoinAndFolderRename TestAssets.TemplateWithJoinAndFolderRename Test Asset
name TestAssets.TemplateWithLocalization project Test Asset C#
TemplateWithMultiValueChoice TestAssets.TemplateWithMultiValueChoice Test Asset
TemplateWithMultipleRenamesOnSameFile TestAssets.TemplateWithMultipleRenamesOnSameFile Test Asset
TemplateWithMultipleRenamesOnSameFileHandles... TestAssets.TemplateWithMultipleRenamesOnSameFileHandlesInducedOverlap Test Asset
TemplateWithMultipleRenamesOnSameFileHandles... TestAssets.TemplateWithMultipleRenamesOnSameFileHandlesOverlap Test Asset
TemplateWithMultiValueChoice TestAssets.TemplateWithMultiValueChoice Test Asset
TemplateWithParamsSharingPrefix TestAssets.TemplateWithParamsSharingPrefix project Test Asset
TemplateWithPlaceholderFiles TestAssets.TemplateWithPlaceholderFiles Test Asset
TemplateWithPortsAndCoalesce TestAssets.TemplateWithPortsAndCoalesce Test Asset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@
TestAssets.TemplateWithFileRenameDate TestAssets.TemplateWithFileRenameDate Test Asset
TemplateWithJoinAndFolderRename TestAssets.TemplateWithJoinAndFolderRename Test Asset
name TestAssets.TemplateWithLocalization project Test Asset C#
TemplateWithMultiValueChoice TestAssets.TemplateWithMultiValueChoice Test Asset
TemplateWithMultipleRenamesOnSameFile TestAssets.TemplateWithMultipleRenamesOnSameFile Test Asset
TemplateWithMultipleRenamesOnSameFileHandles... TestAssets.TemplateWithMultipleRenamesOnSameFileHandlesInducedOverlap Test Asset
TemplateWithMultipleRenamesOnSameFileHandles... TestAssets.TemplateWithMultipleRenamesOnSameFileHandlesOverlap Test Asset
TemplateWithMultiValueChoice TestAssets.TemplateWithMultiValueChoice Test Asset
TemplateWithParamsSharingPrefix TestAssets.TemplateWithParamsSharingPrefix project Test Asset
TemplateWithPlaceholderFiles TestAssets.TemplateWithPlaceholderFiles Test Asset
TemplateWithPortsAndCoalesce TestAssets.TemplateWithPortsAndCoalesce Test Asset
Expand Down
Loading
Loading