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.\build\WixSharp.targets" Condition="Exists('..\..\packages\WixSharp.bin.\build\WixSharp.targets')" />
  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see The missing file is {0}.</ErrorText>
    <Error Condition="!Exists('..\..\packages\WixSharp.bin.\build\WixSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixSharp.bin.\build\WixSharp.targets'))" />
    <Error Condition="!Exists('..\..\packages\WixSharp.bin.\build\WixSharp.bin.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixSharp.bin.\build\WixSharp.bin.targets'))" />
Only what WixSharp.Bin added is left :
  <Import Project="..\..\packages\WixSharp.bin.\build\WixSharp.bin.targets" Condition="Exists('..\..\packages\WixSharp.bin.\build\WixSharp.bin.targets')" />
  <UsingTask AssemblyFile="packages\WixSharp.bin.\build\SetEnvVar.dll" TaskName="SetEnvVar" />
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.