Comments (4)
If someone is willing to pick this up. We are using https://github.com/dotnet/codeformatter to format our code. The best approach would be to add support for this to the formatter and run it on our codebase. CoreFx, CoreClr, Roslyn and various other projects would benefit then too.
from msbuild.
Looks like they have an issue on that already. Would be great to have!
dotnet/codeformatter#79
from msbuild.
👍
Meanwhile, see the batch format extension: https://visualstudiogallery.msdn.microsoft.com/a7f75c34-82b4-4357-9c66-c18e32b9393e. (GH: https://github.com/yongfa365/BatchFormat)
Once installed, open VS solution, close all files, right-click solution node in Solution Explorer
and select: Batch Format > Remove and Sort Usings and Format Document
. Problem solved! :)
Also, if you have .editorconfig
in project root (https://github.com/editorconfig/editorconfig-visualstudio#readme), the BatchFormat extension will work as expected, as it calls IDE's default formatter to format the document.
Last but not the least, if you throw a .gitattributes
file (containing same formatting rules) to the root of the repo, the folks using *nix contributing to this repo will never publish C# file without CRLF, yet there won't be no dis-ambiguity. Ex: https://github.com/madskristensen/WebEssentials2015/blob/master/.gitattributes.
(hint: git does push-time formatting, so the code formatting in the repo remain consistent)
PS: now if dotnet/CodeFormatter
is able to somehow acknowledge/engage all those artifacts (by providing export/import .editorconfig/.gitattributes), that would be super rad! 😎
from msbuild.
Pull request #60
from msbuild.
Related Issues (20)
- Remove code repetition in EventSourceSink.cs
- [Bug]: When Publishing with .sln, MSBuild doesn't use `BaseOutputPath` HOT 1
- Release 17.11
- [Kitten] Fix binskim warnings in msbuild pipeline HOT 3
- [Bug]: Running a specific target which depends on ResolveReferences fails when TargetFrameworks is specified HOT 4
- Visual Studio 2022 17.10 fails to load csproj - error : The "Target" name is reserved, and cannot be used HOT 3
- Is the double-checked locking pattern in BuildManager correct?
- [Bug]: Parsing `-property:Configuration` with Command-line comments HOT 5
- [BuildCkeck] No warning or error message visible when replaying binlog of an analyzed build
- [Feature Request]: Support building the new Visual Studio solution file format (.slnx) HOT 7
- [Bug]: HOT 2
- [Bug]: CustomAnalyzerTest test fails in the CI pipeline HOT 2
- Retarget to .NET 9
- [Bug]: Can't use contained classes of NuGet Package Microsoft.Build when added as GlobalPackageReference in a Directory.Packages.props file HOT 2
- Investigate possible ToolTask hang HOT 1
- [Bug]: Net472 Service Fabric project with .Net 8 project reference broken in latest msbuild HOT 2
- Create tests for ConfigurationContext
- [dnceng-bot] Branch `msbuild/vs17.10` can't be mirrored to Azdo fast forward branch HOT 1
- Rework the approach to bootstrap HOT 3
- [Feature Request]: Improvements to the Copy task warnings in Terminal Logger HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msbuild.