sethreno / schemazen

Script and create SQL Server objects quickly
MIT License
333 stars 140 forks source link

Unable to build Tests Project (fix included) #195

Closed aboy021 closed 2 years ago

aboy021 commented 3 years ago

I just checked out master and was unable to build the Tests project on commit b1330b119fe9c2116418b5d49266a6e5d385a526. I investigated this further and found that the error was due a couple of incorrect entries in the Tests.csproj file. Probably left over from a bad merge.

In the file Tests\Tests.csproj, the section:

  <Import Project="..\packages\JetBrains.ReSharper.CommandLineTools.2020.1.0-eap02\build\JetBrains.ReSharper.CommandLineTools.targets" Condition="Exists('..\packages\JetBrains.ReSharper.CommandLineTools.2020.1.0-eap02\build\JetBrains.ReSharper.CommandLineTools.targets')" />
  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
    </PropertyGroup>
    <Error Condition="!Exists('..\packages\JetBrains.ReSharper.CommandLineTools.2020.1.0-eap02\build\JetBrains.ReSharper.CommandLineTools.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\JetBrains.ReSharper.CommandLineTools.2020.1.0-eap02\build\JetBrains.ReSharper.CommandLineTools.targets'))" />
    <Error Condition="!Exists('..\packages\JetBrains.ReSharper.CommandLineTools.2020.1.3\build\JetBrains.ReSharper.CommandLineTools.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\JetBrains.ReSharper.CommandLineTools.2020.1.3\build\JetBrains.ReSharper.CommandLineTools.targets'))" />
  </Target>
  <Import Project="..\packages\JetBrains.ReSharper.CommandLineTools.2020.1.3\build\JetBrains.ReSharper.CommandLineTools.targets" Condition="Exists('..\packages\JetBrains.ReSharper.CommandLineTools.2020.1.3\build\JetBrains.ReSharper.CommandLineTools.targets')" />

Should read:

  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
    </PropertyGroup>
    <Error Condition="!Exists('..\packages\JetBrains.ReSharper.CommandLineTools.2020.1.3\build\JetBrains.ReSharper.CommandLineTools.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\JetBrains.ReSharper.CommandLineTools.2020.1.3\build\JetBrains.ReSharper.CommandLineTools.targets'))" />
  </Target>
  <Import Project="..\packages\JetBrains.ReSharper.CommandLineTools.2020.1.3\build\JetBrains.ReSharper.CommandLineTools.targets" Condition="Exists('..\packages\JetBrains.ReSharper.CommandLineTools.2020.1.3\build\JetBrains.ReSharper.CommandLineTools.targets')" />
sethreno commented 2 years ago

This is fixed in the latest master. The project has been migrated to xUnit & net6.