Git Product home page Git Product logo

Comments (9)

kudaba avatar kudaba commented on May 18, 2024 1

I now have Sharpmake fully ported to .net core, including boostrapping and running on linux. I'm getting a friend to test it out on Mac soon. Going to wait for main devs to respond and get some feedback before doing a full PR for this. I also still have to test debug solution generation.

https://github.com/kudaba/Sharpmake

One thing that I noticed is a bit odd about working in .net core is that development builds are actually .dll files and not .exe files. To get proper functioning .exe to distribute you have to 'publish' which is quite a bit slower build.

from sharpmake.

kudaba avatar kudaba commented on May 18, 2024

I opened a pull request that makes it so we can at least generate .NET Core projects (#63). Next I'm going to see if I can use that change to bootstrap Sharpmake into .NET Core and build natively in WSL.

from sharpmake.

bugproof avatar bugproof commented on May 18, 2024

With all due respect, does it even make sense to use a project generator for C# projects?

People are using only one format anyway on Mac and Linux too (https://stackoverflow.com/a/6604782/2828480). In my opinion, it makes sense only for C++ projects as there are multiple formats.

Because of that I would drop C# support completely and focus on C/C++ projects only.


I think the biggest limitation in porting Sharpmake to .NET Core is Microsoft.VisualStudio.Setup.Configuration.Interop package for locating visual studio instances - it's .NET Framework only. The best workaround would be to port this package to .NET Core or use registry to find VS instances - CMake does it similarly.

from sharpmake.

kudaba avatar kudaba commented on May 18, 2024

Yeah, that's going to be a challenge. I'm thinking I should be able to move that code into a separate dll that only gets built/imported on windows.

And it absolutely makes sense to generate c# projects. It's not so much about an individual file's format, it's more about enabling a lot of flexibility and freedom in overall project structure. Moving code around, generating multiple projects, complex inter-dependencies are very complex problems that sharpmake helps to trivialize.

The example about the VisualStudio setup dependency is a great example. Sharpmake scripts would allow me to add a platform specific IDE interop layer that only gets added to the solution for that platform.

from sharpmake.

bugproof avatar bugproof commented on May 18, 2024

New csproj format can be used for both frameworks. You can still move code around as it implicitly compiles all the .cs files in a directory.

I think it's more convenient than sharpmake for c# projects - it just works cross-platform and no additional generation step is needed. And it looks like .NET framework will become obsolete soon or already is (https://github.com/dotnet/core/blob/master/roadmap.md). That being said, MSBuild is more than enough for c#/f#.

You can still multi-target but ideally .NET Core should be used even when targeting Windows.

<PropertyGroup>
  <TargetFrameworks>netcoreapp2.2;net462</TargetFrameworks>
</PropertyGroup>

Also, take a look at https://blog.magnusmontin.net/2018/11/05/platform-conditional-compilation-in-net-core/ for a nice solution to do platform conditional compilation

from sharpmake.

belkiss avatar belkiss commented on May 18, 2024

This is pretty neat! I'll try to test it out :)

from sharpmake.

bugproof avatar bugproof commented on May 18, 2024

regarding dll files and not exe files: https://github.com/dotnet/cli/issues/6237#issuecomment-511001872

from sharpmake.

malkia avatar malkia commented on May 18, 2024

Is this still on the roadmap?

from sharpmake.

belkiss avatar belkiss commented on May 18, 2024

Hello! Yes, it'll happen eventually, but because of the split between reference and runtime assemblies that was introduced with net core it has proven difficult to get it to work reliably.

from sharpmake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.