Skip to content

Instantly share code, notes, and snippets.

View bricelam's full-sized avatar

Brice Lambson bricelam

View GitHub Profile
@sayedihashimi
sayedihashimi / msbuild-error-format.md
Last active May 13, 2024 20:38
MSBuild and Visual Studio Known Error Message Formats

MSBuild and Visual Studio Known Error Message Formats

When a tool is executed that outputs some text, MSBuild will examine the text for errors and warnings. Many tools use a known format to report these messages. By default, MSBuild will examine the text and report errors and/or warnings based on the output. This behavior can be changed or disabled by using these parameters on the Exec task: IgnoreStandardErrorWarningFormat, CustomErrorRegularExpression, and CustomWarningRegularExpression.

NOTE: If you do decide to use your own regular expression to detect error and warnings, then

@ErikEJ
ErikEJ / IQueryableExtensions.cs
Last active February 29, 2024 12:16
Replacement for EF Core .Contains, that avoids SQL Server plan cache pollution
using System.Linq.Expressions;
namespace Microsoft.EntityFrameworkCore
{
public static class IQueryableExtensions
{
public static IQueryable<TQuery> In<TKey, TQuery>(
this IQueryable<TQuery> queryable,
IEnumerable<TKey> values,
Expression<Func<TQuery, TKey>> keySelector)