Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "CompressorTask" task was not found. #1

Open
mjacob08 opened this issue Apr 4, 2020 · 3 comments
Open

The "CompressorTask" task was not found. #1

mjacob08 opened this issue Apr 4, 2020 · 3 comments

Comments

@mjacob08
Copy link

mjacob08 commented Apr 4, 2020

I have followed the tutorial in https://www.youtube.com/watch?v=Cj8MHPCubuM
I am getting below error:
I am using VS 2019 in windows 10 - everything is latest as of Feb 2020

C:\Users\I868962\Documents\repos\WebApp1\yui>msbuild compressor.xml
Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 4/3/2020 8:54:55 PM.

Project "C:\Users\I868962\Documents\repos\WebApp1\yui\compressor.xml" on node 1 (default targets).

C:\Users\I868962\Documents\repos\WebApp1\yui\compressor.xml(10,5): error MSB4036: The "CompressorTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin" directory.
Done Building Project "C:\Users\I868962\Documents\repos\WebApp1\yui\compressor.xml" (default targets) -- FAILED.

Build FAILED.

"C:\Users\I868962\Documents\repos\WebApp1\yui\compressor.xml" (default target) (1) ->
(CompressFiles target) -> C:\Users\I868962\Documents\repos\WebApp1\yui\compressor.xml(10,5): error MSB4036: The "CompressorTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.)The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin" directory.

0 Warning(s)

1 Error(s)

Time Elapsed 00:00:00.06

image

@mjacob08
Copy link
Author

mjacob08 commented Apr 4, 2020

There was a small mistake. the name in usingtask element had an 's' in the end. I corrected it and this time it gives me below error.

C:\Users\I868962\Documents\repos\WebApp1\yui\compressor.xml(9,5): error MSB4062: The "CompressorTask" task could not be loaded from the assembly C:\Users\I868962\Documents\repos\WebApp1\yui..\bin\Yahoo.Yui.Compressor.MsBuild.dll. Confirm that the declaration is correct, that the assembly and all its dependencies are available,and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

image

@mjacob08
Copy link
Author

mjacob08 commented Apr 4, 2020

I even tried msbuild yui\compressor.xml and the result is the same as shown below:
image

@mjacob08
Copy link
Author

mjacob08 commented Apr 4, 2020

This time put the compressor.xml in the root and removed the relative path (..) in the xml file. Still its the same result as shown in below screen

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant