Giter Site home page Giter Site logo

Comments (2)

wavecentral avatar wavecentral commented on June 17, 2024 1

When you downloaded the zip, windows designates the extracted files as having been downloaded from the internet and in .NET 4 framework, it causes these to not be loaded.

You can work around the issue by changing the file properties:

  • Open file explorer and navigate to where you have the dll
  • Right-click on dll and select properties
  • Under "General" you will only see a "Security: This file came from another computer..." with a unselected check box named "Unblock". Check the box and click apply, then ok.
  • Restart SSMS and all should be good. No config file changes needed.

from ssms-executor.

shaunek avatar shaunek commented on June 17, 2024

I have SSMS v18.5 and I have also attempted to install "SSMS Executor v2.0.3-alpha" by zip file and exe without success.

Zip file issue
I get the "The 'ExecutorPackage' package did not load correctly" error as described on the Known Issues page. If I click No and restart it doesn't work still (I don't see Execute Statement, etc in the Tools menu).

SQL Server Management Studio 15.0.18330.0
SQL Server Management Objects (SMO) 16.100.37971.0
Microsoft Analysis Services Client Tools 15.0.19040.0
Microsoft Data Access Components (MDAC) 10.0.17763.1
Microsoft MSXML 3.0 6.0
Microsoft .NET Framework 4.0.30319.42000
Operating System 10.0.17763

Here is the last content from C:\Users\me\AppData\Roaming\Microsoft\AppEnv\15.0\ActivityLog.xml:

  <entry>
    <record>277</record>
    <time>2020/06/20 11:24:32.277</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [ExecutorPackage]</description>
    <guid>{A64D9865-B938-4543-BF8F-A553CC4F67F3}</guid>
  </entry>
  <entry>
    <record>278</record>
    <time>2020/06/20 11:24:32.282</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>CreateInstance failed for package [ExecutorPackage]Source: &apos;mscorlib&apos; Description: Could not load file or assembly &apos;file:///c:\program files (x86)\microsoft sql server management studio 18\extensions\ssmsexecutor\SSMSExecutor.dll&apos; or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)&#x000D;&#x000A;System.IO.FileLoadException: Could not load file or assembly &apos;file:///c:\program files (x86)\microsoft sql server management studio 18\extensions\ssmsexecutor\SSMSExecutor.dll&apos; or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)&#x000D;&#x000A;File name: &apos;file:///c:\program files (x86)\microsoft sql server management studio 18\extensions\ssmsexecutor\SSMSExecutor.dll&apos; ---&gt; System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark&amp; stackMark)&#x000D;&#x000A;   at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence)&#x000D;&#x000A;   at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)&#x000D;&#x000A;   at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)&#x000D;&#x000A;&#x000D;&#x000A;System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.</description>
    <guid>{A64D9865-B938-4543-BF8F-A553CC4F67F3}</guid>
    <hr>80004005 - E_FAIL</hr>
    <errorinfo></errorinfo>
  </entry>

I read this error message and decided to try editing SSMExecutor.dll.config file to see if that would make a difference (per Microsoft article), but it didn't change anything. Here is what I added to the config file:

  <runtime>
      <loadFromRemoteSources enabled="true"/>
   </runtime>

I am on a corporate PC with some restrictions, and although most of the time I am able to install software as administrator, could have something to do with my problem. The thing is that I have the extension working beautifully in SSMS 2016. Here is my SSMS 2016 info:

Microsoft SQL Server Management Studio 13.0.16106.4
Microsoft Analysis Services Client Tools 13.0.1700.441
Microsoft Data Access Components (MDAC) 10.0.17763.1
Microsoft MSXML 3.0 6.0
Microsoft Internet Explorer 9.11.17763.0
Microsoft .NET Framework 4.0.30319.42000
Operating System 6.3.17763

Exe issue
Slightly different from jaka891 I was unable to even execute installer version. When I try to run the .exe I get an error "Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item." I did check some basic permissions things such as making sure it is unblocked and my user has full control of the exe, but I'm not sure what else do do. I'm not too concerned about this as I think it is likely that something with the corporate restrictions is funky here. Mainly wishing the zip file method worked!

from ssms-executor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.