C
C#16mo ago
Mekasu0124

✅ Can't publish build???

https://github.com/mekasu0124/Diary when I try to use the Publish Selection option to build my project down to an executable, it keeps failing and won't give me a reason why. The only thing I can see is is what is in the photo, but I don't know why I'm getting it. It's not a bad repo. I just did a push to it when I added in a new button. The new button was added for Delete Item in DiaryListView.axaml and the code for the button was bound using Command="{Binding DeleteItem}" which is located in DiaryListViewModel.cs. I don't believe adding that button and code in messed it up, but when I run the app through visual studio, it works just fine. Has anyone experinced this before?
GitHub
GitHub - mekasu0124/Diary
Contribute to mekasu0124/Diary development by creating an account on GitHub.
19 Replies
Pobiega
Pobiega16mo ago
And building from cli works? Just building,not publishing dotnet build
Mekasu0124
Mekasu0124OP16mo ago
right so like in visual studio, if I press the play button to build and run the project, it works perfectly fine, but when I use the Build>Publish Selection to package it down, it fails with no reason why
Pobiega
Pobiega16mo ago
That doesn't answer my question
Mekasu0124
Mekasu0124OP16mo ago
well that's my problem....... I don't build from cli if that's what you're asking. My problem is that my project builds and runs with the play button in visual studio with no problem, but when I use Publish Selection to build the project to a windows x64 executable, it fails
Pobiega
Pobiega16mo ago
Build from the cli. See if you get the same problem This is what I'm asking you to do
Mekasu0124
Mekasu0124OP16mo ago
ok the build from command prompt was succesful but I don't know where it put the build
Pobiega
Pobiega16mo ago
Ok then try a publish from cli dotnet publish
Mekasu0124
Mekasu0124OP16mo ago
Pobiega
Pobiega16mo ago
Ok, have a look in the /bin/publish folder
Mekasu0124
Mekasu0124OP16mo ago
C:\Users\Mekasu\Documents\Programming\Desktop\Diary\bin\Debug\net7.0\publish I found it here, and the executable works. I just don't understand why visual studio can't build now. It worked just fine building my other project. I mean the other project was version 0.10.21 and this one is version 11. Could that be something?
Pobiega
Pobiega16mo ago
¯\_(ツ)_/¯ I think it's more likely a Vs cache bug
Mekasu0124
Mekasu0124OP16mo ago
ok how can I fix it?
Pobiega
Pobiega16mo ago
Make sure your code is pushed to GitHub, then delete the .Vs and obj folders Make sure Vs is closed
Mekasu0124
Mekasu0124OP16mo ago
also too, when I attempt to publish through visual studio, these pop up, but no sooner than I open the file it's erroring in, the error goes away
Mekasu0124
Mekasu0124OP16mo ago
my issue was using DataGrid but not having the avalonia package installed? so weird but its fixed now. you can close this
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX16mo ago
Use the /close command to mark a forum thread as answered
Mekasu0124
Mekasu0124OP16mo ago
my bad. the bot has not been responding to that command lately. I'm aware it's my thread, but that's why I asked
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server