TransFormFiles Error While Upgrading SharePoint Project From VS 2010 to VS 2013

The "TransformFiles" task was not given a value for the required parameter "IsDebugging".

I will write today about one issue that sometimes occurs when you try to upgrade your SharePoint Project from Visual Studio 2010 to Visual Studio 2013.

It can also occur in any new SharePoint Project in Visual Studio 2013 directly if you try to add the "PostBuildEventDependsOn" property in a .csproj/.vbproj file (from a text editor such as Notepad) to generate the .wsp when building the project.

The following is the exception you get:

The "TransformFiles" task was not given a value for the required parameter "IsDebugging"

When you add the same properties to a .csproj/.vbproj file (from a text editor such as Notepad) in Visual Studio 2010 SharePoint project then it works well and creates the .wsp correctly there. Notice the "\v10.0\" in the project path for Visual Studio 2010.

  1. <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets" />  
  2. <PropertyGroup>   
  3.       <PostBuildEventDependsOn>$(PostBuildEventDependsOn);CreatePackage</PostBuildEventDependsOn>  
  4.       <PostBuildEvent>copy "$(TargetDir)$(TargetName).wsp" "$(SolutionDir)DeploymentFiles\$(TargetName).wsp"</PostBuildEvent>  
  5. </PropertyGroup> 
But when you try to use the same settings in the Visual Studio 2013 project then it doesn't work and throws the exception The "TransformFiles" task was not given a value for the required parameter "IsDebugging".

Notice the "\v12.0\" in the project path for Visual Studio 2013.
  1. <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v12.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets" />  
  2. <PropertyGroup> <PostBuildEventDependsOn>$(PostBuildEventDependsOn);CreatePackage</PostBuildEventDependsOn>  
  3. <PostBuildEvent>copy "$(TargetDir)$(TargetName).wsp" "$(SolutionDir)DeploymentFiles\$(TargetName).wsp"</PostBuildEvent>  
  4. </PropertyGroup>
The exception says that the property "IsDebugging" that is a required property is not provided with any value.

After carefully examining the "Microsoft.VisualStudio.SharePoint.targets" file, it was observed that this property "IsDebugging" is being used inside the "TransformFiles" element.

After doing very much Googling for this exception, I haven't found any solution.

While troubleshooting, I just provided the value for "IsDebugging" as in the following and Voila! It worked! There was no more exception after building the solution and the .wsp was generated perfectly.
  1. <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v12.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets" />  
  2. <PropertyGroup>  
  3. <IsDebugging>False</IsDebugging> <PostBuildEventDependsOn>$(PostBuildEventDependsOn);CreatePackage</PostBuildEventDependsOn>  
  4. <PostBuildEvent>copy "$(TargetDir)$(TargetName).wsp" "$(SolutionDir)DeploymentFiles\$(TargetName).wsp"</PostBuildEvent>  
  5. </PropertyGroup>
Please note one important thing here, I need to use the PostBuildEvent command to copy the .wsp to some other location. When I was not using this command, the .wsp file was not being built at the bin\release folder.

I hope it will help someone out there to save his/her day.