Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Build execution failure for .Net projects

    Scheduled Pinned Locked Moved Support
    6 Posts 2 Posters 20 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      bbalavikram
      last edited by bbalavikram

      I am connecting to a GITHUB repo that has multiple applications' code and I am setting up build and Deploy for one particular application code. In the Build execution process, execution is failing for the following error. How to skip or avoid this.
      error group
      Error 1.PNG

      Error Detail
      Error 2.PNG

      In the Script, following is the setting.
      General tab.PNG
      dotnetoptions.PNG
      Can anyone guide to skip/avoid this error ?

      1 Reply Last reply Reply Quote 0
      • B Offline
        bbalavikram
        last edited by

        Only few projects are facing this issue, many other projects are building with no issues.

        Setting Version in C:\ProgramData\BuildMaster\Temp\Service_E14\ID-master\W.Directory.Source\W.Directory.Business\W.Directory.Business.csproj to 0.0.0...
        Setting Version in C:\ProgramData\BuildMaster\Temp\Service_E14\ID-master\WID\W.Common.csproj to 0.0.0...

        stevedennisS 1 Reply Last reply Reply Quote 0
        • stevedennisS Offline
          stevedennis inedo-engineer @bbalavikram
          last edited by

          Hi @bbalavikram ,

          This error message is coming from the dotnet command-line tool, and I think it has something to with an old/legacy project file format. If you were to run the same command on your workstation, you would get the same rror.

          From here, I would compare/contrast the .csproj files in the broken projects, and see if you can figure out what's the difference.

          Note that if you search "root element is visualstudioproject expected project", you'll see a lot of people have a similar error, but their solution is also to do similar things - i.e. edit the file and fix the format.

          Once you fix the project file, if you check the code back into Git, it shoudl work the next time.

          Best,
          Steve

          1 Reply Last reply Reply Quote 0
          • B Offline
            bbalavikram
            last edited by

            Thank you Steve. Will look into fixing the issues. Strange that these come up only when compiled with MSBuild and not on VS...

            1 Reply Last reply Reply Quote 0
            • B Offline
              bbalavikram
              last edited by

              CoreCompilation.PNG

              @stevedennis Now I am facing an issue where the .Net Framework application is getting compiled in .Net core framework. I have mentioned the setting to compile in .Net 4.5

              dotnetoptions.PNG

              stevedennisS 1 Reply Last reply Reply Quote 0
              • stevedennisS Offline
                stevedennis inedo-engineer @bbalavikram
                last edited by

                Hi @bbalavikram ,

                The framework option may not do what you think; first and foremost, 4.5 is not a valid option for framework. You need to use a "framework monifier" that's defined here:
                https://learn.microsoft.com/en-us/dotnet/standard/frameworks

                But keep in mind that framework monifier must also be in your project file. The framework argument for dotnet simply selects which of the frameworks in your project file to build. It's really only useful for multi-targeted builds, which you probably don't have.

                It's possible that dotnet simply will not work with your project. This is unfortunately the case with many old projects. You can continue to try to "play" with your csproj files to try get it to work (note: you can run the same dotnet commands on your workstation).

                If you can't get it to work, then you'll need to use MSBuild:Build-Project or DevEnv::Build. We do not have script templates from these, but you can convert your script template to OtterScript and then try modifying the script that way.

                Here is some information on build scripts:
                https://docs.inedo.com/docs/buildmaster-platforms-dotnet#creating-build-scripts

                Best,
                Steve

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • 1 / 1
                • First post
                  Last post
                Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation