-
Notifications
You must be signed in to change notification settings - Fork 270
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
NuGet package no longer aligned with the 'Getting Started' guide. #258
Comments
Facing the same issue. Any updates on this? |
Looks like something like this will get you going
obviously change this to your current version, as it implies above I found my tasks target file here: |
The problem is using NuGet as Package reference. I this case there is no installation folder relative to solution, only a local folder mentioned by lcornejo. I solved this by copying task files to path in solution dir (in example .build) and modified paths is .csproj pointing to this dir. |
my <PropertyGroup>
<MSBuildCommunityTasksPath>$(SolutionDir)\packages\MSBuildTasks.1.5.0.235\tools</MSBuildCommunityTasksPath>
</PropertyGroup>
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets" /> |
Dropping this here for all late searchers: I just placed the package reference and MSBuild (nowadays as of VS2022?) imports the targets automatically: <ItemGroup>
<PackageReference Include="MSBuildTasks" Version="1.5.0.235"/>
</ItemGroup> One can check this in the generated <?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
...
<Import Project="$(NuGetPackageRoot)msbuildtasks\1.5.0.235\build\MSBuildTasks.targets" Condition="Exists('$(NuGetPackageRoot)msbuildtasks\1.5.0.235\build\MSBuildTasks.targets')" />
...
</ImportGroup>
</Project> |
Version 1.5 of the NuGet package no longer has the PowerShell script that adds the .build folder; yet the 'Getting Started' guide still says to reference this folder if using NuGet to get MSBuildTasks. Is there an alternative method to use MSBuildTasks via NuGet? If so, the documentation should be updated. Otherwise, reinstate the PowerShell script.
The text was updated successfully, but these errors were encountered: