.csproj cannot be found in newly created solution
I created a new Avalonia Cross Platform MVVM solution in JetBrains Rider with .NET 8 (not able to choose anything else).
I was getting an error in the IDE that some files were missing which can be restored with dotnet restore.
dotnet restore gives me a bunch of errors though about not finding the .csproj of the project.
Included an image from my terminal but its in german so probably of minimal use:
38 Replies
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
I never moved any files on disk 😶
This happened right after creating the solution
Ill check the paths nontheless
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
The project [insert project path here] gets skipped because it cannot be found
I feel like the error goes deeper than this though. I constantly have problems with my Avalonia projectsIt could be an issue with rider
Yea, I just updated to the newest version
lets see if that fixed it
Did .NET 8 release today?
Few weeks ago
Not sure Rider .net 8 support is 100% yet though
why not use Visual Studio think it feels way more satisfying to use than Rider
Disagree. Rider feels better imo. But the support for the newest .NET versions suck
I just use it because I cant really use VS on this machine
I see
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
TeBeCo
do
dotnet new sln -n <name of the new sln>
Quoted by
<@689473681302224947> from #.csproj cannot be found in newly created solution (click here)
React with ❌ to remove this embed.
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
No I checked the SLN and its correct
not using git currently since I just set up the project. It was mostly for testing around
Like I said, its a fresh project
Got 2023.3 now
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
Oh dear god they added AI to Rider?
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
Gimme a sec
As to be expected the .csproj for all targets reference the main project
but the path is correct
Unable to find project 'C:\Users\Azb-dSt\RiderProjects\LAMP-X\LAMP-X\LAMP_X\LAMP_X.csproj'. Check that the project reference is valid and that the project file exists.
wait huh
Dude what the hell
They changed my - to underscores
how did that happen
no shit its not finding the path
IT WORKS
maaaan
This is weird. I wonder if this is a JetBrains bug. Time to checkUnknown User•12mo ago
Message Not Public
Sign In & Join Server To View
How would git help though. As I said, I literally just created the project. The only diff would be that the files got added
Damn, creating a new project really just messes up the project references
I wonder why that happens
It's normal
I think
Oh I think I understand why
AFAIK is bad practice to do anything with -
For those reasons
you cannot use - in namespaces
Yes
Or variables or classes or anything
yea, but the file name should be fine
Spaces are parsed to be _ too
ok that makes sense, I dont think it should do that though
without telling me
I've never seen this before
Specially after just making the project
Its also super inconsistent
Have you used - before?
no
It could be the cause of your issue
It changed all the namespace names as well. For example LAMP_X.Desktop
but for android it did not
I think it adapts to file systems
It was, because it changed the project path as well, without actually renaming the path
Weird
Well well well, glad I figured that out