Closed alanhamlett closed 10 months ago
Any updates on fixing this? The extension fails to load every time I start SSMS
Having same issue. which .net framework is need to run this extension?
Was running into the same issue; error directed to https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/ee890038(v=vs.100)?redirectedfrom=MSDN
If you run into this problem, you need open the WakaTime.v18 directory within SMSS Extensions and make sure all files have been unblocked (right click -> properties). Then start SMSS as Admin, you can enter the API key from Tools -> WakaTime -> Settings but should be set if already using VS.
Was running into the same issue; error directed to https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/ee890038(v=vs.100)?redirectedfrom=MSDN
If you run into this problem, you need open the WakaTime.v18 directory within SMSS Extensions and make sure all files have been unblocked (right click -> properties). Then start SMSS as Admin, you can enter the API key from Tools -> WakaTime -> Settings but should be set if already using VS.
This solution works for me! :-)
Was running into the same issue; error directed to https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/ee890038(v=vs.100)?redirectedfrom=MSDN
If you run into this problem, you need open the WakaTime.v18 directory within SMSS Extensions and make sure all files have been unblocked (right click -> properties). Then start SMSS as Admin, you can enter the API key from Tools -> WakaTime -> Settings but should be set if already using VS.
That works for me too
@odskee what do you mean by properties -> unblock
?
@michasacuer In Windows File Explorer, you navigate to the actual WakaTime directory - select one or more, right click and properties and you'll likely see an option at the bottom to unblock (it's a tick box). You'll often have this with downloaded files, just something to be aware of.
Despite the error I launched a new version today please check it out https://github.com/gandarez/ssms-wakatime/releases/tag/v4.0.0
Closing for now. Let us know if this is still not working and we can help debug it.
CreateInstance failed for package [WakaTimePackage]Source: 'mscorlib' Description: Could not load file or assembly 'file:///c:\program files (x86)\microsoft sql server management studio 18\common7\ide\extensions\wakatime.v18\WakaTime.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
System.IO.FileLoadException: Could not load file or assembly 'file:///c:\program files (x86)\microsoft sql server management studio 18\common7\ide\extensions\wakatime.v18\WakaTime.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///c:\program files (x86)\microsoft sql server management studio 18\common7\ide\extensions\wakatime.v18\WakaTime.dll' ---> 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.
 at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
 at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence)
 at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)
 at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)

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.