Replacing WixSharp package with WixSharp.bin in VS project

May 11, 2015 at 10:52 PM
Just for information :

Since it's strictly speaking not necessary to have the package WixSharp in your project when you have WixSharp.bin, I wanted to remove the WixSharp package. After removing I got errors in my project, saying it was missing a nuget package.

In order to solve this problem, you have to manually remove the targets referring to the WixSharp package. This not necessary any more, since the targets are added by WixSharp.Bin are added as well to the csproj file.

Oleg_s, can you confirm this is correct?
As far as I can tell, my project is now compiling correctly, after removing
  <Import Project="..\..\packages\WixSharp.bin.1.0.13.0\build\WixSharp.targets" Condition="Exists('..\..\packages\WixSharp.bin.1.0.13.0\build\WixSharp.targets')" />
  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable 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\WixSharp.bin.1.0.13.0\build\WixSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixSharp.bin.1.0.13.0\build\WixSharp.targets'))" />
    <Error Condition="!Exists('..\..\packages\WixSharp.bin.1.0.18.0\build\WixSharp.bin.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixSharp.bin.1.0.18.0\build\WixSharp.bin.targets'))" />
  </Target>
Only what WixSharp.Bin added is left :
  <Import Project="..\..\packages\WixSharp.bin.1.0.18.0\build\WixSharp.bin.targets" Condition="Exists('..\..\packages\WixSharp.bin.1.0.18.0\build\WixSharp.bin.targets')" />
  <UsingTask AssemblyFile="packages\WixSharp.bin.1.0.18.0\build\SetEnvVar.dll" TaskName="SetEnvVar" />
Coordinator
May 12, 2015 at 2:38 PM
You are absolutely correct. If you want to remove NuGet package without removing the package binaries the editing proj file manually is the way to go.