C
C#6d ago
K.

Anyone can help me with aspnetboilerplate?

Wanted to just fix something for a client but the setup to me is harder then I expected and ofc I am on a MacOS which makes it even weirder. If anyone has experience please DM.
43 Replies
canton7
canton76d ago
$ask
MODiX
MODiX6d ago
How to get the best help :catpog: Make a post in #help or one of the topic channels under Development. Avoid asking :catthinking: Can anybody help me? :catthinking: Has anyone used XYZ? :catthinking: Why doesn't my code work? C# is a big area! No one knows they can help unless you tell them about the small area you're trying to work in. Explain what you are doing, and potentially why for as much context as possible. Avoid screenshots where possible, share code directly in Discord. Type $code into chat to learn how to post code. See https://www.nohello.net and https://dontasktoask.com if you want common help chat room etiquette.
canton7
canton76d ago
Noone is going to DM, because they don't know what they're getting themselves into, and they might well end up roped into something they know nothing about Ask your actual question in enough detail that someone can answer it, using only what you've written. Anyone who knows the answer can then chip in
K.
K.OP6d ago
The problem is I don't know either but I added better context.
Angius
Angius6d ago
What exactly is the issue? Running the code? Creating a project based on some boilerplate project? Editing the code to the client's spec?
K.
K.OP6d ago
My issue is that I'm on a mac and never used this setup, I got a project where I need to just rebuild it, add one field to database and add migration and redeploy. But I struggle at understanding the structure of the project even works. I'm totally confused how npm run grunt-production is supopsed to be working, I get when running that command >> Local Npm module "grunt-cli" not found. Is it installed? but it looks like all went successfully. And my .NET project now seems to be building at least. But im a noob when it comes to the setup simply. The guy who supported the project isn't available anymore (no clue why), so I have no one to ask for anything.
Angius
Angius6d ago
Grunt is an oldschool task runnjer for JS. Chances are, it's there to build the JS and CSS code If it's asking about grult-cli make sure it's installed
K.
K.OP6d ago
Its installed 100%, but somehow it still gives me the error and i think its fine but im just not so confident in the project itself
Angius
Angius6d ago
Try moving grunt-cli from devDependencie to peerDependencies? Then npm i
K.
K.OP6d ago
Do you know what this is ment for?
Install NPM Task Runner extension Open Task Runner Explorer window, under Tasks, right-click on watch, and ensure Bindings -> Project Open is checked. Also set the "production" alias task binding to Project Open.
Since I dont have visual studio i cannot do that, and I wonder what he menas with the production part?
Angius
Angius6d ago
No idea I haven't used Grunt, and I never used VS to manage my task runners
K.
K.OP6d ago
This really did the trick WOW. I'm impressed. what are task runners, do I understand correctly that this command needs to simply run over and over when I e.g. save/change files
Angius
Angius6d ago
Found this solution in the second Google result when searching for the error verbatim lol Task runners like Grunt or Gulp... run tasks
K.
K.OP6d ago
How did you search, can you how me the prompt you entered in google?
Angius
Angius6d ago
For example, you can have a task build-js that does, in order: * compile TS to JS * lower the code for older browsers * inject any polyfills needed * bundle it all into one file * treeshake it * minify it * create sourcemap
K.
K.OP6d ago
Running "jshint:files" (jshint) task >> 22 files lint free. Running "uglify:publiclibs" (uglify) task >> 1 file created 529.35 kB → 485.2 kB Running "uglify:applibs" (uglify) task >> 1 file created 380.92 kB → 295.7 kB Running "uglify:publicdev" (uglify) task >> 1 file created 12.35 kB → 9.18 kB Running "uglify:publicproduction" (uglify) task >> 1 file created 12.35 kB → 4.16 kB Running "uglify:shareddev" (uglify) task >> 1 file created 26.3 kB → 20.71 kB Running "uglify:sharedproduction" (uglify) task >> 1 file created 26.3 kB → 8.08 kB Running "uglify:admindev" (uglify) task >> 1 file created 10.93 kB → 9.06 kB Running "uglify:adminproduction" (uglify) task >> 1 file created 10.93 kB → 4.83 kB Running "uglify:brokerdev" (uglify) task >> 1 file created 7.47 kB → 6.56 kB Running "uglify:brokerproduction" (uglify) task >> 1 file created 7.47 kB → 3.15 kB Running "uglify:customerdev" (uglify) task >> 1 file created 1.01 kB → 865 B Running "uglify:customerproduction" (uglify) task >> 1 file created 1.01 kB → 484 B Running "uglify:hostdev" (uglify) task >> 1 file created 4.52 kB → 3.89 kB Running "uglify:hostproduction" (uglify) task >> 1 file created 4.52 kB → 1.85 kB
okay I got the gist
Angius
Angius6d ago
OkayWell, okay, not Google and not the 2nd result. Here:
No description
K.
K.OP6d ago
Do you know anything about SQL Server, I have there another question
Angius
Angius6d ago
I usually use Postgres, but shoot
K.
K.OP6d ago
I see the following
"ConnectionStrings": { "Default": "Server=localhost\SQLEXPRESS; Database=LoansOnlyWebPlatformDb; Trusted_Connection=True;" },
This is some shothand probably for SQLServer to directly connect and ti works cause its on windows. Since I'm on mac I saw some tutorial i can install the sql serer on docker container, int hat case probably ill have to setup connection string to target that docker image somehow, right?
Angius
Angius6d ago
Yep
K.
K.OP6d ago
And I have that connectinon string at 3 palces "Default": "Server=localhost\SQLEXPRESS; Database=LoansOnlyWebPlatformDb; Trusted_Connection=True; TrustServerCertificate=true" "Default": "Server=localhost\SQLEXPRESS; Database=LoansOnlyWebPlatformDb; Trusted_Connection=True;" But in LoansOnly.WebPlatform.Web.Host I don't have TrustServerCertificate=true I wonder why xd
Angius
Angius6d ago
Odd that the connection string is in multiple places in the first place, tbh
K.
K.OP6d ago
ya i guess we skip this question One other question Then my last question (hopefully) i have multiple of those pubxml and apperently they are supposed to be used to publish the app aka redeploy, but im confused how that works. E.g. LOWebPlatformLinux - Web Deploy.pubxml Do you know if that thing is gonna be built by me locally and then put on server, or is the server gonna do the job of recompliing etc?
Angius
Angius6d ago
I guess it depends on how it's deployed If the deployment goes through some CI/CD pipeline that uses those publish profiles to build the final binaries and put them on the server, then no need to do anything If the deployment is dragging the files onto the server via FTP or something equally oldschool, you probably want it published locally
Unknown User
Unknown User6d ago
Message Not Public
Sign In & Join Server To View
K.
K.OP6d ago
paid work but its kind of like a small side gig just someone asked me if I can do it xd I was in the beginning more confident then now 😄
Unknown User
Unknown User6d ago
Message Not Public
Sign In & Join Server To View
K.
K.OP6d ago
its a setup already done
Unknown User
Unknown User6d ago
Message Not Public
Sign In & Join Server To View
K.
K.OP6d ago
i just wanted to change some lines of code and fix what they needed
Unknown User
Unknown User6d ago
Message Not Public
Sign In & Join Server To View
K.
K.OP6d ago
ya I get what you saying they litteraly just want 2 static files to be changes its simple HTML, just replace text and maybe add 1 field (so migration) and adjust 1 condition
Unknown User
Unknown User6d ago
Message Not Public
Sign In & Join Server To View
K.
K.OP6d ago
ya I had the same worry
Unknown User
Unknown User6d ago
Message Not Public
Sign In & Join Server To View
K.
K.OP6d ago
i think I in general can get it working, the deployment part is still making me worried ya
Unknown User
Unknown User6d ago
Message Not Public
Sign In & Join Server To View
K.
K.OP6d ago
do I need to run that thing when I run it locally as well? I wonder about that xd
Unknown User
Unknown User6d ago
Message Not Public
Sign In & Join Server To View
Angius
Angius6d ago
If the frontend is referencing files from the specific output directory, or .min.js/.min.css files, and if those are not in the repo from the get-go, you will need to run the tasks at least once
Unknown User
Unknown User6d ago
Message Not Public
Sign In & Join Server To View
K.
K.OP5d ago
Ty got it working

Did you find this page helpful?