error after modifying csproj

i added a line at the bottom of my csproj file and it gave an error then i deleted the line and saved but it didn't fix the problem i asked gpt about it and he couldn't fix either. i dont wanna do all the work again since i just made a login screen. Anything that can cure me?
112 Replies
Jimmacle
Jimmacle•3w ago
details can cure you we have no idea what you did so we can't tell you how to fix it
heil H z E f e l i n s s
okay long story short i added this line at the bottom of my csproj file wait not this one <GenerateProgramFile>false</GenerateProgramFile> this then my program gave out errors and i closed the app and i deleted that line
jakeyboi
jakeyboi•3w ago
Can you clean the solution and rebuild
heil H z E f e l i n s s
tried but it gave some errors
jakeyboi
jakeyboi•3w ago
What are the errors
heil H z E f e l i n s s
lemme find
Jimmacle
Jimmacle•3w ago
well, "at the bottom" wouldn't be a valid place to put that in the first place what kind of project is this?
heil H z E f e l i n s s
i was doing a mail app similiar to gmail
Jimmacle
Jimmacle•3w ago
i mean why do you need that project setting
heil H z E f e l i n s s
oh btw after the incident i tried to transfer my files to another project
jakeyboi
jakeyboi•3w ago
Yeh but what type of project is it? Frame work wise
heil H z E f e l i n s s
to make roundbuttons 😊 windows forms app .net also after the incident
Jimmacle
Jimmacle•3w ago
do you use version control?
heil H z E f e l i n s s
whats that
Jimmacle
Jimmacle•3w ago
like git
heil H z E f e l i n s s
uhh i guess not?
Jimmacle
Jimmacle•3w ago
it keeps track of your changes so if you break something you can revert it more easily
heil H z E f e l i n s s
i never clicked on something like that to enable or add to my code
Jimmacle
Jimmacle•3w ago
it's a separate tool/program, but it could be integrated into your editor
jakeyboi
jakeyboi•3w ago
A vcs prevents these situations cuz u can roll back any changes within the repo
Jimmacle
Jimmacle•3w ago
every single programmer should use version control, there is no exception
heil H z E f e l i n s s
i searched git on windows search but no results i guess i dont have it
jakeyboi
jakeyboi•3w ago
If your using visual studio there’s a button in the toolbar to create/init a git repo
Jimmacle
Jimmacle•3w ago
anyway back to your actual issue, what is your reasoning for adding that project setting to your project because i've never even seen it, and looking it up doesn't make it seem applicable to a winforms app
heil H z E f e l i n s s
making buttons that has its corners round chatgpt said so 🤓
jakeyboi
jakeyboi•3w ago
You’ll have to install it, if you enable it within vcs it should attempt to install it on ur system if it’s missing
Jimmacle
Jimmacle•3w ago
brother don't use chatgpt for things you don't already understand
heil H z E f e l i n s s
okay i'Ll install it
Jimmacle
Jimmacle•3w ago
because this has nothing to do with styling/themes
jakeyboi
jakeyboi•3w ago
To add to this, try not to just blindly insert code without understanding
heil H z E f e l i n s s
im still a beginner and trying to make something, i have a pdf file to teach stuff but it doesnt have anything i asked him on a mockup for the login page and then he started talking about roundbuttons and sutff
jakeyboi
jakeyboi•3w ago
Who?
heil H z E f e l i n s s
gpt?
Jimmacle
Jimmacle•3w ago
chatgpt isn't a person
jakeyboi
jakeyboi•3w ago
:kekw:
Jimmacle
Jimmacle•3w ago
it can't even think it's basically just a really fancy text predictor, it has no self awareness it has no idea if what it's telling you is correct or relevent, just that statistically it's something it should say in response to your question
jakeyboi
jakeyboi•3w ago
Yeh but back to ur issue, I recommend potentially setting up a new project moving ur code to the new one. Minus the changes u made to csproj. I don’t think we will get to the bottom of the real issue
heil H z E f e l i n s s
i tried to move my project tho lemme explain 😄 i selected all the files in that project folder
Jimmacle
Jimmacle•3w ago
i recommend using proper tutorials and reference material to learn the tools and frameworks you want to use
heil H z E f e l i n s s
and dragged it to another project then swapped them with the mail app guess what didn't work
jakeyboi
jakeyboi•3w ago
Can you send us the error message/s
Jimmacle
Jimmacle•3w ago
depending on the SDK version i wouldn't expect it to work don't just do random things, you probably made it worse
heil H z E f e l i n s s
i gotta try moving the files back to the original project
Jimmacle
Jimmacle•3w ago
all you had to do was undo the change you made in your csproj, you probably deleted something you shouldn't have
heil H z E f e l i n s s
i just choosed that line i sended earlier and saved
Jimmacle
Jimmacle•3w ago
well, you didn't
heil H z E f e l i n s s
oh wait its not for roundbuttons mb
Jimmacle
Jimmacle•3w ago
because if that's what you did, it wouldn't be broken
heil H z E f e l i n s s
i had an error saying the project was open somewhere and didnt let me f5 it
Jimmacle
Jimmacle•3w ago
we don't even know what broken means because we went off on a tangent
heil H z E f e l i n s s
so do you thinks its unsaveable now?
Jimmacle
Jimmacle•3w ago
i haven't seen a single actual line of code or project file so i can't answer that
heil H z E f e l i n s s
okay what do you need to see
Jimmacle
Jimmacle•3w ago
it seems like you're going way too fast without thinking about what you're doing
heil H z E f e l i n s s
i'Ll try to find it i guess so
jakeyboi
jakeyboi•3w ago
I also don’t recommend blindly adding code without checking what it does in official docs And checking to see how it will affect the application
mtreit
mtreit•3w ago
Have you even said what the error message is?
jakeyboi
jakeyboi•3w ago
I’ve asked twice 🤣🤣
heil H z E f e l i n s s
i have more than one tho what do i even need to send wait first let me make everything clear
jakeyboi
jakeyboi•3w ago
All of them
Jimmacle
Jimmacle•3w ago
all i can see in reference to that msbuild option is using it to resolve issues with xunit projects chatgpt telling you to use it for a basic winforms application is almost definitely wrong
heil H z E f e l i n s s
first i added a line in the bottom of my csproj file, then i removed it back after a popup error message i didn't save or ss'd then i searched up for ways and i tried to do dotnet clean rebuild and build let me find the error message about the dotnet clean dotnetclean worked perfectly fine after i closed vs2022 and it successed without errors and i did dotnet build uh how do i send stuff with code part
Jimmacle
Jimmacle•3w ago
$paste
MODiX
MODiX•3w ago
If your code is too long, you can post to https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code!
heil H z E f e l i n s s
its not long i just dont know how to make it look like code
Jimmacle
Jimmacle•3w ago
$code
MODiX
MODiX•3w ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat For longer snippets, use: https://paste.mod.gg/
mtreit
mtreit•3w ago
Backticks not single quotes
Jimmacle
Jimmacle•3w ago
is it possible to set your OS language to english i can't read that :PepeLaugh:
heil H z E f e l i n s s
😄 i copied this from the gpt log
Jimmacle
Jimmacle•3w ago
??
jakeyboi
jakeyboi•3w ago
🤣🤣🤣🤣
heil H z E f e l i n s s
i sent that to gpt too 😄 Determining projects to restore... No action to take. None of the specified projects contain packages to restore.
Jimmacle
Jimmacle•3w ago
we don't care what gpt shits out whatsoever, we care about the actual tools and code any mention of chatgpt is going to make people not want to help
heil H z E f e l i n s s
calm down buddy i just said i copied the error from there because i sent it there first i copied what i sent to it damn
jakeyboi
jakeyboi•3w ago
How does gpt know what the error message is
heil H z E f e l i n s s
NO when i copied the erorr i sent it there
Jimmacle
Jimmacle•3w ago
i mean you're typing a mile a minute and haven't actually told us anything useful about the problem yet
jakeyboi
jakeyboi•3w ago
Why not send it here? So we can see it
heil H z E f e l i n s s
im trying to say that before i came to ask help here i sent the error to gpt
jakeyboi
jakeyboi•3w ago
U don’t need to run it through gpt before sending it here mate
heil H z E f e l i n s s
i wasn't in this server when i did those
Jimmacle
Jimmacle•3w ago
just cease using chatgpt entirely, it's a huge trap for beginners
jakeyboi
jakeyboi•3w ago
Ah okay, use backticks and send it here
heil H z E f e l i n s s
will do
Jimmacle
Jimmacle•3w ago
it works until it doesn't and then you have no idea what you've done and therefore can't explain what you did to the real humans who can actually help :LUL:
jakeyboi
jakeyboi•3w ago
Ur using gpt in the worst possible way And at the worst stage
Jimmacle
Jimmacle•3w ago
chatgpt should be treated like a little idiot man living in your computer
heil H z E f e l i n s s
""cs C:\Users\H z E f e l i n s s\Desktop\Bombo Projects\PaliMail>dotnet build Determining projects to restore... No action to take. None of the specified projects contain packages to restore. C:\Program Files\dotnet\sdk\8.0.401\Microsoft.Common.CurrentVersion.targets(3413,5): error MSB3823: GenerateResourceUsePreserializedResources property must be set to true for non-string resources. [C:\Users\H z E f e l i n s s\Desktop\Bombo Projects\PaliMail\PaliMail\PaliMail.csproj] C:\Program Files\dotnet\sdk\8.0.401\Microsoft.Common.CurrentVersion.targets(3413,5): error MSB3822: The System.Resources.Extensions assembly is required at runtime for non-string resources, but it was not found in the references for this project. [C:\Users\H z E f e l i n s s\Desktop\Bombo Projects\PaliMail\PaliMail\PaliMail.csproj] CREATION FAILED. C:\Program Files\dotnet\sdk\8.0.401\Microsoft.Common.CurrentVersion.targets(3413,5): error MSB3823: The GenerateResourceUsePreserializedResources property must be set to true for non-string resources. [C:\Users\H z E f e l i n s s\Desktop\Bombo Projects\PaliMail\PaliMail\PaliMail.csproj] C:\Program Files\dotnet\sdk\8.0.401\Microsoft.Common.CurrentVersion.targets(3413,5): error MSB3822: The System.Resources.Extensions assembly is required at runtime for non-string resources, but it was not found in this project's references. [C:\Users\H z E f e l i n s s\Desktop\Bombo Projects\PaliMail\PaliMail\PaliMail.csproj] 0 Warnings 2 Errors Elapsed Time 00:00:00.60 ""
Jimmacle
Jimmacle•3w ago
you can try and get it to do stuff but you should never blindly trust what it tells you
heil H z E f e l i n s s
it didn't work again am i doing it wrong?
jakeyboi
jakeyboi•3w ago
Bsckticks mate
heil H z E f e l i n s s
"
Jimmacle
Jimmacle•3w ago
` not '
heil H z E f e l i n s s
isn't this a backtick
Jimmacle
Jimmacle•3w ago
that's a quote
heil H z E f e l i n s s
oh mb `` this?
Jimmacle
Jimmacle•3w ago
yes
heil H z E f e l i n s s
im not native english im sorry
C:\Users\H z E f e l i n s s\Desktop\Bombo Projects\PaliMail>dotnet build

Determining projects to restore...

No action to take. None of the specified projects contain packages to restore.

C:\Program Files\dotnet\sdk\8.0.401\Microsoft.Common.CurrentVersion.targets(3413,5): error MSB3823: GenerateResourceUsePreserializedResources property must be set to true for non-string resources. [C:\Users\H z E f e l i n s s\Desktop\Bombo Projects\PaliMail\PaliMail\PaliMail.csproj]
C:\Program Files\dotnet\sdk\8.0.401\Microsoft.Common.CurrentVersion.targets(3413,5): error MSB3822: The System.Resources.Extensions assembly is required at runtime for non-string resources, but it was not found in the references for this project. [C:\Users\H z E f e l i n s s\Desktop\Bombo Projects\PaliMail\PaliMail\PaliMail.csproj]

CREATION FAILED.

C:\Program Files\dotnet\sdk\8.0.401\Microsoft.Common.CurrentVersion.targets(3413,5): error MSB3823: The GenerateResourceUsePreserializedResources property must be set to true for non-string resources. [C:\Users\H z E f e l
i n s s\Desktop\Bombo Projects\PaliMail\PaliMail\PaliMail.csproj]
C:\Program Files\dotnet\sdk\8.0.401\Microsoft.Common.CurrentVersion.targets(3413,5): error MSB3822: The System.Resources.Extensions assembly is required at runtime for non-string resources, but it was not found in this project's references. [C:\Users\H z E f e l i n s s\Desktop\Bombo Projects\PaliMail\PaliMail\PaliMail.csproj]
0 Warnings
2 Errors

Elapsed Time 00:00:00.60
C:\Users\H z E f e l i n s s\Desktop\Bombo Projects\PaliMail>dotnet build

Determining projects to restore...

No action to take. None of the specified projects contain packages to restore.

C:\Program Files\dotnet\sdk\8.0.401\Microsoft.Common.CurrentVersion.targets(3413,5): error MSB3823: GenerateResourceUsePreserializedResources property must be set to true for non-string resources. [C:\Users\H z E f e l i n s s\Desktop\Bombo Projects\PaliMail\PaliMail\PaliMail.csproj]
C:\Program Files\dotnet\sdk\8.0.401\Microsoft.Common.CurrentVersion.targets(3413,5): error MSB3822: The System.Resources.Extensions assembly is required at runtime for non-string resources, but it was not found in the references for this project. [C:\Users\H z E f e l i n s s\Desktop\Bombo Projects\PaliMail\PaliMail\PaliMail.csproj]

CREATION FAILED.

C:\Program Files\dotnet\sdk\8.0.401\Microsoft.Common.CurrentVersion.targets(3413,5): error MSB3823: The GenerateResourceUsePreserializedResources property must be set to true for non-string resources. [C:\Users\H z E f e l
i n s s\Desktop\Bombo Projects\PaliMail\PaliMail\PaliMail.csproj]
C:\Program Files\dotnet\sdk\8.0.401\Microsoft.Common.CurrentVersion.targets(3413,5): error MSB3822: The System.Resources.Extensions assembly is required at runtime for non-string resources, but it was not found in this project's references. [C:\Users\H z E f e l i n s s\Desktop\Bombo Projects\PaliMail\PaliMail\PaliMail.csproj]
0 Warnings
2 Errors

Elapsed Time 00:00:00.60
Jimmacle
Jimmacle•3w ago
i mean i don't know much about winforms but that generally looks like you changed something in your csproj that you shouldn't have, or you did something to the resources
heil H z E f e l i n s s
uhh i just remembered after all that shit i trusted gpt again and added some stuff into the csproj but i added them in the correct spots this time
Jimmacle
Jimmacle•3w ago
you're making it incredibly difficult for us to help you
heil H z E f e l i n s s
and after that one of the 2 errors disappeared i'll just scrap the other sln can you help me on moving my code? i never did it before
Jimmacle
Jimmacle•3w ago
i cannot at this point i'm going to assume you copied in a bunch of ai slop and completely ruined your project and i don't have time to fix chatgpt's mistakes main takeaways from this should be: use version control so you can roll back your changes, and do not use chatgpt for things you don't understand
heil H z E f e l i n s s
do i just need to google versioncontrol and download the app?
Jimmacle
Jimmacle•3w ago
you should google git and look at guides on how to use it
heil H z E f e l i n s s
okay
Jimmacle
Jimmacle•3w ago
$git
MODiX
MODiX•3w ago
interactive teaching: https://learngitbranching.js.org/ msft learn course: https://learn.microsoft.com/en-us/training/modules/intro-to-git/ git init initializes the repository dotnet new gitignore adds a .gitignore file git add . starts tracking all files git commit -m "[message]" creates a commit git remote add origin [url] adds a remote repository git push -u origin main first push, sets the remote as upstream git push all pushes after that can be just this Git cheat sheet
heil H z E f e l i n s s
is this the git i am supposed to download?
No description
Jimmacle
Jimmacle•3w ago
yes
mtreit
mtreit•3w ago
If you have your existing source code (.cs) files, you can probably just start over from scratch with a new empty project (dotnet new winforms --name MyProject or whatever) and then just copy the .cs files over under the new folder.

Did you find this page helpful?