Skip to content

Commit

Permalink
Merge main into features/extract-to-component (#10948)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryzngard authored Oct 5, 2024
2 parents be3686f + b776c60 commit 17dbcdb
Show file tree
Hide file tree
Showing 2,243 changed files with 32,070 additions and 28,187 deletions.
19 changes: 19 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0

ARG DOTNET_SDK_INSTALL_URL=https://dot.net/v1/dotnet-install.sh
# Install the correct Roslyn SDK into the same directory that the base image installs the SDK in.
ENV DOTNET_INSTALL_DIR=/usr/share/dotnet

# Copy the global.json file so its available in the image before the repo is cloned
COPY global.json /tmp/

RUN cd /tmp \
&& curl --location --output dotnet-install.sh "${DOTNET_SDK_INSTALL_URL}" \
&& chmod +x dotnet-install.sh \
&& mkdir -p "${DOTNET_INSTALL_DIR}" \
&& ./dotnet-install.sh --jsonfile "./global.json" --install-dir "${DOTNET_INSTALL_DIR}" \
&& rm dotnet-install.sh

# Set up machine requirements to build the repo
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends curl git
60 changes: 60 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/dotnetcore
{
"name": "Razor DevContainer",
"build": {
"dockerfile": "Dockerfile",
// Set the context to the workspace folder to allow us to copy files from it.
"context": ".."
},
"customizations": {
"vscode": {
"settings": {
"files.associations": {
"*.csproj": "msbuild",
"*.fsproj": "msbuild",
"*.globalconfig": "ini",
"*.manifest": "xml",
"*.nuspec": "xml",
"*.pkgdef": "ini",
"*.projitems": "msbuild",
"*.props": "msbuild",
"*.resx": "xml",
"*.rsp": "Powershell",
"*.ruleset": "xml",
"*.settings": "xml",
"*.shproj": "msbuild",
"*.slnf": "json",
"*.targets": "msbuild",
"*.vbproj": "msbuild",
"*.vsixmanifest": "xml",
"*.vstemplate": "xml",
"*.xlf": "xml",
"*.yml": "azure-pipelines"
},
// ms-dotnettools.csharp settings
"omnisharp.disableMSBuildDiagnosticWarning": true,
"omnisharp.enableEditorConfigSupport": true,
"omnisharp.enableImportCompletion": true,
"omnisharp.useModernNet": true,
"omnisharp.enableAsyncCompletion": true,
// ms-dotnettools.csdevkit settings
"dotnet.defaultSolution": "Razor.sln",
// ms-vscode.powershell settings
"powershell.promptToUpdatePowerShell": false,
"powershell.integratedConsole.showOnStartup": false,
"powershell.startAutomatically": false,
// ms-azure-devops.azure-pipelines settings
},
"extensions": [
"ms-dotnettools.csharp",
"ms-dotnettools.csdevkit",
"EditorConfig.EditorConfig",
"ms-vscode.powershell",
"tintoy.msbuild-project-tools",
"ms-azure-devops.azure-pipelines"
]
}
},
"postCreateCommand": "${containerWorkspaceFolder}/restore.sh"
}
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ dotnet_separate_import_directive_groups = false
# IDE0005 - Remove unnecessary imports
dotnet_diagnostic.IDE0005.severity = warning

# IDE0052 - Private member can be removed
dotnet_diagnostic.IDE0052.severity = warning

# IDE0046: If expression can be simplified
dotnet_style_prefer_conditional_expression_over_return = false:silent

Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
},
"dotnet.defaultSolution": "Razor.sln",
"omnisharp.defaultLaunchSolution": "Razor.sln",
"files.encoding": "utf8bom"
"files.encoding": "utf8bom",
"dotnet.testWindow.disableBuildOnRefresh": true
}
73 changes: 49 additions & 24 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,52 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "ActivateDotnet",
"type": "shell",
"windows": {
"command": "echo",
"args": [
"Skipping activation on windows"
]
},
"linux": {
"command": "source",
"args": [
"activate.sh"
],
"options": {
"cwd": "${workspaceFolder}"
},
"presentation": {
"reveal": "silent"
}
},
"version": "2.0.0",
"tasks": [
{
"label": "ActivateDotnet",
"type": "shell",
"windows": {
"command": "echo",
"args": [
"Skipping activation on windows"
]
},
"linux": {
"command": "source",
"args": [
"activate.sh"
],
"options": {
"cwd": "${workspaceFolder}"
},
]
"presentation": {
"reveal": "silent"
}
},
},
{
"label": "build.sh",
"command": "./build.sh",
"type": "shell",
"args": [
],
"windows": {
"command": "${workspaceFolder}/build.cmd",
},
"problemMatcher": "$msCompile",
"group": "build"
},
{
"label": "build Rasor.Slim.slnf",
"command": "dotnet",
"type": "shell",
"args": [
"build",
"-p:RunAnalyzersDuringBuild=false",
"-p:GenerateFullPaths=true",
"Razor.Slim.slnf"
],
"problemMatcher": "$msCompile",
"group": "build"
}
]
}
16 changes: 5 additions & 11 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
<TreatWarningsAsErrors Condition="'$(CI)' == 'true'">true</TreatWarningsAsErrors>
<GenerateResxSource>true</GenerateResxSource>
<GenerateResxSourceEmitFormatMethods>true</GenerateResxSourceEmitFormatMethods>
<ExcludeFromSourceBuild Condition="'$(IsUnitTestProject)' == 'true'">true</ExcludeFromSourceBuild>
<ExcludeFromSourceOnlyBuild Condition="'$(IsUnitTestProject)' == 'true'">true</ExcludeFromSourceOnlyBuild>
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
<EnableWindowsTargeting Condition="'$(DotNetBuildFromSource)' != 'true'">true</EnableWindowsTargeting>
<EnableWindowsTargeting Condition="'$(DotNetBuildSourceOnly)' != 'true'">true</EnableWindowsTargeting>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>

Expand All @@ -40,15 +40,9 @@
<EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>

<!-- By default, nothing builds from source build. Individual projects can opt in instead -->
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
<ExcludeFromSourceOnlyBuild>true</ExcludeFromSourceOnlyBuild>

<DefaultNetFxTargetFramework>net472</DefaultNetFxTargetFramework>

<!--
Needed to avoid error NU1010: The PackageReference items Microsoft.Net.Compilers.Toolset.Framework do not have corresponding PackageVersion.
Related to https://github.com/dotnet/sdk/issues/41791.
-->
<BuildWithNetFrameworkHostedCompiler>false</BuildWithNetFrameworkHostedCompiler>
</PropertyGroup>

<!--
Expand All @@ -61,7 +55,7 @@
necessary as the output of this leg is used in other CI source build legs. Those could be
targeting NetCurrent or NetPrevious hence we must produce both.
-->
<When Condition="'$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildFromSourceFlavor)' != 'Product'">
<When Condition="'$(DotNetBuildSourceOnly)' == 'true' AND '$(DotNetBuildOrchestrator)' != 'true'">
<PropertyGroup>
<DefaultNetCoreTargetFramework>$(NetCurrent)</DefaultNetCoreTargetFramework>
<DefaultNetCoreTargetFrameworks>$(DefaultNetCoreTargetFramework);$(NetPrevious)</DefaultNetCoreTargetFrameworks>
Expand All @@ -71,7 +65,7 @@
<!--
2. Source build the product: this is the all up build of the product which needs only NetCurrent
-->
<When Condition="'$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildFromSourceFlavor)' == 'Product'">
<When Condition="'$(DotNetBuildSourceOnly)' == 'true' AND '$(DotNetBuildOrchestrator)' == 'true'">
<PropertyGroup>
<DefaultNetCoreTargetFramework>$(NetCurrent)</DefaultNetCoreTargetFramework>
<DefaultNetCoreTargetFrameworks>$(DefaultNetCoreTargetFramework)</DefaultNetCoreTargetFrameworks>
Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
here should be _ prefixed to indicate that they are not meant to be used outside this file.
-->
<PropertyGroup>
<_MicrosoftWebToolsPackageVersion>17.9.67-preview-0001</_MicrosoftWebToolsPackageVersion>
<_MicrosoftWebToolsPackageVersion>17.11.11-preview-0001</_MicrosoftWebToolsPackageVersion>
<_MicrosoftVisualStudioShellPackagesVersion>17.11.39721</_MicrosoftVisualStudioShellPackagesVersion>
<_MicrosoftVisualStudioPackagesVersion>17.11.191</_MicrosoftVisualStudioPackagesVersion>
<_VisualStudioLanguageServerProtocolVersion>17.12.1-preview</_VisualStudioLanguageServerProtocolVersion>
Expand Down
Loading

0 comments on commit 17dbcdb

Please sign in to comment.