Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6215407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:03:02+00:00 2026-05-24T07:03:02+00:00

I’m getting into MSBuild to handle various targets of projects and I’m finding it

  • 0

I’m getting into MSBuild to handle various targets of projects and I’m finding it to be quite flexible. (It’s also helping me understand the possibilities of our CI system, too)

I need to get the current SVN revision of the project, for which I have written a custom task that calls SubWCRev and parses the output.

I reference this using the element:

<UsingTask TaskName="xxx.Elements.Build.MSBuildTasks.SubWCRev" AssemblyFile="D:\dev\xxx_presentation\Build\xxx.Elements.Build.dll">
    <ParameterGroup>
        <LastCommittedRevision ParameterType="System.Int" Required="False" Output="True" />
        <MixedRevisionRangeMinimum ParameterType="System.Int" Required="False" Output="True" />
        <MixedRevisionRangeMaximum ParameterType="System.Int" Required="False" Output="True" />
        <HasLocalModifications ParameterType="System.Boolean" Required="False" Output="True" />
    </ParameterGroup>
</UsingTask>

I then execute the task …

  <Target Name="Version" BeforeTargets="BuildDatabase">
        <xxx.Elements.Build.MSBuildTasks.SubWCRev WorkingCopyDir="$(ProjectDir)..">
            <Output TaskParameter="LastCommittedRevision" ItemName="LastCommittedRevision" />
            <Output TaskParameter="MixedRevisionRangeMinimum" ItemName="MixedRevisionRangeMinimum" />
            <Output TaskParameter="MixedRevisionRangeMaximum" ItemName="MixedRevisionRangeMaximum" />
            <Output TaskParameter="HasLocalModifications" ItemName="HasLocalModifications" />
        </xxx.Elements.Build.MSBuildTasks.SubWCRev>
        <Message Text="Revision is @(LastCommittedRevision)" />
    </Target>

My problem is that MSBuild insists I use the TaskFactory attribute, which this document says is optional. And I’m also seeing that TaskFactory is particularly for Inline Tasks, which I am not interested in.

The error message is:

The required attribute “TaskFactory” is empty or missing from the element UsingTask.

Where am I going wrong?

(And by the way, I’m finding MSBuild Sidekick 3 to be excellent and reducing the resistance of what can become a pretty complicated script.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T07:03:03+00:00Added an answer on May 24, 2026 at 7:03 am

    That attribute is optional when you are specifying UsingTask in the traditional manner to just point to a task in an assembly:

    <UsingTask 
       TaskName="MyCustomTask"
       AssemblyFile="$(PathToTasks)/MyCustomTasks.dll"
       />
    

    When specifying an inline task, the attribute is no longer optional. You then use:

    <UsingTask
       TaskName="EnableAllPropertyFunctions"
       TaskFactory="CodeTaskFactory"
       AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
       <ParameterGroup>...
       <Task>...
    </UsingTask>
    

    What you are doing appears to mix both of those. If you are using a task from the built assembly “D:\dev\xxx_presentation\Build\xxx.Elements.Build.dll”, then you shouldn’t be specifying the ParameterGroup, MSBuild knows how to discover the parameters, and that it is present in your declaration implies that MSBuild should be trying to find the rest of the inline task.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I am currently running into a problem where an element is coming back from
I am using Paperclip to handle profile photo uploads in my app. They upload
I need to clean up various Word 'smart' characters in user input, including but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.