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

  • Home
  • SEARCH
  • 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 6569599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:39:08+00:00 2026-05-25T14:39:08+00:00

Using the following msbuild config: <?xml version=1.0 encoding=utf-8?> <Project xmlns=http://schemas.microsoft.com/developer/MsBuild/2003> <UsingTask TaskName=CompressorTask AssemblyFile=Yahoo.Yui.Compressor.dll />

  • 0

Using the following msbuild config:

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/MsBuild/2003">

    <UsingTask
        TaskName="CompressorTask"
        AssemblyFile="Yahoo.Yui.Compressor.dll" />

    <PropertyGroup>
        <JavaScriptOutputFile Condition=" '$(JavaScriptOutputFile)'=='' ">..\..\site.se\javascript\javascript.min.js</JavaScriptOutputFile>
    </PropertyGroup>

    <Target Name="CompressorTask">
        <ItemGroup>
          <JavaScriptFiles Include="..\..\site.se\javascript\javascript.js"/>
        </ItemGroup>
        <CompressorTask
             JavaScriptFiles="@(JavaScriptFiles)"
             ObfuscateJavaScript="True"
             PreserveAllSemicolons="True"
             DisableOptimizations="False"
             EncodingType="utf-8"
             DeleteJavaScriptFiles="false"
             LineBreakPosition="-1"
             JavaScriptOutputFile="$(JavaScriptOutputFile)"
             LoggingType="HardcoreBringItOn"
             ThreadCulture="en-us"
             IsEvalIgnored="false" />
    </Target>

</Project>

I get the following error:

Scripts.xml(14,11): error MSB4067: -element under
-element is unknown. (translated from swedish)

I’m using the 32bit .NET 2.0 version of MsBuild.

What’s wrong?

  • 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-25T14:39:09+00:00Added an answer on May 25, 2026 at 2:39 pm

    You can’t put an ItemGroup in a target with MSBuild for .NET 2. You have to use the CreateItem task or put it outside of the target. In your case you don’t seem to need to dynamically create the JavaScriptFiles item so you just have to put it outside of the target.


    Outside:

      <ItemGroup>
        <JavaScriptFiles Include="..\..\site.se\javascript\javascript.js"/>
      </ItemGroup>
    
      <Target Name="CompressorTask">
        <CompressorTask
             JavaScriptFiles="@(JavaScriptFiles)"
             ObfuscateJavaScript="True"
             PreserveAllSemicolons="True"
             DisableOptimizations="False"
             EncodingType="utf-8"
             DeleteJavaScriptFiles="false"
             LineBreakPosition="-1"
             JavaScriptOutputFile="$(JavaScriptOutputFile)"
             LoggingType="HardcoreBringItOn"
             ThreadCulture="en-us"
             IsEvalIgnored="false" />
      </Target>
    

    Using CreateItem:

      <Target Name="CompressorTask">
        <CreateItem Include="..\..\site.se\javascript\javascript.js">
          <Output TaskParameter="Include" ItemName="JavaScriptFiles"/>
        </CreateItem>
    
        <CompressorTask
             JavaScriptFiles="@(JavaScriptFiles)"
             ObfuscateJavaScript="True"
             PreserveAllSemicolons="True"
             DisableOptimizations="False"
             EncodingType="utf-8"
             DeleteJavaScriptFiles="false"
             LineBreakPosition="-1"
             JavaScriptOutputFile="$(JavaScriptOutputFile)"
             LoggingType="HardcoreBringItOn"
             ThreadCulture="en-us"
             IsEvalIgnored="false" />
      </Target>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using MSBuild Community Tasks to automatically update my assembly version numbers according to
In my project I write tests using Microsoft's unit testing framework. All of my
I am trying to build and deploy a .NET 4 project using MSBuild Web
When I build my solution using MSBuild 4 it compiles successfully: C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe MySolution.sln Build
i'm using teamcity 5.1.5.. trying to build an MSBuild project with an AfterDeploy target
In a project which target framework is 3.5 the following line compiles with MsBuild
I am using the following MSBuild command form the command prompt: MSBuild.exe /nologo Server.Website.csproj
I'm attempting to build a project using MSBuild (v4.0) on a 64-bit machine. For
MSBuild 3.5 I have the following project structure: trunk/MainSolution.sln trunk/Build/MyBuild.Proj trunk/Library/... trunk/etc... So far,
I am using msbuild to build a C++ project and I want to suppress

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.