Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Marko Zorec
@mzorec
actually now that I think about it you will have to enter script and csproj file if you create .flubu file through flubu setup command
I will try to improve this in next version so that you don't have to enter locations if they are at the default locations
Marko Zorec
@mzorec
Can I ask how do you plan to set version after you fetch it with GitVersionTask
you might encounter one issue depending on which approach you will take
Michael Tsai
@huanlin
So I guess I can use GitVersion with FlubuCore as well.
Marko Zorec
@mzorec
yes you can
Michael Tsai
@huanlin
However, GitVersion is not a must for me. I'm OK if the following code work:
context.Properties.Set(BuildProps.BuildVersion, "1.2.3.0");
Marko Zorec
@mzorec
you can use GitVersion
Michael Tsai
@huanlin
Fetching version number from a text file is fine for me, too. :)
@mzorec OK, will try it.
I mean I'll try GitVersion.
Marko Zorec
@mzorec
you have to set BuildVersion through UpdateNetCoreVersionTask which will modidy csproj
or set it BuildTask
explicitly
context.CreateTarget("Build")
.AddCoreTask(x => x.Build().FileVersion());
if you take this approach i recomend that you do it in this way:
Marko Zorec
@mzorec
    public GitVersion Version { get; set; }

    protected override void BeforeBuildExecution(ITaskContext context)
    {
        Version = context.Tasks().GitVersionTask().Execute(context);
    }

    protected override void ConfigureTargets(ITaskContext context)
    {

        context.CreateTarget("test")
            .AddCoreTask(x => x.Build().Version(Version.SemVer));
    }
this will be simplified in FlubuCore 5.0
which will be released shortly
Michael Tsai
@huanlin
OK, looks good! One question:
Does FlubuCore depend on GitVersion command line tool?
Marko Zorec
@mzorec
yes you have to install global tool
Michael Tsai
@huanlin
I'll report here if I found anything interesting.
Marko Zorec
@mzorec
ok
Michael Tsai
@huanlin
    public GitVersion Version { get; set; }

    protected override void BeforeBuildExecution(ITaskContext context)
    {
        Version = context.Tasks().GitVersionTask().Execute(context);
    }

    protected override void ConfigureTargets(ITaskContext context)
    {

        context.CreateTarget("test")
            .AddCoreTask(x => x.Build().Version(Version.SemVer));
    }
Thanks very much for your help!
Marko Zorec
@mzorec
np
Marko Zorec
@mzorec
Happy to announce that FlubuCore got accepted to .net foundation :)
Michael Tsai
@huanlin
congrats!
nawfalhasan
@nawfalhasan
Wow..
Marko Zorec
@mzorec
FlubuCore 5 was released
nawfalhasan
@nawfalhasan
😍🤘
Michael Tsai
@huanlin
😍
Marko Zorec
@mzorec
so it's official :)
nawfalhasan
@nawfalhasan
Hurray!
nawfalhasan
@nawfalhasan
I was going through the list. Surprised to not see Uno :o
Maik Schönfeld
@Elron1179
Hi guys,
I am trying to set the version for the build for a .net (not .net core) solution.
Is that possible without a 'core'-task?
Marko Zorec
@mzorec
hey
yes sure it is possible
Marko Zorec
@mzorec
If I understand you correctly you have a solution with old csprojs (before .net core)
Marko Zorec
@mzorec
@Elron1179 if this is the case take a look at this example https://github.com/dotnetcore/FlubuCore.Examples/blob/master/MVC_NET4.61/BuildScripts/BuildScript.cs
and read the comment in ConfigureBuildProperties. Example adds target "Generate.commonassinfo" which generates common assembly information(more about common assembly information can be read for example here https://amido.com/blog/shared-assemblyinfo-dont-repeat-yourself/) for all projects in solution. Compile target then picks up this generated common assembly information file where version information is stored. Version information is set by "update.version" target.
or you have newer project files targeting .net framework?
Maik Schönfeld
@Elron1179
thank you for your response.
yes, for the moment I still have to create my projects in .net. The switch to .net core was discussed but is not near yet.
I like the concept of FlubuCore, especially having the build process as a project in the solution.
Sadly for the moment I ran into some other problem, where I found infos for .net core, but not for .net and I just could not afford to put more time into recherche.
So for the moment, I had to hit the breaks and head back for cake.
As soon as I get the clearance to start migrating projects towards .net core, I will give FlubuCore a more serious attempt.
Btw: 'common assembly info'. never heard of that concept before but I really like it and will have a look into that.
So thanks again and I hope to see you in the future with a proper .net core build project.
Marko Zorec
@mzorec
yes, for the moment I still have to create my projects in .net. The switch to .net core was discussed but is not near yet.
@Elron1179 But even if you have to create projects for .net you can use new csprojs targeting old .net framework so you can use .net core cli and other new features
you can also use for example .net core mvc in .net full framework. We did this in our web APIs alot of times when something was not available in .net core then switched to .net core when we could.
If you do all this then the migration from .net to .net core is much easier
Marko Zorec
@mzorec
about common assembly info.. Just FYI This concept is not used anymore in .net core same goes for new csrpoj files targeting full .net framework.