I'm trying to install MS Build Extension Pack in order to use the compression task.
I followed the instruction in the nuget web site --
i.e. I executed Install-Package MSBuild.Extension.Pack
in the Package Manager Console.
It created the MSBuild.Extension.Pack.1.8.0 folder in my project's packages folder.
I used the example given in the official help site: msbuild extension pack web site and integrated it into my csproj file.
But I'm getting this error:
error MSB4019: The imported project "C:\Program Files (x86)\Jenkins\jobs\ABBYY-OCR\workspace\packages\MSBuild.Extension.Pack.1.8.0\tools\net40\MSBuild.ExtensionPack.tasks" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Indeed the path C:\Program Files (x86)\Jenkins\jobs\ABBYY-OCR\workspace\packages\MSBuild.Extension.Pack.1.8.0\tools\net40 exists, but MSBuild.ExtensionPack.tasks does not (This is so both on the build server and on my machine), though the folder contains other files (mainly dll files).
Nuget seems to have downloaded only the Binaries folder.
The MSBuild Extension Pack provides a collection of over 480 MSBuild Tasks, MSBuild Loggers and MSBuild TaskFactories.
This method worked for me:
MSBuild.Extension.Pack
and MSBuild.ExtensionPack.Task
packages\MSBuild.ExtensionPack.Task.1.0.3\tools
folder and copy to path C:\Program Files (x86)\Microsoft Visual Studio\2019\Profession\MSBuild\ExtensionPack\4.0.
If this folder doesn't exists, you must create.packages\MSBuild.Extension.Pack.1.9.1\tools
folder to C:\Program Files (x86)\Microsoft Visual Studio\2019\Profession\MSBuild
pathYou need to import the file MSBuild.Extension.Pack.targets in the build directory. It is the same as the .tasks file.
This should work:
<Import Project="..\packages\MSBuild.Extension.Pack.1.8.0\build\net40\MSBuild.Extension.Pack.targets"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With