This project is read-only.
1
Vote

Cannot install in Windows 10

description

My mistake putting an issue in Discussions. Someone with higher powers might move the discussion to Issue. Please see [discussion:652598]

Bruce.

comments

BruceAxtens wrote Mar 17, 2016 at 9:54 AM

Fusion Log says
System.IO.FileNotFoundException: Could not load file or assembly 'CSScriptLibrary, Version=3.10.0.0, Culture=neutral, PublicKeyToken=70fcc3d18c749033' or one of its dependencies. The system cannot find the file specified.

File name: 'CSScriptLibrary, Version=3.10.0.0, Culture=neutral, PublicKeyToken=70fcc3d18c749033'

   at Config.CSScriptInstaller..ctor(Boolean quiet, Boolean update)

   at Config.ConfigForm..ctor(Boolean quiet, Boolean update)

   at Config.ConfigForm.main(String[] args)



=== Pre-bind state information ===

LOG: DisplayName = CSScriptLibrary, Version=3.10.0.0, Culture=neutral, PublicKeyToken=70fcc3d18c749033
 (Fully-specified)

LOG: Appbase = file:///C:/Users/Bruce/Research/cs-script/cs-script/

LOG: Initial PrivatePath = NULL

Calling assembly : ConfigConsole, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.

===

LOG: This bind starts in LoadFrom load context.

WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().

LOG: No application configuration file found.

LOG: Using host configuration file: 

LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.

LOG: Post-policy reference: CSScriptLibrary, Version=3.10.0.0, Culture=neutral, PublicKeyToken=70fcc3d18c749033

LOG: Attempting download of new URL file:///C:/Users/Bruce/Research/cs-script/cs-script/CSScriptLibrary.DLL.

LOG: Attempting download of new URL file:///C:/Users/Bruce/Research/cs-script/cs-script/CSScriptLibrary/CSScriptLibrary.DLL.

LOG: Attempting download of new URL file:///C:/Users/Bruce/Research/cs-script/cs-script/CSScriptLibrary.EXE.

LOG: Attempting download of new URL file:///C:/Users/Bruce/Research/cs-script/cs-script/CSScriptLibrary/CSScriptLibrary.EXE.

LOG: Attempting download of new URL file:///C:/Users/Bruce/Research/cs-script/cs-script/lib/ConfigConsole/CSScriptLibrary.DLL.

LOG: Attempting download of new URL file:///C:/Users/Bruce/Research/cs-script/cs-script/lib/ConfigConsole/CSScriptLibrary/CSScriptLibrary.DLL.

LOG: Attempting download of new URL file:///C:/Users/Bruce/Research/cs-script/cs-script/lib/ConfigConsole/CSScriptLibrary.EXE.

LOG: Attempting download of new URL file:///C:/Users/Bruce/Research/cs-script/cs-script/lib/ConfigConsole/CSScriptLibrary/CSScriptLibrary.EXE.

BruceAxtens wrote Mar 17, 2016 at 9:58 AM

That was after reinstalling and stripping streams.

Sorry for duplicating someone else's post about the same thing.

oleg_s wrote Mar 17, 2016 at 12:19 PM

Hi Bruce,

I just tested the downloadable (7z from the Release page) on virgin Win10x64 and it seems to work. So I am not sure what is happening there.

Anyway, what version are you trying to install? If it is the latest v3.11.0 then the distro has a problem as Fusion log indicated that the runtime it trying to probe for v3.10.0.

> I have used the SysInternalsSuite Streams tool...
The locking is quite nasty and even non MS archivers (e.g. WinRar) now playing this dirty game.

There are other (non manual) ways to avoid OS locking. Using Chocolatey is one of them. But I really want to rule out any more serious deployment problems first.

Can you please verify that CSScriptLibrary can in fact be loaded in your environment. Can you please do one of these tests:
  • If your OS has VS2015 can you please test that if you can add CS-Script NuGet package in your project and see if you can compile it.
  • If you have Notepad++ can you please see that you can enable "CS-Script (C# Intellisense)" and you can run C# scripts with Notepad++.
Thank you fro your feedback.

BruceAxtens wrote Mar 18, 2016 at 3:47 AM

G'day Oleg

I installed 7zip and unpacked the latest .7z file. I got a completely different experience this time, though it still errored, as below:
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\ProgramData\CS-Script\ShellExtension\3.9.15.0\CS-Script'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.Directory.GetDirectories(String path)
   at CSSScript.ShellExForm.ReadShellExtensions(String path)
   at CSSScript.ShellExForm.RefreshTreeView()
   at CSSScript.ShellExForm.Form1_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
   at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
   at Config.ConfigForm.ConfigForm_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at Config.ConfigForm.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1073.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
css_config
    Assembly Version: 3.11.0.0
    Win32 Version: 3.11.0.0
    CodeBase: file:///C:/Users/Bruce/Downloads/cs-script/css_config.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1038.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1038.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1068.2 built by: NETFXREL3STAGE
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
csws
    Assembly Version: 3.11.0.0
    Win32 Version: 3.11.0.0
    CodeBase: file:///C:/Users/Bruce/Downloads/cs-script/csws.EXE
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1064.2 built by: NETFXREL3STAGE
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1038.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
config.cs
    Assembly Version: 0.0.0.0
    Win32 Version: 0.0.0.0
    CodeBase: file:///C:/Users/Bruce/AppData/Local/Temp/CSSCRIPT/Cache/827945700/config.cs.compiled
----------------------------------------
ConfigConsole
    Assembly Version: 0.0.0.0
    Win32 Version: 0.0.0.0
    CodeBase: file:///C:/Users/Bruce/Downloads/cs-script/lib/ConfigConsole/ConfigConsole.exe
----------------------------------------
CSScriptLibrary
    Assembly Version: 3.11.0.0
    Win32 Version: 3.11.0.0
    CodeBase: file:///C:/Users/Bruce/Downloads/cs-script/Lib/CSScriptLibrary.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1038.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
d6325d4f-c486-4ae5-a5d4-22cf147ed84e.tmp
    Assembly Version: 0.0.0.0
    Win32 Version: 0.0.0.0
    CodeBase: file:///C:/Users/Bruce/AppData/Local/Temp/CSSCRIPT/Cache/1406538736/d6325d4f-c486-4ae5-a5d4-22cf147ed84e.tmp.compiled
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

BruceAxtens wrote Mar 18, 2016 at 4:47 AM

I should add that I am now looking at the CS-Script Configuration 3.11.0.0 window

BruceAxtens wrote Mar 18, 2016 at 4:51 AM

So moved the cs-script folder to Program Files x86, ran the installer again (having closed it without installing in the previous post. Now I get
---------------------------
CS-Script Configuration
---------------------------
System.IO.FileNotFoundException: Could not load file or assembly 'CSScriptLibrary, Version=3.10.0.0, Culture=neutral, PublicKeyToken=70fcc3d18c749033' or one of its dependencies. The system cannot find the file specified.

File name: 'CSScriptLibrary, Version=3.10.0.0, Culture=neutral, PublicKeyToken=70fcc3d18c749033'

   at Config.CSScriptInstaller..ctor(Boolean quiet, Boolean update)

   at Config.ConfigForm..ctor(Boolean quiet, Boolean update)

   at Config.ConfigForm.main(String[] args)



=== Pre-bind state information ===

LOG: DisplayName = CSScriptLibrary, Version=3.10.0.0, Culture=neutral, PublicKeyToken=70fcc3d18c749033
 (Fully-specified)

LOG: Appbase = file:///C:/Program Files (x86)/cs-script/

LOG: Initial PrivatePath = NULL

Calling assembly : ConfigConsole, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.

===

LOG: This bind starts in LoadFrom load context.

WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().

LOG: No application configuration file found.

LOG: Using host configuration file: 

LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.

LOG: Post-policy reference: CSScriptLibrary, Version=3.10.0.0, Culture=neutral, PublicKeyToken=70fcc3d18c749033

LOG: Attempting download of new URL file:///C:/Program Files (x86)/cs-script/CSScriptLibrary.DLL.

LOG: Attempting download of new URL file:///C:/Program Files (x86)/cs-script/CSScriptLibrary/CSScriptLibrary.DLL.

LOG: Attempting download of new URL file:///C:/Program Files (x86)/cs-script/CSScriptLibrary.EXE.

LOG: Attempting download of new URL file:///C:/Program Files (x86)/cs-script/CSScriptLibrary/CSScriptLibrary.EXE.

LOG: Attempting download of new URL file:///C:/Program Files (x86)/cs-script/lib/ConfigConsole/CSScriptLibrary.DLL.

LOG: Attempting download of new URL file:///C:/Program Files (x86)/cs-script/lib/ConfigConsole/CSScriptLibrary/CSScriptLibrary.DLL.

LOG: Attempting download of new URL file:///C:/Program Files (x86)/cs-script/lib/ConfigConsole/CSScriptLibrary.EXE.

LOG: Attempting download of new URL file:///C:/Program Files (x86)/cs-script/lib/ConfigConsole/CSScriptLibrary/CSScriptLibrary.EXE.


---------------------------
OK   
---------------------------

BruceAxtens wrote Mar 18, 2016 at 5:11 AM

I will get to these
If your OS has VS2015 can you please test that if you can add CS-Script NuGet package in your project and see if you can compile it.
If you have Notepad++ can you please see that you can enable "CS-Script (C# Intellisense)" and you can run C# scripts with Notepad++.
As soon as I can

oleg_s wrote Mar 18, 2016 at 5:24 AM

Hi Bruce,

> I am now looking at the CS-Script Configuration 3.11.0.0 window...
> LOG: DisplayName = CSScriptLibrary, Version=3.10.0.0, Culture=neutral, PublicKeyToken=70fcc3d1
This means that the package contains binaries with the dependency on the older assemblies.

Can you please stop the experiments for now and let me sort it out.
As for using CS-Script until it's all solved you can enable the CS-Script plugin in Notepad++ and it will bring you practically the same functionality.

I will let you know when the stand alone distro is verified/fixed.

Thank you.

BruceAxtens wrote Mar 18, 2016 at 5:41 AM

I can run C# scripts with Notepad++

oleg_s wrote Mar 18, 2016 at 6:10 AM

Great. It means that there is no any incompatibility. But something goes wrong when we try to install the product.

BTW the installation as such doesn't do much at all. It only sets a couple environment vars, creates css_config.xml and configures shell extensions for .cs files.

Cleaning
Now, because if the multiple attempts it's hard to say what has been done to the system so please remove the following envvars:
CSSCRIPT_DIR
CSSCRIPT_INC
CSSCRIPT_SHELLEX_DIR

You will also need to restart the explorer.exe process.

Installing
I noticed that you tried to install manually into ProgramFiles and it is't really a good place for any script engine. Why don't you use Chocolatey, which will do the install for you into a predefined location (ProgramData).

Chocolatey is the repository for the Windows software packages. Chocolatey NuGet is a Machine Package Manager, somewhat like apt-get, but built with Windows in mind. It is also the source repository of the OneGet package manager of Windows 10.

CS-Script can be installed with the following command:
C:\> choco install cs-script

Read more on Chocolatey and how to enable it on your version of windows here: https://chocolatey.org/

BruceAxtens wrote Mar 20, 2016 at 11:22 AM

I'm quite impressed with choco as a delivery method. Unfortunately, while I've been able to get it to install okay, I haven't been able to get it to install cs-script, as below
PS C:\> choco install cs-script
Installing the following packages:
cs-script
By installing you accept licenses for the packages.
cs-script not installed. The package was not found with the source(s) listed.
 If you specified a particular version and are receiving this message, it is possible that the package name exists but the version does not.
 Version: ""
 Source(s): "https://chocolatey.org/api/v2/"

Chocolatey installed 0/1 package(s). 1 package(s) failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures:
 - cs-script
More anomalies. Sighhh.

BruceAxtens wrote Mar 20, 2016 at 2:06 PM

My bad. "Windows 10 Firewall Control" had choco disabled. I've enabled it now.

oleg_s wrote Mar 21, 2016 at 1:53 AM

It seems like over restricted nature of your settings is really affecting the deployment in your case. I do as well admire Chocolatey. In fact I consider both Choco and Notepad++ as two primary delivery channels for CS-Script. The reason is simple. They allow avoid manual downloading which can lead to silent sneaky disabling of the downloaded content by OS. Though I just learn from you that it can cripple Choco as well. :(

Well, this is just a reminder for everyone who has problems of this sort. If you tired of fighting with your OS then you can do the install manually. It is not truly "install". CS-Script only needs a few environment variables to be set and a config file created. Even if this is not done it will not prevent you from using CS-Script. The absence of the config file will trigger the use of the defaults and not having envars may not necessarily affect your experience. The following are the steps for manual install:
  1. Extract CS-Script. Preferably into the directory, which doesn't require elevation.
  2. Add <cs-script> directory (folder with cscs.exe) into your system PATH
  3. Add CSSCRIPT_DIR envvar with value "<cs-script>"
If you still want to use config file then you can create it (<cs-script>\css_config..xml) and use the default content from here: https://github.com/oleg-shilo/cs-script/blob/master/Source/css_config.default.xml