MiKom
MiKom
CC#
Created by MiKom on 12/18/2023 in #help
Publishing application with native libraries
It seems that this magic is related to the contents of obj/project.assets.json. If something is runtimeTargets there, then MSBuild knows to copy it to proper place. But it seems to be done like that only for Nuget packages :/
11 replies
CC#
Created by Sk on 12/18/2023 in #help
✅ Any tips for learning ASP.NET MVC Core?
In the first part it has a quick intro and you build a relatively simple project and the second part is deep-dive into various aspects of asp.net
5 replies
CC#
Created by Sk on 12/18/2023 in #help
✅ Any tips for learning ASP.NET MVC Core?
As a starter, I used a book from this series: https://www.manning.com/books/pro-aspdotnet-core-7-tenth-edition
5 replies
CC#
Created by FongE👑 on 12/18/2023 in #help
I really need to complete the simulated annealing method for the traveling salesman problem
Do you have a debugger available?
16 replies
CC#
Created by FongE👑 on 12/18/2023 in #help
I really need to complete the simulated annealing method for the traveling salesman problem
and then replace EuclideanPath with euclideanPath. Class with an instance
16 replies
CC#
Created by FongE👑 on 12/18/2023 in #help
I really need to complete the simulated annealing method for the traveling salesman problem
it was wrong
16 replies
CC#
Created by FongE👑 on 12/18/2023 in #help
I really need to complete the simulated annealing method for the traveling salesman problem
also, I updated the code above
16 replies
CC#
Created by FongE👑 on 12/18/2023 in #help
I really need to complete the simulated annealing method for the traveling salesman problem
probably in the "CalculateEnergy" method
16 replies
CC#
Created by FongE👑 on 12/18/2023 in #help
I really need to complete the simulated annealing method for the traveling salesman problem
ok, then:
var cities = GenerateCities(20); //or whatever number you want
EuclideanPath euclideanPath = new(cities);
var cities = GenerateCities(20); //or whatever number you want
EuclideanPath euclideanPath = new(cities);
should work
16 replies
CC#
Created by FongE👑 on 12/18/2023 in #help
I really need to complete the simulated annealing method for the traveling salesman problem
So you probably have to construct the liset of the cities by reading some data from somewhere.
16 replies
CC#
Created by FongE👑 on 12/18/2023 in #help
I really need to complete the simulated annealing method for the traveling salesman problem
Well, EuclideanPath constructor takes cities as a parameter, it has to come from somewhere. I presume that cities should be an input to the program?
16 replies
CC#
Created by FongE👑 on 12/18/2023 in #help
I really need to complete the simulated annealing method for the traveling salesman problem
Do you create a new instance of the EuclideanPath class anywhere? The error is weird though because it seems like you're calling a non-static method on a class name. That shouldn't even compile.
16 replies
CC#
Created by MiKom on 12/18/2023 in #help
Publishing application with native libraries
I hoped that publish does some automatic copying based on runtimeid folders in runtimes/ but apparently not
11 replies
CC#
Created by MiKom on 12/18/2023 in #help
Publishing application with native libraries
Possibly SkiaSharp is doing some Nuget-specific magic that I don't know about
11 replies
CC#
Created by MiKom on 12/18/2023 in #help
Publishing application with native libraries
I got them already in the project that defines them:
<Content Condition="$(OS)=='Unix'" Include="../path/to/x64/library.so" LinkBase="runtimes/linux-x64/native">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Condition="$(OS)=='Unix'" Include="../path/to/x64/library.so" LinkBase="runtimes/linux-x64/native">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Do you mean that I also need to have the copying in the consumer, the end-application that's getting packaged?
11 replies
CC#
Created by MiKom on 12/18/2023 in #help
Publishing application with native libraries
It's there in my Content entry. And it is copied, but on publish, the libraries aren't moved from runtimes/[rid]/native to the output directory directly. You mean that I need CopyToOutputDirectory in another place?
11 replies
CC#
Created by MiKom on 12/18/2023 in #help
Publishing application with native libraries
My MSBuild-foo wasn't good enough to figure out what more is SkiaSharp doing 😦
11 replies