Alexicon
❔ Git Hub Actions Dot Net Push keeps trying to use 1.0.0.nupkg but that file should not exist
Wow, I should have thought of that. You were correct, the test was re-building the solution causing it to generate packages again, I guess. To fix it all I had to change was the dotnet test to the following:
Which makes complete sense now that I look at it.
Thanks for helping me with this!
47 replies
canvas keydown event binding mvvm
note that in order to actually use the key events on the canvas you have to give that canvas the focus which means you have to set the focusable property to true and explicitly give it focus in code, for example:
Alternativly you can just use the key down event on say the window instead and avoid this, for example:
I have a simple working example of all this here: https://github.com/AlexLexicon/Discord.Example.CanvasEventBinding
4 replies
canvas keydown event binding mvvm
Welcome to the world of event binding in mvvm with wpf.
In order to bind an event to a command in your view model I reccomend using the nuget package: 'Microsoft.Xaml.Behaviors.Wpf'
Once you have this package installed in your wpf project you can add the following xaml on any element that has events:
So to do what you want to do you would install that package, add a xmlns refrence, and add the following to your canvas:
I added the 'PassEventArgsToCommand' since I assume you are going to try and detect which keys are being pressed, this will mean in your command method within the view model you can do something like:
4 replies
❔ Git Hub Actions Dot Net Push keeps trying to use 1.0.0.nupkg but that file should not exist
@TeBeClone if I run a simple dotnet build locally like the following:
I do see the correct package being generated
and the release folder on my file system only contains the 'Lexicom.Maths.7.0.12345.nupkg' file and not a 'Lexicom.Maths.1.0.0.nupkg'. In your screenshot I can see that the package that was created was in the debug folder but my yml pipeline builds for release configuration and shouldnt generate any debug output I wouldn't think
47 replies
❔ Git Hub Actions Dot Net Push keeps trying to use 1.0.0.nupkg but that file should not exist
I have to assume that I have missed something but at this point I feel like I have looked over everything and nothing seems incorrect or different than what I had before.
47 replies
❔ Git Hub Actions Dot Net Push keeps trying to use 1.0.0.nupkg but that file should not exist
I cant figure out why this new project doesn’t work like the rest and is not correctly pushed as a 7.0.[run number] version.
I can even see in the build logs of the workflow that the correct nupkg file is being created.
The project’s csproj file looks like this:
I also thought maybe the 1.0.0.nupkg file was pushed in a commit by accident but it does not exist in the git repo and is correctly part of the .gitignore anyway.
The only other new thing that I did was add an x-unit test project and the dot net test part of the workflow but that should not cause any issues I wouldn't think.
It’s been impossible to google this specific issue since everything just takes me to how to push NuGet packages which I already know how to do.
If you need the concrete details, you can view this on the actual GitHub page since this repo is public: https://github.com/AlexLexicon/Lexicom/actions/runs/6701136141/job/18208104259
47 replies
❔ Suppress Visual Studio IDE0270 style rule without adding '.editorconfig'
@whiteviperx Maybe but like I said I want to make it permanent since I am working in several solutions and I don't want to modify the repositories. All other code styles I have managed to configure but this one.
9 replies
✅ Simple way to push a C# project as a NuGet package within a GitHub workflow yml
@TeBeConsulting Hey thanks for the refactored implementation. I changed my pipeline to reflect those changes you recommended. However the path part ''./build/packages/*.nupkg" doesnt work. Something to due with running on windows instead of Linux I think, but thats fine honestly.
21 replies
❔ WPF How to change button hover color?
So I went ahead and made a full example showing what I think it is you want. Again here is the source code:
https://github.com/AlexLexicon/Discord.Example.ThemesAndStyles
But also here is a video where I am demoing it.
https://www.youtube.com/watch?v=mhg_UpsciHM
Notice how simple the actual view code is (The xaml for the MainWindow), Yes styles are annoying but once you have defined them all of your elements of that type can use them. You will also notice I am not even telling it to use those styles but it still is. Thats because if you do not give a style a "x:Key" then it is used as the default style for all those types of elements which makes it nice to use.
130 replies