In the very simple MSBuild script below ReSharper indicates the the Clean target is not defined. It is clearly wrong.
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
<!– Required Import to use MSBuild Community Tasks –>
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
<PropertyGroup>
<NoWarn Condition="'$(NoWarn)'!=
">$(NoWarn),</NoWarn>
<NoWarn>$(NoWarn)MSB4078</NoWarn>
<Configuration Condition=" '$(Configuration)' == ">Debug</Configuration>
<PackageName>MyProject</PackageName>
<WorkingDirectory>ClassLibrary\bin\$(Configuration)</WorkingDirectory>
<ZipFilename>$(PackageName)-$(Configuration).zip</ZipFilename>
</PropertyGroup>
<ItemGroup>
<ZipFiles Include="$(WorkingDirectory)\**\*.*" Exclude="*.zip">
</ZipFiles>
</ItemGroup>
<Target Name="Clean">
<RemoveDir Directories="$(WorkingDirectory)" Condition="Exists('$(WorkingDirectory)')" />
<MSBuild Projects="ClassLibrary\ClassLibrary.csproj" Targets="Clean"></MSBuild>
</Target>
<Target Name="Build" DependsOnTargets="Clean">
<MSBuild Projects="ClassLibrary\ClassLibrary.csproj"></MSBuild>
</Target>
<Target Name="Package">
<Zip Files="@(ZipFiles)" ZipFileName="$(ZipFilename)" WorkingDirectory="$(WorkingDirectory)" />
</Target>
</Project>
Issue was closed
We were unable to reproduce this problem. Could you please attach a screenshot demonstrating it to this issue? Thanks!
Community Tasks which are installed under the Program Folders
directory. The task references will not be held within the Solution
as it is a used across all projects.
I cannot create a screenshot as I have removed RS from this machine.
It was claiming the tasks from MSBuild community tasks were not defined even though the import reference was pulling them in properly. The script runs just fine with the MSBuild utility.
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
Brennan