-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET Core support #39
Comments
There was an attempt to migrate initially, but got abandoned: #19 Feel free to PR if you need it sooner. I tried to get it migrated, but BACPAC/DACPAC dependencies are not yet on Core and I did not want a partial solution. But let's go there without it, as it is causing too much pain already. |
I've done Cake.Hosts to work on both full-fat framework and Core - can use it as example for build script as that will have to be updated |
Mind if I move you to the modern csproj SDK too, like Cake.Hosts? |
@jnm2 go wild! |
@jnm2 I mean without breaking compatibility ;-P |
Awww... |
Do you care if I get rid of the This is what I have so far: master...jnm2:dotnet_core_support The last remaining part of the upgrade is to create a multi-targeting nupkg which can either be done manually (which is brittle to changing target frameworks or changing dependencies) or with MSBuild magic. |
@jnm2 Looks a lot cleaner - at least the projects files The remaining the the hard part - building for multi-platforms is hard. |
Cool. |
Right now you have (The difference is whether to use an external .nuspec or do it all from the .csproj.) |
You should add an appveyor.yml to the repo to make it easy for me to set up my own AppVeyor test on my own fork. |
Currently blocked at https://gitter.im/cake-build/cake?at=59fe39f74ff065ac18b78e65 |
@jnm2 re |
Cool, thanks. I think you should erase the API keys in that comment though or a bot will pick them up for sure. I don't think I need them. |
These are encrypted by appveyor, so no worries. |
Guys, may i ask how this issue is going? We are really waiting to use this library in our build process. Can we expect a pull request or new version soon? Or can we help you somehow to port the library? |
Hey @jnm2 which bootstrapper did you use? Currently i am using cake in a dotnet core environment on Ubutnu so there are dotnet core compatible addins out there. I got the same error as you when i use the full framework cake bootstrapper. Did you use the core compatible bootstrapper? Unfortunatelly on the official site it is not available but you can find one here: https://github.com/devlead/BitbucketPipelinesShield/blob/master/build.ps1 The main point to install the Cake.CoreCLR dll and not the Cake.exe. Hope this help solving your issue. |
@Kemyke Interesting. Unfortunately, publishing an addin that breaks everyone unless they switch their bootstrapper to run their scripts on .NET Core is not something I see as a good thing. What if I'm using an unrelated addin that requires .NET Framework (like this one currently does)? |
No it won't be breaking change. You should create a nuget package which contains the full framework and the core packages. You can control the target frameworks in the csproj. (eg: net46;netstandard16) |
Check this addin for example: Cake.FileHelpers You can download the nupkg (https://www.nuget.org/packages/Cake.FileHelpers/) and check the nuspec file, you can find the multiple targetFramework in it. |
@Kemyke That's exactly what we're doing; unfortunately, the approach you suggest is currently blocked. See https://gitter.im/cake-build/cake?at=59fe39f74ff065ac18b78e65. |
@jnm2 probably worth copying the exception you get into this thread |
Relevant log output:
|
The net46 target works fine, but there's no point in going ahead and adding the |
Ok, i can reproduce your error from your branch. Taking a look at it... |
@Kemyke If you see a way through that I didn't, or you feel like 'being the change we want to see' 😬 in Cake, please take the lead. I've been so busy! |
This must be a Cake bug, i have to investigate it further.
Now i am trying to dig deeper. |
Since Cake now supports .Net Core, can you guys try this again please? |
Another request for .Net Core support please. |
Sadly, I don't have time to invest in this anymore. I'm moving in a different direction for build scripts. |
@jnm2 What are you doing, if you don't mind me asking here? @IvorBright I think I have a plan for getting .Net Core to this project. Hopefully will get this done in a next few weeks. |
@trailmax I've been looking for options that don't add much overhead time and that scale easily when the complexity increases to many files. For simple Windows projects, I tried PowerShell because it's hands down the fastest (it's its own bootstrapper) and is easy to use for simple scripts by invoking dotnet or vswhere. I'll definitely be doing more of that for small scripts. For more complex projects, making the build script a console app and bootstrapping with I'm getting a boost by using https://nuke.build/ for now to avoid writing everything from scratch, but I could see myself wanting to be fully custom too. Still figuring it out. I sorta like the mentality of plugging in pre-built parts to save time, such as parsing CLI arguments and tracking targets, while feeling free to customize other parts to fit the project, such as parallelism or console output. (I'm keeping my eye on https://github.com/dotnet/command-line-api/wiki/DragonFruit-overview.) |
@jnm2 Ah, that sounds like the exactly same issues I've been hitting with Cake as well. On one of my builds I noticed that Cake warm-up time was 5 minutes(!!!) and the actual build another 4min. And yes, creating build scripts are a pain with Cake. Nuke.build looks intersting - I'll check it out. |
@trailmax Hope that was helpful! I'm certainly not interested in discouraging you from using Cake. |
hi, .NET core support was introduced in #66 |
Scripts that use Cake.SqlServer cannot be run or debugged using CoreCLR.
Can we add a
netstandard1.6
build to the package? It's okay if things like DACPAK are missing initially; I don't use them.Willing to help/PR.
The text was updated successfully, but these errors were encountered: