✅ 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
And building from cli works? Just building,not publishing
dotnet build
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
That doesn't answer my question
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
Build from the cli.
See if you get the same problem
This is what I'm asking you to do
ok the build from command prompt was succesful but I don't know where it put the build
Ok then try a publish from cli
dotnet publish
Ok, have a look in the /bin/publish folder
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?¯\_(ツ)_/¯
I think it's more likely a Vs cache bug
ok how can I fix it?
Make sure your code is pushed to GitHub, then delete the .Vs and obj folders
Make sure Vs is closed
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
my issue was using DataGrid but not having the avalonia package installed? so weird but its fixed now. you can close this
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Use the /close command to mark a forum thread as answered
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•16mo ago
Message Not Public
Sign In & Join Server To View