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 844077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:13:52+00:00 2026-05-15T06:13:52+00:00

Edit 4 (Edit 1 to 3 removed as they where solved) My last problem

  • 0

Edit 4 (Edit 1 to 3 removed as they where solved)

My last problem is that I would like multiple targets but it does not seem to work. I have to stick them all into the same target what kinda sucks since it would nice to different names so I got to change something I can just look at the target name.

Hi

I am trying to get my MsBuild and it works….if all my stuff is in the same target tag. If I have multiple tags it only does the first one and that’s it. None of the other targets are done.

<Target Name="Test1">
    <ItemGroup>
      <JavaScriptFiles Remove="@(JavaScriptFiles)" />
  <JavaScriptFiles Include="..\PathHere\Javascript.js"/>

</ItemGroup>
<CompressorTask
      JavaScriptFiles="%(JavaScriptFiles.Identity)"
      ObfuscateJavaScript="True"
      PreserveAllSemicolons="False"
      DisableOptimizations="Nope"
      EncodingType="Default"
      DeleteJavaScriptFiles="false"
      LineBreakPosition="-1"
      JavaScriptOutputFile="../Path/Here/(JavaScriptFiles.FileName).min.js"
      LoggingType="ALittleBit"
      ThreadCulture="en-au"
      IsEvalIgnored="false"
        />

<ItemGroup>    
  <JavaScriptFiles Remove="@(JavaScriptFiles)" />
   <JavaScriptFiles Include="..\PathHere\Javascript2.js"/>

</ItemGroup>
<CompressorTask
      JavaScriptFiles="%(JavaScriptFiles.Identity)"
      ObfuscateJavaScript="True"
      PreserveAllSemicolons="False"
      DisableOptimizations="Nope"
      EncodingType="Default"
      DeleteJavaScriptFiles="false"
      LineBreakPosition="-1"
      JavaScriptOutputFile="../Path/Here/%(JavaScriptFiles.FileName).min.js"
      LoggingType="ALittleBit"
      ThreadCulture="en-au"
      IsEvalIgnored="false"
        />


  </Target>

So the above works. If I do this

    <Target Name="Test2">

        <ItemGroup>    
          <JavaScriptFiles Remove="@(JavaScriptFiles)" />
           JavaScriptFiles Include="..\PathHere\Javascript3.js"/>
    </ItemGroup>
    <CompressorTask
          JavaScriptFiles="%(JavaScriptFiles.Identity)"
          ObfuscateJavaScript="True"
          PreserveAllSemicolons="False"
          DisableOptimizations="Nope"
          EncodingType="Default"
          DeleteJavaScriptFiles="false"
          LineBreakPosition="-1"
          JavaScriptOutputFile="../Path/Here/%(JavaScriptFiles.FileName).min.js"
          LoggingType="ALittleBit"
          ThreadCulture="en-au"
          IsEvalIgnored="false"
            />

</Target>

Then the first target will go and the above one will do nothing.

  • 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-15T06:13:52+00:00Added an answer on May 15, 2026 at 6:13 am

    I’m not sure, but it looks like there is some confusion about MSBuild variable access. There are three ways to access variables with msbuild.

    $()  Extracts the value of a property
    @()  Extracts the value of an item as a list, that is, vector
    %()  Extracts value of an item as a single string, that is, scalar
    

    It looks like you actually want to be using @() where you are using %() but I’ll confess I’m having a hard time understanding exactly what your problem is. You said it “will do nothing” but chances are it’s doing something, even if it doesn’t appear to be doing anything.

    more here

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

Sidebar

Related Questions

EDIT: Learned that Webmethods actually uses NLST, not LIST, if that matters Our business
edit #2: Question solved halfways. Look below As a follow-up question, does anyone know
Edit: This question was written in 2008, which was like 3 internet ages ago.
Edit: From another question I provided an answer that has links to a lot
Edit : Solved, there was a trigger with a loop on the table (read
NOTE: Solved my own problem, it seems. See the edits. I am trying to
[SOLVED]: Applying proper list iteration procedure fixed problem. (Shown below) I currently have a
I would like to remove the resizing border from my WPF custom window. I
I've got a nice power-shell driven post-build script that does some magic mumbo-jumbo for
I wanted to make a special version of shared_ptr that would perform specific operations

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.