Having trouble setting up SmartAssembly 8.1 on build server
tyoungman
Posts: 3 New member
Hello, I am attempting to upgrade our projects to use SmartAssembly 8.1 (previously was using version 6).
Everything runs fine locally, except I am now getting an error stemming from the target file that our .csproj files point to.
Here is the error:
packages\RedGate.SmartAssembly.MSBuild.8.1.2.4975\build\RedGate.SmartAssembly.MSBuild.targets(18, 5): error MSB4036: The "SmartAssembly" 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 <UsingTask> in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin" directory.
I understand this is an autogenerated file, so I am wondering if there are any ideas as to what I am missing on the server to cause this error?
I have followed the instructions of the "Upgrade SA from 7 to 8" article I found, and our .csproj files are able to find the target file, so I am a little lost on what the exact issue is.
Everything runs fine locally, except I am now getting an error stemming from the target file that our .csproj files point to.
Here is the error:
packages\RedGate.SmartAssembly.MSBuild.8.1.2.4975\build\RedGate.SmartAssembly.MSBuild.targets(18, 5): error MSB4036: The "SmartAssembly" 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 <UsingTask> in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin" directory.
I understand this is an autogenerated file, so I am wondering if there are any ideas as to what I am missing on the server to cause this error?
I have followed the instructions of the "Upgrade SA from 7 to 8" article I found, and our .csproj files are able to find the target file, so I am a little lost on what the exact issue is.
Answers
Hi @tyoungman
Thank you for reaching out on the Redgate forums regarding your Smart Assembly questions.
It does look like the MSBuild tasks changed between major updates 6 > 7 and 7 > 8
You may need to follow some specific steps and upgrade in a stepped process from v6 to v7 to v8
https://documentation.red-gate.com/sa/upgrading/upgrading-from-sa6-to-sa7
https://documentation.red-gate.com/sa/upgrading/upgrading-from-sa7-to-sa8
Are you able to provide a copy of your csproj file so we can check the tasks for any obvious concerns.
This link will expire in 14-days and is a secure link so you don't need to share project files over the forum
https://files.red-gate.com/requests/yilxoxo3XzxBO5LUMIpdsa
Are you able to also confirm that you saproj file is next to the csproj file.