3 ms·
C# is really bad about this. They seem to be heavy into the Magical Boilerplate coding style in which your "empty" project consists of thousands of lines of du
by fallingfrog 9y ago
C# is really bad about this. They seem to be heavy into the Magical Boilerplate coding style in which your "empty" project consists of thousands of lines of duplicated/generated code which you then make slight edits to. My opinion is that if some piece of code is so common that it needs to be inserted into every project - then it should be a library call. Apparently that's a minority opinion though..
- victorNicollet 9y agoThis isn't my experience with C# (an empty project starts with a `Class1.cs` file if it's a library or `Program.cs` if it's an application), so you might be using something on top of C# that needs all of that boilerplate.
- arethuza 9y agoSounds like project templates in Visual Studio - which can populate your project with vast amounts of stuff. This can good or bad depending on the context.
- fallingfrog 9y agoAn empty ASP.NET core application contains ~35,000 lines of code.
- dahauns 9y agoNo. Just looked, and the only large file generated is the dependency cache (~7000 lines of json) which you never touch and can always be regenerated with dotnet restore. The rest is ~100-150 lines code+configuration and a readme file (~180 lines).
- fallingfrog 9y agoLook- I get that a lot of this stuff (jquery..) is libraries, and some of it is the visual studio solutions file, but if it's libraries, then why was it copied into my project directory? 1031 ./.vs/config/applicationhost.config 19 ./.vs/WebApplication1/v15/.suo 3 ./WebApplication1/.bowerrc 10 ./WebApplication1/appsettings.Development.json 8 ./WebApplication1/appsettings.json 10 ./WebApplication1/bower.json 24 ./WebApplication1/bundleconfig.json 35 ./WebApplication1/Controllers/HomeController.cs 1 ./WebApplication1/obj/Debug/netcoreapp1.1/CoreCompileInputs.cache 0 ./WebApplication1/obj/Debug/netcoreapp1.1/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs 0 ./WebApplication1/obj/Debug/netcoreapp1.1/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs 0 ./WebApplication1/obj/Debug/netcoreapp1.1/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs 24 ./WebApplication1/obj/Debug/netcoreapp1.1/WebApplication1.AssemblyInfo.cs 9830 ./WebApplication1/obj/project.assets.json 17 ./WebApplication1/obj/WebApplication1.csproj.nuget.g.props 5 ./WebApplication1/obj/WebApplication1.csproj.nuget.g.targets 25 ./WebApplication1/Program.cs 27 ./WebApplication1/Properties/launchSettings.json 60 ./WebApplication1/Startup.cs 7 ./WebApplication1/Views/Home/About.cshtml 17 ./WebApplication1/Views/Home/Contact.cshtml 108 ./WebApplication1/Views/Home/Index.cshtml 14 ./WebApplication1/Views/Shared/Error.cshtml 73 ./WebApplication1/Views/Shared/_Layout.cshtml 18 ./WebApplication1/Views/Shared/_ValidationScriptsPartial.cshtml 2 ./WebApplication1/Views/_ViewImports.cshtml 3 ./WebApplication1/Views/_ViewStart.cshtml 22 ./WebApplication1/WebApplication1.csproj 37 ./WebApplication1/wwwroot/css/site.css 0 ./WebApplication1/wwwroot/css/site.min.css 0 ./WebApplication1/wwwroot/favicon.ico 1 ./WebApplication1/wwwroot/js/site.js 0 ./WebApplication1/wwwroot/js/site.min.js 44 ./WebApplication1/wwwroot/lib/bootstrap/.bower.json 587 ./WebApplication1/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css 0 ./WebApplication1/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css.map 5 ./WebApplication1/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.min.css 0 ./WebApplication1/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.min.css.map 6757 ./WebApplication1/wwwroot/lib/bootstrap/dist/css/bootstrap.css 0 ./WebApplication1/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map 5 ./WebApplication1/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css 0 ./WebApplication1/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map 105 ./WebApplication1/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot 287 ./WebApplication1/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.svg 771 ./WebApplication1/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf 93 ./WebApplication1/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff 72 ./WebApplication1/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 2377 ./WebApplication1/wwwroot/lib/bootstrap/dist/js/bootstrap.js 6 ./WebApplication1/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js 12 ./WebApplication1/wwwroot/lib/bootstrap/dist/js/npm.js 21 ./WebApplication1/wwwroot/lib/bootstrap/LICENSE 24 ./WebApplication1/wwwroot/lib/jquery/.bower.json 9831 ./WebApplication1/wwwroot/lib/jquery/dist/jquery.js 4 ./WebApplication1/wwwroot/lib/jquery/dist/jquery.min.js 0 ./WebApplication1/wwwroot/lib/jquery/dist/jquery.min.map 36 ./WebApplication1/wwwroot/lib/jquery/LICENSE.txt 39 ./WebApplication1/wwwroot/lib/jquery-validation/.bower.json 997 ./WebApplication1/wwwroot/lib/jquery-validation/dist/additional-methods.js 3 ./WebApplication1/wwwroot/lib/jquery-validation/dist/additional-methods.min.js 1397 ./WebApplication1/wwwroot/lib/jquery-validation/dist/jquery.validate.js 3 ./WebApplication1/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js 22 ./WebApplication1/wwwroot/lib/jquery-validation/LICENSE.md 43 ./WebApplication1/wwwroot/lib/jquery-validation-unobtrusive/.bower.json 415 ./WebApplication1/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js 4 ./WebApplication1/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js 22 ./WebApplication1.sln 35413 total
- lukasLansky 9y agoNo. There are two files, Program.cs and Startup.cs. Program.cs is 26 lines long, Startup.cs is 35 lines long. Project file is 15 lines long. Of course, there is whole web server Kestrel referenced somewhere, using NuGet and DLLs full of MSIL. Formulating "depending on compiled library code" like "contains _ lines of code" is, especially in the context of the conversation, arguably dishonest.