alpha

Guides an AI coding tool working on .NET Framework projects: msbuild usage, legacy and SDK-style csproj handling, NuGet and performance practices.
description: 'Guidance for working with .NET Framework projects. Includes project structure, C# language version, NuGet management, and best practices.'
applyTo: '**/.csproj, **/.cs'
msbuild /t:rebuild to build the solution or projects instead of dotnet buildMany .NET Framework projects use the legacy non-SDK project format, which differs significantly from modern SDK-style projects. However, SDK-style project files can also target .NET Framework, such as net48 or net472. Check the .csproj format before applying project-file guidance:
Legacy non-SDK projects: All new source files MUST be explicitly added to the project file (.csproj) using a <Compile> element
<Compile Include="Path\To\NewFile.cs" />SDK-style projects: If the project file has an Sdk attribute, use SDK-style conventions even when it targets .NET Framework
<Project Sdk="Microsoft.NET.Sdk"><TargetFramework> instead of <TargetFrameworkVersion><TargetFramework>net48</TargetFramework>No Implicit Imports in legacy projects: Unlike SDK-style projects, legacy non-SDK projects do not automatically import common namespaces or assemblies
Build Configuration in legacy projects: Contains explicit <PropertyGroup> sections for Debug/Release configurations
Output Paths in legacy projects: Explicit <OutputPath> and <IntermediateOutputPath> definitions
Target Framework in legacy projects: Uses <TargetFrameworkVersion> instead of <TargetFramework>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>using var stream = ...)await using var resource = ...)variable switch { ... })??=)array[1..^1], array[^1])string?, #nullable enable)public record Person(string Name)){ get; init; })List<string> list = new())C:\path\to\file.cs)ConfigureAwait(false) in library code to avoid deadlocks:var result = await SomeAsyncMethod().ConfigureAwait(false);
.Result or .Wait() or .GetAwaiter().GetResult(). These sync-over-async patterns can lead to deadlocks and poor performance. Always use await for asynchronous calls.DateTimeOffset over DateTime for absolute time pointsDateTime, always specify DateTimeKind.Utc or DateTimeKind.LocalCultureInfo.InvariantCulture for serialization/parsingStringBuilder for multiple string concatenationsStringComparison for string operations:string.Equals(other, StringComparison.OrdinalIgnoreCase)
IDisposable properly for unmanaged resourcesIDisposable objects in using statementsConfigurationManager.AppSettings<connectionStrings> section, not <appSettings>Exceptionstring.Intern() judiciously for frequently used stringsLazy<T> for expensive object creationMethodInfo, PropertyInfo objects when possible© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com


Sea turtle carrying floating film studio island
Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.
image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost
Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.
video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

Cozy Pixel Art Farm Island Village
Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.
image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape
Loading reviews…
Loading comments…