Merge pull request #12 from dotnet/master

Update live with base config
This commit is contained in:
Andy De George
2020-08-14 11:55:55 -07:00
committed by GitHub
30 changed files with 1214 additions and 25 deletions
+2
View File
@@ -0,0 +1,2 @@
{:allowed-branchname-matches ["^master$" "^release..*"]
:allowed-filename-matches ["^..*"]}
+194
View File
@@ -0,0 +1,194 @@
# editorconfig.org
# top-most EditorConfig file
root = true
# Default settings:
# A newline ending every file
# Use 4 spaces as indentation
[*]
insert_final_newline = true
indent_style = space
indent_size = 4
[project.json]
indent_size = 2
# C# and Visual Basic files
[*.{cs,vb}]
charset = utf-8-bom
dotnet_sort_system_directives_first = true
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
# avoid this. unless absolutely necessary
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion
# name all constant fields using PascalCase
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.required_modifiers = const
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# static fields should have s_ prefix
dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
dotnet_naming_style.static_prefix_style.required_prefix = s_
dotnet_naming_style.static_prefix_style.capitalization = camel_case
# internal and private fields should be _camelCase
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
# Code quality
dotnet_style_readonly_field = true:suggestion
dotnet_code_quality_unused_parameters = non_public:suggestion
# Expression-level preferences
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_auto_properties = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:refactoring
dotnet_style_prefer_conditional_expression_over_return = true:refactoring
# Analyzers
dotnet_code_quality.ca1802.api_surface = private, internal
# C# files
[*.cs]
# New line preferences
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = true
csharp_indent_switch_labels = true
csharp_indent_labels = one_less_than_current
# Modifier preferences
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
# Code style defaults
csharp_using_directive_placement = outside_namespace:suggestion
csharp_prefer_braces = true:refactoring
csharp_preserve_single_line_blocks = true:none
csharp_preserve_single_line_statements = false:none
csharp_prefer_static_local_function = true:suggestion
csharp_prefer_simple_using_statement = false:none
csharp_style_prefer_switch_expression = true:suggestion
# Expression-bodied members
csharp_style_expression_bodied_methods = true:refactoring
csharp_style_expression_bodied_constructors = true:refactoring
csharp_style_expression_bodied_operators = true:refactoring
csharp_style_expression_bodied_properties = true:refactoring
csharp_style_expression_bodied_indexers = true:refactoring
csharp_style_expression_bodied_accessors = true:refactoring
csharp_style_expression_bodied_lambdas = true:refactoring
csharp_style_expression_bodied_local_functions = true:refactoring
# Pattern matching
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
# Expression-level preferences
csharp_prefer_simple_default_expression = true:suggestion
# Null checking preferences
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion
# Other features
csharp_style_prefer_index_operator = false:none
csharp_style_prefer_range_operator = false:none
csharp_style_pattern_local_over_anonymous_function = false:none
# Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = do_not_ignore
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
# Types: use keywords instead of BCL types, and permit var only when the type is clear
csharp_style_var_for_built_in_types = false:suggestion
csharp_style_var_when_type_is_apparent = false:none
csharp_style_var_elsewhere = false:suggestion
# Visual Basic files
[*.vb]
# Modifier preferences
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
# C++ Files
[*.{cpp,h,in}]
curly_bracket_next_line = true
indent_brace_style = Allman
# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
indent_size = 2
# Xml build files
[*.builds]
indent_size = 2
# Xml files
[*.{xml,stylecop,resx,ruleset}]
indent_size = 2
# Xml config files
[*.{props,targets,config,nuspec}]
indent_size = 2
# Shell scripts
[*.sh]
end_of_line = lf
[*.{cmd, bat}]
end_of_line = crlf
+87
View File
@@ -0,0 +1,87 @@
{
"version": 3,
"configRevision": 2,
"issue": {
"opened": {
"processor-default": {
"labels-add": [ ":watch: Not Triaged" ]
},
"processor-meta-docs": {
"technology": {
"(?i)dotnet-wpf$": {
"labels-add": ":card_file_box: Technology - WPF"
},
"(?i)dotnet-winforms$": {
"labels-add": ":card_file_box: Technology - WinForms"
}
},
"contentsource": {
"(?i).*master\/docs\/framework\/wpf.*": {
"labels-add": ":books: Area - Framework,:card_file_box: Technology - WPF"
},
"(?i).*master\/docs\/framework\/winforms.*": {
"labels-add": ":books: Area - Framework,:card_file_box: Technology - WinForms"
},
"(?i).*master\/docs\/net\/wpf.*": {
"labels-add": ":books: Area - NET,:card_file_box: Technology - WPF"
},
"(?i).*master\/docs\/net\/winforms.*": {
"labels-add": ":books: Area - NET,:card_file_box: Technology - WinForms"
}
}
}
},
"closed": {
"processor-default": {
"labels-remove": "in-progress"
}
}
},
"pullrequest": {
"opened": {
"processor-default": {
"milestone-set": "![sprint]"
},
"processor-conditional": {
"type": "query",
"value": "PullRequest.base.ref != 'live'",
"processors": {
"processor-files": {
"changedfile": {
"(?i).*docs\/framework\/wpf.*": {
"labels-add": ":books: Area - Framework,:card_file_box: Technology - WPF"
},
"(?i).*docs\/framework\/winforms.*": {
"labels-add": ":books: Area - Framework,:card_file_box: Technology - WinForms"
},
"(?i).*docs\/net\/wpf.*": {
"labels-add": ":books: Area - NET,:card_file_box: Technology - WPF"
},
"(?i).*docs\/net\/winforms.*": {
"labels-add": ":books: Area - NET,:card_file_box: Technology - WinForms"
}
}
}
}
}
}
},
"comment": {
"created": {
"processor-comment": {
"body": {
"^#please-review$": {
"condition-1": {
"type": "query",
"value": "Issue.state == 'open' && Issue.user.id == Comment.user.id",
"actions": {
"labels-add": "changes-addressed"
}
}
}
}
}
}
}
}
+59 -10
View File
@@ -1,14 +1,63 @@
# Set the default behavior, in case people don't have core.autocrlf set.
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
+8
View File
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: docs.microsoft.com site feedback
url: https://github.com/MicrosoftDocs/feedback/issues/new/choose
about: Log general docs.microsoft.com site issues here
- name: .NET platform and other product feedback
url: https://developercommunity.visualstudio.com/spaces/61/index.html
about: Log product issues here
+36
View File
@@ -0,0 +1,36 @@
---
name: .NET doc issue
about: Report a problem in the .NET documentation
---
**Before you open an issue**
If the issue is:
- A simple typo or similar correction, consider submitting a PR to fix it instead of logging an issue. See [the contributor guide](https://docs.microsoft.com/contribute/#quick-edits-to-existing-documents) for instructions.
- A general support question, consider asking on a support forum site.
- A site design concern, create an issue at [MicrosoftDocs/feedback](https://github.com/MicrosoftDocs/feedback/issues/new/choose).
- A problem completing a tutorial, compare your code with the completed sample.
- A duplicate of an open or closed issue, leave a comment on that issue.
**Issue description**
<include description here>
**Target framework**
Check the .NET target framework(s) being used, and include the version number(s).
- [ ] .NET Core
- [ ] .NET Framework
- [ ] .NET Standard
If using the .NET Core SDK, include `dotnet --info` output. If using .NET Framework without the .NET Core SDK, include info from Visual Studio's **Help** > **About Microsoft Visual Studio** dialog.
<details>
<summary><strong>dotnet --info output</strong> or <strong>About VS info</strong></summary>
```console
<replace>
```
</details>
+16
View File
@@ -0,0 +1,16 @@
---
name: .NET doc request
about: Request a new article to provide missing information
---
**Help us make content visible**
- Tell us what search terms you used and how you searched docs.
- Tell us what docs you found that didn't address your concern.
**Describe the new article**
- Explain why this article is needed.
- Suggest a location in the Table of Contents.
- Write an abstract. In one **short** paragraph, describe what this article will cover.
- Create an outline for the new article. We'll help review the outline and approve it before anyone writes the article.
@@ -0,0 +1,92 @@
---
name: .NET Core breaking change
about: Report a change in .NET Core that breaks something that worked in a previous version (intended mostly for product-team use)
---
<!--
This issue template is for use in creating issues that document breaking changes. This template can be used to create an issue:
- By Microsoft product team members who are documenting a breaking change.
- By Microsoft customers who are experiencing a compatibility issue between .NET Framework and .NET Core or between versions of .NET Core.
Text in brackets is a placeholder; replace the text with the requested information and remove the brackets before submitting the issue.
Also, remove this comment before submitting the issue.
-->
## [Change title]
[Brief description of the change]
### Version introduced
[Version in which the breaking change first occurred (for example, 3.0 for .NET Core 3.0)]
### Old behavior
### New behavior
### Reason for change
### Recommended action
[ Suggested steps if user is affected go here:
- Possible workarounds
- Example of code changes to handle change
]
### Category
[Choose a category from one of the following:
- ASP.NET Core
- C#
- Core .NET libraries
- Cryptography
- Data
- Debugger
- Deployment
- Globalization
- Interop
- JIT
- LINQ
- Managed Extensibility Framework (MEF)
- MSBuild
- Networking
- Printing
- Security
- Serialization
- Visual Basic
- Windows Forms
- Windows Presentation Foundation (WPF)
- XML, XSLT
]
### Affected APIs
[ If no APIs are affected, this should read:
"Not detectable via API analysis"
If affected APIs are identifiable, include a link for each. The link takes the form:
`[friendly description of API](link to API on docs.microsoft.com)`
For example, `[String.IndexOf(String)](https://docs.microsoft.com/dotnet/api/system.string.indexof#System_String_IndexOf_System_String_)
For methods, if all overloads are affected, link to the general overloaded method page. For example:
<https://docs.microsoft.com/dotnet/api/system.string.indexof>
Otherwise, link to the individual method overload. For example:
<https://docs.microsoft.com/dotnet/api/system.string.indexof#System_String_IndexOf_System_String_>
]
<!-- Do not modify anything below this line -->
---
#### Issue metadata
* Issue type: breaking-change
+5
View File
@@ -0,0 +1,5 @@
## Summary
Describe your changes here.
Fixes #Issue_Number (if available)
+10
View File
@@ -0,0 +1,10 @@
# Configuration for probot-no-response - https://github.com/probot/no-response
# Number of days of inactivity before an Issue is closed for lack of response
daysUntilClose: 14
# Label requiring a response
responseRequiredLabel: needs-more-info
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
closeComment: >
This issue has been automatically closed due to no response from the original author.
Please feel free to reopen it if you have more information that can help us investigate the issue further.
+19
View File
@@ -0,0 +1,19 @@
name: "bc-notification"
on:
issues:
types: [edited, labeled]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: timheuer/[email protected]
env:
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API }}
with:
fromMailAddress: '${{ secrets.BC_NOTIFY }}'
toMailAddress: '${{ secrets.BC_NOTIFY }}'
subject: 'BC:'
subjectPrefix: 'BC:'
labelsToMonitor: "breaking-change"
+75
View File
@@ -0,0 +1,75 @@
# This is a basic workflow to help you get started with Actions
name: Snippets 5000
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
pull_request:
paths:
- "**.cs"
- "**.vb"
- "**.fs"
- "**.cpp"
- "**.h"
- "**.xaml"
- "**.razor"
- "**.cshtml"
- "**.vbhtml"
- "**.*proj"
- "**global.json"
- "**snippets.5000.json"
branches: [ master ]
env:
DOTNET_INSTALLER_CHANNEL: 'release/5.0.1xx-preview7'
DOTNET_DO_INSTALL: 'true'
EnableNuGetPackageRestore: 'True'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: windows-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Get the latest preview SDK (or sdk not installed by the runner)
- name: Setup .NET Core SDK Preview
if: ${{ env.DOTNET_DO_INSTALL == 'true' }}
run: |
echo "Downloading dotnet-install.ps1"
Invoke-WebRequest https://dot.net/v1/dotnet-install.ps1 -OutFile dotnet-install.ps1
echo "Installing dotnet version ${{ env.DOTNET_INSTALLER_CHANNEL }}"
.\dotnet-install.ps1 -InstallDir "c:\program files\dotnet" -Channel "${{ env.DOTNET_INSTALLER_CHANNEL }}"
# Install locate projs global tool
- name: Install LocateProjects tool
run: |
dotnet tool install --global --add-source ./.github/workflows/dependencies/ DotnetDocsTools.LocateProjects
# Run locate projs tool
- name: Locate projects for PR
env:
GitHubKey: ${{ secrets.GITHUB_TOKEN }}
LocateExts: ".cs;.vb;.fs;.cpp;.h;.xaml;.razor;.cshtml;.vbhtml;.csproj;.fsproj;.vbproj;.sln"
run: |
./.github/workflows/dependencies/Get-MSBuildResults.ps1 "${{ github.workspace }}" -PullRequest ${{ github.event.number }} -RepoOwner ${{ github.repository_owner }} -RepoName ${{ github.event.repository.name }}
# Update build output json file
- name: Upload build results
uses: actions/upload-artifact@v1
with:
name: build
path: ./output.json
# Return status based on json file
- name: Report status
run: |
./.github/workflows/dependencies/Out-GithubActionStatus.ps1
@@ -0,0 +1,275 @@
<#
.SYNOPSIS
Invokes dotnet build on the samples sln and project files.
.DESCRIPTION
Invokes dotnet build on the samples sln and project files.
.PARAMETER RepoRootDir
The directory of the repository files on the local machine.
.PARAMETER PullRequest
The pull requst to process. If 0 or not passed, processes the whole repo
.PARAMETER RepoOwner
The name of the repository owner.
.PARAMETER RepoName
The name of the repository.
.PARAMETER RangeStart
A range of results to process.
.PARAMETER RangeEnd
A range of results to process.
.INPUTS
None
.OUTPUTS
None
.NOTES
Version: 1.3
Author: adegeo@microsoft.com
Creation Date: 07/02/2020
Purpose/Change: Add support for config file. Select distinct on project files.
#>
[CmdletBinding()]
Param(
[Parameter(Mandatory = $true, ValueFromPipeline = $false)]
[System.String] $RepoRootDir = $env:RepoRootDir,
[Parameter(Mandatory = $false, ValueFromPipeline = $false)]
[System.Int64] $PullRequest = 0,
[Parameter(Mandatory = $false, ValueFromPipeline = $false)]
[System.String] $RepoOwner = "",
[Parameter(Mandatory = $false, ValueFromPipeline = $false)]
[System.String] $RepoName = "",
[Parameter(Mandatory = $false, ValueFromPipeline = $false)]
[System.Int32] $RangeStart = $env:rangestart,
[Parameter(Mandatory = $false, ValueFromPipeline = $false)]
[System.Int32] $RangeEnd = $env:rangeend
)
$Global:statusOutput = @()
Write-Host "Gathering solutions and projects..."
if ($PullRequest -ne 0) {
Write-Host "Running `"LocateProjects `"$RepoRootDir`" --pullrequest $PullRequest --owner $RepoOwner --repo $RepoName`""
$output = Invoke-Expression "LocateProjects `"$RepoRootDir`" --pullrequest $PullRequest --owner $RepoOwner --repo $RepoName"
}
else {
Write-Host "Running `"LocateProjects `"$RepoRootDir`""
$output = Invoke-Expression "LocateProjects `"$RepoRootDir`""
}
if ($LASTEXITCODE -ne 0)
{
$output
throw "Error on running LocateProjects"
}
function New-Result($inputFile, $projectFile, $exitcode, $outputText)
{
$info = @{}
$info.InputFile = $inputFile
$info.ProjectFile = $projectFile
$info.ExitCode = $exitcode
$info.Output = $outputText
$object = New-Object -TypeName PSObject -Prop $info
$Global:statusOutput += $object
}
$workingSet = $output
if (($RangeStart -ne 0) -and ($RangeEnd -ne 0)){
$workingSet = $output[$RangeStart..$RangeEnd]
}
# Log working set items prior to filtering
$workingSet | Write-Host
# Remove duplicated projects
$projects = @()
$workingSetTemp = @()
foreach ($item in $workingSet) {
$data = $item.Split('|')
if ($projects.Contains($data[2].Trim())) {
continue
}
if ($data[2].Trim() -ne "") {
$projects += $data[2].Trim()
}
$workingSetTemp += $item
}
$workingSet = $workingSetTemp
# Process working set
$counter = 1
$length = $workingSet.Count
$thisExitCode = 0
$ErrorActionPreference = "Continue"
foreach ($item in $workingSet) {
try {
Write-Host "$counter/$length :: $Item"
$data = $item.Split('|')
# Project found, build it
if ([int]$data[0] -eq 0) {
$projectFile = Resolve-Path "$RepoRootDir\$($data[2])"
$configFile = [System.IO.Path]::Combine([System.IO.Path]::GetDirectoryName($projectFile), "snippets.5000.json")
# Create the default build command
"dotnet build `"$projectFile`"" | Out-File ".\run.bat"
# Check for config file
if ([System.IO.File]::Exists($configFile) -eq $true) {
Write-Host "- Config file found"
$settings = $configFile | Get-ChildItem | Get-Content | ConvertFrom-Json
if ($settings.host -eq "visualstudio") {
Write-Host "- Using visual studio as build host"
# Create the visual studio build command
"CALL `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat`"`n" +
"msbuild.exe `"$projectFile`" -restore:True" `
| Out-File ".\run.bat"
}
}
$result = Invoke-Expression ".\run.bat" | Out-String
$thisExitCode = 0
if ($LASTEXITCODE -ne 0) {
$thisExitCode = 4
}
New-Result $data[1] $projectFile $thisExitCode $result
}
# No project found
elseif ([int]$data[0] -eq 1) {
New-Result $data[1] "" 1 "😵 Project missing. A project (and optionally a solution file) must be in this directory or one of the parent directories to validate and build this code."
$thisExitCode = 1
}
# Too many projects found
elseif ([int]$data[0] -eq 2) {
New-Result $data[1] $data[2] 2 "😕 Too many projects found. A single project or solution must existing in this directory or one of the parent directories."
$thisExitCode = 2
}
# Solution found, but no project
elseif ([int]$data[0] -eq 3) {
New-Result $data[1] $data[2] 2 "😲 Solution found, but missing project. A project is required to compile this code."
$thisExitCode = 3
}
}
catch {
New-Result $data[1] $projectFile 1000 "ERROR: $($_.Exception)"
$thisExitCode = 4
Write-Host $_.Exception.Message -Foreground "Red"
Write-Host $_.ScriptStackTrace -Foreground "DarkGray"
}
$counter++
}
$resultItems = $Global:statusOutput | Select-Object InputFile, ProjectFile, ExitCode, Output
# Add our output type
$typeResult = @"
public class ResultItem
{
public string ProjectFile;
public string InputFile;
public int ExitCode;
public string BuildOutput;
public MSBuildError[] Errors;
public int ErrorCount;
public class MSBuildError
{
public string Line;
public string Error;
}
}
"@
Add-Type $typeResult
$transformedItems = $resultItems | ForEach-Object { New-Object ResultItem -Property @{
ProjectFile = $_.ProjectFile.Path;
InputFile = $_.InputFile;
ExitCode = $_.ExitCode;
BuildOutput = $_.Output;
Errors = @();
ErrorCount = 0}
}
# Transform the build output to break it down into MSBuild result entries
foreach ($item in $transformedItems) {
$list = @()
# Clean
if ($item.ExitCode -eq 0) {
#$list += New-Object -TypeName "ResultItem+MSBuildError" -Property @{ Line = $item.BuildOutput; Error = $item.BuildOutput }
}
# No project found
# Too many projects found
# Solution found, but no project
elseif ($item.ExitCode -ne 4) {
$list += New-Object -TypeName "ResultItem+MSBuildError" -Property @{ Line = $item.BuildOutput; Error = $item.BuildOutput }
$item.ErrorCount = 1
}
else {
$errorInfo = $item.BuildOutput -Split [System.Environment]::NewLine |
Select-String ": (?:Solution file error|error) ([^:]*)" | `
Select-Object Line -ExpandProperty Matches | `
Select-Object Line, Groups | `
Sort-Object Line | Get-Unique -AsString
$item.ErrorCount = $errorInfo.Count
foreach ($err in $errorInfo) {
$list += New-Object -TypeName "ResultItem+MSBuildError" -Property @{ Line = $err.Line; Error = $err.Groups[1].Value }
}
# Error count of 0 here means that no error was detected from build results, but there was still a failure of some kind
if ($item.ErrorCount -eq 0) {
$list += New-Object -TypeName "ResultItem+MSBuildError" -Property @{ Line = "Unknown error occurred. Check log and build output."; Error = "4" }
$item.ErrorCount = 1
}
}
$item.Errors = $list
}
$transformedItems | ConvertTo-Json -Depth 3 | Out-File 'output.json'
exit 0
# Sample snippets.5000.json file
<#
{
"host": "visualstudio"
}
#>
@@ -0,0 +1,53 @@
<#
.SYNOPSIS
Reads the output.json file and outputs status to GitHub Actions
.DESCRIPTION
Reads the output.json file and outputs status to GitHub Actions
.INPUTS
None
.OUTPUTS
None
.NOTES
Version: 1.1
Author: adegeo@microsoft.com
Creation Date: 06/24/2020
Purpose/Change: Change reporting items
#>
[CmdletBinding()]
Param(
)
$json = Get-Content output.json | ConvertFrom-Json
$errors = $json | Where-Object ErrorCount -ne 0 | Select-Object InputFile -ExpandProperty Errors | Select-Object InputFile, Error, Line
if ($errors.Count -eq 0) {
Write-Host "All builds passed"
exit 0
}
Write-Host "Total errors: $($errors.Count)"
foreach ($er in $errors) {
$lineColMatch = $er.Line | Select-String "(^.*)\((\d*),(\d*)\)" | Select-Object -ExpandProperty Matches | Select-Object -ExpandProperty Groups
$errorFile = $er.InputFile
$errorLineNumber = 0
$errorColNumber = 0
if ($lineColMatch.Count -eq 4) {
$errorFile = $lineColMatch[1].Value.Replace("D:\a\docs\docs\", "").Replace("\", "/")
$errorLineNumber = $lineColMatch[2].Value
$errorColNumber = $lineColMatch[3].Value
}
Write-Host "::error file=$errorFile,line=$errorLineNumber,col=$errorColNumber::$($er.Line)"
}
exit 1
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "markdownlint",
"pattern": [
{
"regexp": "^([^:]*):(\\d+):?(\\d+)?\\s([\\w-\\/]*)\\s(.*)$",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
]
}
]
}
+32
View File
@@ -0,0 +1,32 @@
name: Markdownlint
on:
push:
paths:
- "**/*.md"
- ".markdownlint.json"
- ".github/workflows/markdownlint.yml"
- ".github/workflows/markdownlint-problem-matcher.json"
pull_request:
paths:
- "**/*.md"
- ".markdownlint.json"
- ".github/workflows/markdownlint.yml"
- ".github/workflows/markdownlint-problem-matcher.json"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Run Markdownlint
run: |
echo "::add-matcher::.github/workflows/markdownlint-problem-matcher.json"
npm i -g markdownlint-cli
markdownlint "**/*.md" -i "samples/**/*.md"
+45 -7
View File
@@ -1,8 +1,46 @@
log/
obj/
_site/
.optemp/
_themes*/
_repo.*/
docs/_build/
.idea/
*.swp
rebuild.cmd
.openpublishing.buildcore.ps1
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
_site/
api/
_themes/
_themes.pdf/
_csharplang/
_vblang/
log/
.optemp/
.openpublishing.buildcore.ps1
# Spelling add-on file for Visual Studio Code.
spell.json
samples/framework/docker/MVCRandomAnswerGenerator/containerImage
.DS_Store
_dependentPackages/
!/xml/System.IO.Log/
!/xml/System.Net.Cache/
# Visual Studio Code
.vscode/
!.vscode/extensions.json
# Visual Studio 2019
.vs
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Windows shortcuts
*.lnk
[Bb]in/
[Oo]bj/
*.sln
*.user
+43
View File
@@ -0,0 +1,43 @@
{
"default": true,
"MD001": false,
"MD004": false,
"MD013": false,
"MD022": false,
"MD024": false,
"MD025": {
"front_matter_title": ""
},
"MD026": false,
"MD028": false,
"MD033": {
"allowed_elements": [
"a",
"blockquote",
"br",
"code",
"em",
"h4",
"kbd",
"li",
"ol",
"p",
"pre",
"sup",
"table",
"tbody",
"td",
"th",
"thead",
"tr",
"u",
"ul"
]
},
"MD036": false,
"MD040": false,
"MD041": false,
"MD046": {
"style": "fenced"
}
}
+8
View File
@@ -7,6 +7,13 @@
"locale": "en-us",
"monikers": [],
"moniker_ranges": [],
"filemap_share_depots": [
"VS.dotnet-api-docs"
],
"xref_query_tags": [
"/dotnet",
"/uwp/api"
],
"open_to_public_contributors": true,
"type_mapping": {
"Conceptual": "Content"
@@ -22,6 +29,7 @@
"branches_to_filter": [],
"skip_source_output_uploading": false,
"need_preview_pull_request": true,
"need_pr_comments": false,
"contribution_branch_mappings": {},
"dependent_repositories": [
{
+5
View File
@@ -0,0 +1,5 @@
# Code of Conduct
This project has adopted the code of conduct defined by the Contributor Covenant
to clarify expected behavior in our community.
For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
+5
View File
@@ -0,0 +1,5 @@
# Contributing
Thank you for your interest in contributing to the .NET documentation!
We have moved our guidelines into a site-wide contribution guide. To see the guidance, visit the [Microsoft Docs contributor guide](https://docs.microsoft.com/contribute/dotnet/dotnet-contribute).
+2 -2
View File
@@ -1,4 +1,4 @@
Attribution 4.0 International
Attribution 4.0 International
=======================================================================
@@ -378,7 +378,7 @@ Section 8 -- Interpretation.
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the Licensor. The text of the Creative Commons
will be considered the "Licensor." The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
+5 -4
View File
@@ -1,4 +1,5 @@
## Legal Notices
# Legal Notices
Microsoft and any contributors grant you a license to the Microsoft documentation and other content
in this repository under the [Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/legalcode),
see the [LICENSE](LICENSE) file, and grant you a license to any code in the repository under the [MIT License](https://opensource.org/licenses/MIT), see the
@@ -7,9 +8,9 @@ see the [LICENSE](LICENSE) file, and grant you a license to any code in the repo
Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation
may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries.
The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks.
Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.
Microsoft's general trademark guidelines can be found at <https://go.microsoft.com/fwlink/?LinkID=254653>.
Privacy information can be found at https://privacy.microsoft.com/en-us/
Privacy information can be found at <https://privacy.microsoft.com/>
Microsoft and any contributors reserve all others rights, whether under their respective copyrights, patents,
or trademarks, whether by implication, estoppel or otherwise.
or trademarks, whether by implication, estoppel or otherwise.
+2
View File
@@ -0,0 +1,2 @@
- name: Index
href: index.md
+3
View File
@@ -0,0 +1,3 @@
- name: Docs
tocHref: /
topicHref: /
+12 -2
View File
@@ -24,6 +24,7 @@
{
"files": [
"**/*.png",
"**/*.gif",
"**/*.jpg"
],
"exclude": [
@@ -41,9 +42,18 @@
"globalMetadata": {
"breadcrumb_path": "/dotnet/desktop/breadcrumb/toc.json",
"extendBreadcrumb": true,
"feedback_system": "None"
"feedback_system": "GitHub",
"feedback_github_repo": "dotnet/docs-desktop",
"feedback_product_url": "https://developercommunity.visualstudio.com/spaces/61/index.html"
},
"fileMetadata": {
"titleSuffix": {
"framework/winforms/**/**.md": "Windows Forms .NET Framework",
"net/winforms/**/**.md": "Windows Forms .NET",
"framework/wpf/**/**.md": "WPF .NET Framework",
"net/wpf/**/**.md": "WPF .NET"
}
},
"fileMetadata": {},
"template": [],
"dest": "dotnet-desktop-guide",
"markdownEngineName": "markdig"
+1
View File
@@ -0,0 +1 @@
# Welcome to dotnet-desktop-guide!
+83
View File
@@ -0,0 +1,83 @@
# GitHub issues process and policy
The goals of the process are:
1. Ensure errors or omissions in our docs are not blocking customer success.
1. Be responsive to customer feedback and concerns.
1. Continually improve the customer experience.
1. Learn more about customer experiences through open dialog on challenges and solutions.
The process uses two stages to ensure responsiveness while prioritizing work. The initial stage diagnoses and triages the issue. The second stage resolves the issue. When an issue is both easy and urgent, the two stages may be combined.
The process involves tasks with fixed time allocations:
- Each team member spends up to 1/2 hour each business day [classifying incoming issues](#diagnosis-phase), including initial responses. This ensures we are responsive to new issues.
- Each team member spends up to 1/2 day per week [updating documents](#resolution-phase) to address customer-generated GitHub issues.
## Diagnosis phase
Every team member spends up to 30 minutes per business day categorizing new issues. We answer the following questions:
- Is the issue a docs issue or a product issue?
- Is it not an issue, but a question better suited for a forum or support site?
- What priority is the issue?
- What area manages this issue?
If these questions can't be answered in the initial examination, we ask clarifying questions in the comments.
There are types of issues that are closed during the diagnosis and triage phase:
- **kudos**: We express thanks, and close the issue.
- **product issue**: Issues that are related to the product and not to its documentation are closed. We may also take additional actions, as described below.
- **CoC violations**: These issues are closed and reported if the [CoC violation](https://dotnetfoundation.org/code-of-conduct) merits reporting and blocking.
- **duplicates**: Duplicates are closed with a comment referencing the existing issue.
- **doc-ok**: The customer is incorrect, and the doc is correct.
- **forum**: Issues that are support or forum requests are directed to Stack Overflow or other support sites, and closed.
### Actions on product issues
Depending on the nature of the product issue, we may choose to:
- Transfer the issue to the appropriate product repository.
- Close the issue as a duplicate of existing product requests.
- Close the issue with a recommendation to open on the product repository.
Evaluating the correct course of action is subjective. The team members use their judgment on the correct action.
### Actions on content issues
For other issues, the team:
- Assigns a priority
- Assigns a milestone, usually "Backlog"
- Assesses if an issue is a good "up for grabs" issue, or the [Projects for .NET Community Contributors](https://github.com/dotnet/docs/projects/35)
Priority levels are based on the following guidelines but are subjective. The milestones are also subjective and are based on other priorities such as current product release schedules and upcoming launches.
- **P0**: A docs omission or error prevents customers from succeeding in a common scenario.
- **P0** issues are addressed within the next three weeks, taking precedence over previously scheduled work.
- **P1**: A docs omission or error makes a common scenario much harder or blocks other well-known scenarios.
- **P1** issues are scheduled in a timely manner. Often, P1 issues are planned for an upcoming milestone.
- **P2**: Issues that cause minor inconveniences, or affect a low page view article.
- **P2** issues are generally fixed when an article is updated for higher-priority reasons.
- **P3**: Issues that are requests for edge case scenarios.
- **P3** issues are placed in the backlog and are considered for update when articles are updated for higher-priority reasons.
Team members spend a limited amount of time on diagnosis and triage so they can make progress on scheduled tasks. Each team member spends at most 30 minutes per day in diagnosis and triage.
The **up-for-grabs** label is applied when an issue is a good candidate for a community member (possibly the author) to submit a fix. The team member that applies the **up-for-grabs** label will help or find someone to help community members work through the PR creation process. Issues that are "up for grabs" are often added to the [Community Contribution projects](https://github.com/dotnet/docs/projects/35)
> NOTE: We've only recently adopted the preceding convention. The person that added the label may refer you to another team member who will help.
## Resolution phase
Customer generated issues are weighted as part of scheduled task planning. Each team member allocates 4 hours per week to addressing the highest priority customer issues.
Issue resolution follows from the priority level set during diagnosis. The incoming customer issues are prioritized with other scheduled work of similar priority
- **P0**: As soon as is reasonable, during the next three weeks.
- **P1**: Scheduled with other planned P1 work. This usually means in the next three months.
- **P2**: Scheduled with other planned P2 work. P2 issues are scheduled regularly based on area and visibility. More often, P2 issues will be addressed when an article is updated.
- **P3**: No guarantee on fix date. When an article is updated, we examine the backlog for other issues on the same article.
Issues may be reprioritized based on new feedback and data about article visibility.
+20
View File
@@ -0,0 +1,20 @@
{
"msbuild": {
"enabled": false,
"ToolsVersion": null,
"VisualStudioVersion": null,
"Configuration": null,
"Platform": null,
"EnablePackageAutoRestore" : false,
"MSBuildExtensionsPath": null,
"TargetFrameworkRootPath" : null,
"MSBuildSDKsPath": null,
"RoslynTargetsPath" : null,
"CscToolPath": null,
"CscToolExe": null,
"loadProjectsOnDemand": false
},
"script": {
"enabled": false
}
}