Git Product home page Git Product logo

dotnet / samples Goto Github PK

View Code? Open in Web Editor NEW
3.2K 375.0 5.0K 276.93 MB

Sample code referenced by the .NET documentation

Home Page: https://docs.microsoft.com/samples/browse

License: Creative Commons Attribution 4.0 International

C# 71.79% PowerShell 0.06% F# 0.03% C++ 10.07% CSS 0.19% HTML 1.24% Batchfile 1.84% C 2.29% Dockerfile 0.04% Shell 0.01% Visual Basic .NET 10.42% CMake 0.01% Objective-C 0.11% Java 0.04% JavaScript 0.30% TSQL 0.47% ASP.NET 0.75% VBScript 0.35%
dotnet csharp fsharp visual-basic dotnet-core

samples's Introduction

.NET Samples

Markdownlint Snippets 5000 target supported version

This repo contains all the sample code that is part of any topic under the .NET documentation. There are several different projects that are organized in sub-folders. These sub-folders are organized similarly to the organization of the docs for .NET. Some of the articles will have more than one sample associated with them.

The content team tracks issues for .NET documentation in the dotnet/docs and dotnet/dotnet-api-docs repositories. Issues are turned off on this repository. File issues against existing samples and suggestions for new samples in those repositories. If you're not sure where, choose dotnet/docs. This process keeps the issues associated with the articles that explain the concepts for each sample. The best process is to file an issue from the feedback control at the bottom of each docs page:

  • For existing samples, file the issue on the page with the sample.
  • To suggest new samples, file the issue on the index page where you want to see the new sample.

The code in this repository represents programs that demonstrate application or library scenarios. These samples often use more than one technology, feature, or toolkit. Each sample has a readme.md file that explains the sample and links to resources for more information.

Samples should be buildable projects. Those projects should build and run on the widest set of platforms possible for the given sample. In practice, that means building .NET Core-based console applications where possible. Samples that are specific to the web or a UI framework should add those tools as needed. Examples include web applications, mobile apps, WPF or Windows Forms apps, and so on.

We are working toward having a CI system in place for all code. When you make any updates to samples, make sure each update is part of a buildable project. Ideally, add tests for correctness on samples as well.

Building a sample

Build any .NET Core sample using the .NET Core CLI, which is installed with the .NET Core SDK. Then run these commands from the CLI in the directory of any sample:

dotnet build
dotnet run

These will install any needed dependencies, build the project, and run the project respectively.

Multi-project samples have instructions in their root directory in a README.md file.

Except where noted, all samples build from the command line on any platform supported by .NET Core. There are a few samples that are specific to Visual Studio and require Visual Studio 2017 or later. In addition, some samples show platform-specific features and will require a specific platform. Other samples and snippets require the .NET Framework and will run on Windows platforms, and will need the Developer Pack for the target Framework version.

Creating new samples

If you wish to add a code sample:

  1. Your sample must be part of a buildable project. Where possible, the projects should build on all platforms supported by .NET Core. Exceptions to this are samples that demonstrate a platform-specific feature or platform-specific tool.

  2. Your sample should conform to the runtime coding style to maintain consistency.

    • Additionally, we prefer the use of static methods rather than instance methods when demonstrating something that doesn't require instantiating a new object.
  3. Your sample should include appropriate exception handling. It should handle all exceptions that are likely to be thrown in the context of the sample. For example, a sample that calls the Console.ReadLine method to retrieve user input should use appropriate exception handling when the input string is passed as an argument to a method. Similarly, if your sample expects a method call to fail, the resulting exception must be handled. Always handle the specific exceptions thrown by the method, rather than base class exceptions such as Exception or SystemException.

  4. If your sample builds a standalone package, you must include the runtimes used by our CI build system, in addition to any runtimes used by your sample:

    • win7-x64
    • win8-x64
    • win81-x64
    • ubuntu.16.04-x64

We will have a CI system in place to build these projects shortly.

To create a sample:

  1. File an issue or add a comment to an existing one that you are working on it.

  2. Write the topic that explains the concepts demonstrated in your sample (example: docs/standard/linq/where-clause.md).

  3. Write your sample (example: WhereClause-Sample1.cs).

  4. Create a Program.cs with a Main entry point that calls your samples. If there is already one there, add the call to your sample:

    public class Program
    {
        public void Main(string[] args)
        {
            WhereClause1.QuerySyntaxExample();
    
            // Add the method syntax as an example.
            WhereClause1.MethodSyntaxExample();
        }
    }
  5. Don't check in the solution file if it contains only one project.

To build and run your sample:

  1. Go to the sample folder and build to check for errors:

    dotnet build
  2. Run your sample:

    dotnet run
  3. Add a README.md to the root directory of your sample.

    This should include a brief description of the code, and refer people to the article that references the sample.

samples's People

Contributors

adegeo avatar bethmassi avatar billwagner avatar camsoper avatar cartermp avatar dependabot-preview[bot] avatar dependabot[bot] avatar elinor-fung avatar gewarren avatar github-actions[bot] avatar guardrex avatar ievangelist avatar imba-tjd avatar jpierson avatar jralexander avatar lindexi avatar luisquintanilla avatar mairaw avatar mikkelbu avatar nschonni avatar nxtn avatar paul1956 avatar pkulikov avatar richlander avatar svick avatar tdykstra avatar thraka avatar vitek-karas avatar williamantonrohm avatar youssef1313 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

samples's Issues

Check C# samples/snippets syntax

I'm about to submit a series of PRs to check syntax and styles of samples. This issue is for general suggestions and discussions.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/VS_Snippets_CFX/c_customwsdlextensions/cs/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/VS_Snippets_CLR/Type_GetMethod3/CS/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/tour-of-async/AsyncBreakfast-V2/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/VS_Snippets_CFX/interceptors/cs/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/programming-guide/nullable-types/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Duplicated files

File 1:
https://github.com/dotnet/samples/blob/master/snippets/csharp/VS_Snippets_Remoting/Classic%20WebServiceBindingAttribute.Location%20Example/CS/sourcecs.asmx

File 2:
https://github.com/dotnet/samples/blob/master/snippets/csharp/VS_Snippets_Remoting/Classic%20WebServiceBindingAttribute.WebServiceBindingAttribute3%20Example/CS/sourcecs.asmx

Also it doesn't render correctly in the Live dotnet api docs

The article .md file refers to the snippet1 in that file, however, all the file is rendered even with the // <Snippet1> comment. The code snippet is also not colored properly.

Screenshot:
image

Should the // <Snippet1> comments be removed like the #1060 PR done by @mairaw ?

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/VS_Snippets_CFX/c_bestpractices-concurrency/cs/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Update AppWithPlugin sample to correctly specify non-private project references

Issue description

The AppWithPlugin sample uses this for non-private project references:

<ProjectReference Include="PluginBase">
  <Private>false</Private>
</ProjectReference>

This works for the sample itself, but it doesn't always correctly translate for more complex projects. Specifically if PluginBase would have a PackageReference, the "Private=false" doesn't correctly propagate over to the PackageReference and the output contains "traces" of the NuGet package (in the .deps.json). This can cause issues when loading plugins.

The workaround seems to be to include "ExcludeAssets=runtime" as well, so the project reference would look like this:

<ProjectReference Include="PluginBase">
  <Private>false</Private>
  <ExcludeAssets>runtime</ExcludeAssets>
</ProjectReference>

The exact workaround needs to be validated with the product team (@nguerrera).
Even though this is not necessary for the sample in question, fixing it here will make people using the sample more likely to a working state at first try.

We're still trying to figure out if this is an actual product bug or if this is a desired behavior. Either way for .NET Core 3.0 this is how it works, and so fixing the sample is preferable.

Target framework

.NET Core 3.0

Create a Custom View Mode for a WPF ListView in dotnet core

The following example is not working in a dotnetcore 3.0 wpf application while i works fine in dotnetfx:

https://docs.microsoft.com/en-us/dotnet/framework/wpf/controls/how-to-create-a-custom-view-mode-for-a-listview

When switching to icon/thumb view i get a empty list and this binding errors:

System.Windows.Data Error: 40 : BindingExpression path error: 'ColumnHeaderContainerStyle' property not found on 'object' ''PlainView' (HashCode=55724670)'. BindingExpression:Path=TemplatedParent.View.ColumnHeaderContainerStyle; DataItem='ScrollViewer' (Name=''); target element is 'GridViewHeaderRowPresenter' (Name=''); target property is 'ColumnHeaderContainerStyle' (type 'Style')
System.Windows.Data Error: 40 : BindingExpression path error: 'ColumnHeaderTemplate' property not found on 'object' ''PlainView' (HashCode=55724670)'. BindingExpression:Path=TemplatedParent.View.ColumnHeaderTemplate; DataItem='ScrollViewer' (Name=''); target element is 'GridViewHeaderRowPresenter' (Name=''); target property is 'ColumnHeaderTemplate' (type 'DataTemplate')
System.Windows.Data Error: 40 : BindingExpression path error: 'ColumnHeaderTemplateSelector' property not found on 'object' ''PlainView' (HashCode=55724670)'. BindingExpression:Path=TemplatedParent.View.ColumnHeaderTemplateSelector; DataItem='ScrollViewer' (Name=''); target element is 'GridViewHeaderRowPresenter' (Name=''); target property is 'ColumnHeaderTemplateSelector' (type 'DataTemplateSelector')
System.Windows.Data Error: 40 : BindingExpression path error: 'ColumnHeaderStringFormat' property not found on 'object' ''PlainView' (HashCode=55724670)'. BindingExpression:Path=TemplatedParent.View.ColumnHeaderStringFormat; DataItem='ScrollViewer' (Name=''); target element is 'GridViewHeaderRowPresenter' (Name=''); target property is 'ColumnHeaderStringFormat' (type 'String')
System.Windows.Data Error: 40 : BindingExpression path error: 'AllowsColumnReorder' property not found on 'object' ''PlainView' (HashCode=55724670)'. BindingExpression:Path=TemplatedParent.View.AllowsColumnReorder; DataItem='ScrollViewer' (Name=''); target element is 'GridViewHeaderRowPresenter' (Name=''); target property is 'AllowsColumnReorder' (type 'Boolean')
System.Windows.Data Error: 40 : BindingExpression path error: 'ColumnHeaderContextMenu' property not found on 'object' ''PlainView' (HashCode=55724670)'. BindingExpression:Path=TemplatedParent.View.ColumnHeaderContextMenu; DataItem='ScrollViewer' (Name=''); target element is 'GridViewHeaderRowPresenter' (Name=''); target property is 'ColumnHeaderContextMenu' (type 'ContextMenu')
System.Windows.Data Error: 40 : BindingExpression path error: 'ColumnHeaderToolTip' property not found on 'object' ''PlainView' (HashCode=55724670)'. BindingExpression:Path=TemplatedParent.View.ColumnHeaderToolTip; DataItem='ScrollViewer' (Name=''); target element is 'GridViewHeaderRowPresenter' (Name=''); target property is 'ColumnHeaderToolTip' (type 'Object')
System.Windows.Data Error: 40 : BindingExpression path error: 'Columns' property not found on 'object' ''PlainView' (HashCode=55724670)'. BindingExpression:Path=TemplatedParent.View.Columns; DataItem='ScrollViewer' (Name=''); target element is 'GridViewHeaderRowPresenter' (Name=''); target property is 'Columns' (type 'GridViewColumnCollection')

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/tour-of-async/AsyncBreakfast-final/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Unused code samples

There might be alot of unused code samples that needs to be removed.
Is there an easy way to determine if a specific sample is used or not ?
The samples here are used by dotnet/docs and dotnet/dotnet-api-docs, are there any other repos ?

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/tour/arrays/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/tuples/tuples/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/tuples/tuples/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/VS_Snippets_CLR/AddInCollectionPipelineHost/cs/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/visualbasic/how-to/conversions/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/tour/enums/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Can't install "Microsoft.NETCore.DotNetAppHost"

I'm trying to host .Net Core in native process (C++), as described in this sample https://github.com/dotnet/samples/tree/master/core/hosting/HostWithHostFxr.

When installing the "Microsoft.NETCore.DotNetAppHost" nuget package, I get this error : "Could not install package 'Microsoft.NETCore.DotNetAppHost 3.1.0'. You are trying to install this package into a project that targets 'native,Version=v0.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author."

The host application is a C++ console project.
I am using Windows.
I have the .NET Core 3.1 SDK installed.

I tried both making a new project or building the one in the sample, but "nethost.h" is unresolved in both cases, and I cannot installed the nuget package.

I think i understand why it can't be done, it's a managed package, and the c++ project is native. So I guess I need to install the package in a managed project first, then somehow make "nethost.h" available to the c++ project.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /framework/libraries/pcl-library/src/Library/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/tuples/tuples/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

You can mention @dependabot in the comments below to contact the Dependabot team.

TreeExtensions.FastTree Method Not found

Before you open an issue

If the issue is:

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.

dotnet --info output or About VS info
<replace>

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /csharp/tutorials/RangesIndexes/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

nethost.h isn't where it is documented to be

Per the README file in the sample:

The `nethost` header and library are part of the Microsoft.NETCore.DotNetAppHost package and are also installed as a runtime pack by the .NET SDK. The library should be deployed alongside the host. This sample uses the files installed with the .NET SDK.

The nethost.h file is supposed to be available via the Microsoft.NETCore.DotNetAppHost nuget package. But in fact the latest stable version of that package (3.0.1) is empty. No .h or .dll files whatsoever.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/VS_Snippets_CFX/s_ueissuedtokenservicecredential/cs/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

AsyncStreams tutorial example has issue

Issue description

The tutorial for AsyncStreams has a matching article here:
https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/generate-consume-asynchronous-stream#examine-the-implementation
Three paragraphs above the hyperlinked content is the sentence "You can either set a GitHubKey environment variable to your personal access token, or you can replace the last argument in the call to GenEnvVariable with your personal access token."

This second option does not work due to the code incorrectly exiting the GetEnvVariable method when the instructions are followed.

Target framework

  • [ 3.0.100 ] .NET Core

Splitter/consolidator worker encountered exception while consuming source data

I am working with Visual Studio 2019 Version 16.4.1 on Windows 10.

I have tried the tutorial to generate an ML.NET image classification model from a pre-trained TensorFlow model. (Link of the tutorial: https://docs.microsoft.com/en-us/dotnet/machine-learning/tutorials/image-classification?source=docs#setup)

The model is giving the required output with the images which are given in the tutorial, but when I am trying to upload and run it with my images than it is showing me the following error.

"Unhandled Exception: System.InvalidOperationException: Splitter/consolidator worker encountered exception while consuming source data ---> System.ArgumentException: Parameter is not valid."

Below is the screenshot of the error.
error

This is the output at the console window.
consoleError

The root .editorConfig is missing VB configuration

Before you open an issue

If the issue is:

Issue description
The .EditorConfig file only has limited formatting rules for VB only below

[*.{cs,vb}]
charset = utf-8-bom
[*.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

Target framework
N/A
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.

All the require style for VB samples is missing dotnet --info output or About VS info
<replace>

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/language-reference/tokens/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /framework/libraries/pcl-library/src/Library/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/System.DateTime/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/VS_Snippets_ADO.NET/DataWorks SqlCommand.BeginExecuteReaderAsyncBehavior/CS/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /csharp/language-reference/operators/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/programming-guide/nullable-types/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/VS_Snippets_CFX/operationinfo/cs/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/tour/structs/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Add docker support

Add Docker support

I've attached below the code for Dockerfile to have the possibility to use dotnet debug tools (dotnet-dump, dotnet-trace, dotnet-counters, dotnet-sos) which I think it would be really helpful for many people who want to debug in PreProd or Prod (ex. Kubernetes)

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base
RUN apt-get update \
  && apt-get upgrade -y \
  && apt-get install -y \
     file \ 
     lldb \
  && rm -rf /var/lib/apt/lists/*
WORKDIR /app
EXPOSE 80

FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /src
COPY ["DiagnosticScenarios.csproj", ""]
RUN dotnet restore "./DiagnosticScenarios.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "DiagnosticScenarios.csproj" -c Release -o /app/build
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-sos
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-trace
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-dump
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-counters

FROM build AS publish
RUN dotnet publish "DiagnosticScenarios.csproj" -c Release -o /app/publish

FROM base AS final
COPY --from=build /dotnetcore-tools /opt/dotnetcore-tools
ENV PATH="/opt/dotnetcore-tools:${PATH}"
RUN dotnet-sos install
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "DiagnosticScenarios.dll"]

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/main-arguments/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/tour/enums/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/CS/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /snippets/csharp/tuples/tuples/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

Can not download

Git failed with a fatal error.
early EOF
the remote end hung up unexpectedly
index-pack failed
RPC failed; curl 56 OpenSSL SSL_read: error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac, errno 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.