Taritsyn / JavaScriptEngineSwitcher

JavaScript Engine Switcher determines unified interface for access to the basic features of popular JavaScript engines. This library allows you to quickly and easily switch to using of another JavaScript engine.
Apache License 2.0
440 stars 49 forks source link

Removing package JavaScriptEngineSwitcher.ChakraCore.Native.win-x64 v2.4.6 doesn't remove Error task in csproj file for checking existence of package props #46

Closed bbsdddougla closed 6 years ago

bbsdddougla commented 6 years ago

After removing the previous package, installing the new one, and building, I get the following error in projects where the package was removed:

C:\path\to\project\project.csproj(2001,5): error : 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 ..\packages\JavaScriptEngineSwitcher.ChakraCore.Native.win-x64.2.4.6\build\JavaScriptEngineSwitcher.ChakraCore.Native.win-x64.props.

Removing the following task from the .csproj fixed the problem:

<Error Condition="!Exists('..\packages\JavaScriptEngineSwitcher.ChakraCore.Native.win-x64.2.4.6\build\JavaScriptEngineSwitcher.ChakraCore.Native.win-x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\JavaScriptEngineSwitcher.ChakraCore.Native.win-x64.2.4.6\build\JavaScriptEngineSwitcher.ChakraCore.Native.win-x64.props'))" />
Taritsyn commented 6 years ago

Hello!

Before publishing of NuGet packages, I always test them on different types of .NET and ASP.NET applications. When testing, I did not find any problems.

This problem can have two causes:

  1. After updating of package, you have overwritten the .csproj file by earlier version.
  2. During updating of package a failure occurred, that caused by locking the ChakraCore.dll assemby by the IIS Worker Process (w3wp.exe) . Since a days of Classic ASP there is a simple rule: “Do not update the native assemblies, when web application is running.”.

If you don't believe me, then you can check on another project.

bbsdddougla commented 6 years ago

Ok, I'll close this.