Issues with EPiServer.TinyMCESpellChecker / NHunspell - episerver

During a reinstallation of the EPiServer.TinyMCESpellChecker package, I was having problems with the NHunspell dependency. Trying out the SpellChecker would show a browser alert message with the HTML of an error page on it, with the message that it was unable to find NHunspellx86.DLL. I checked my bin/ folder, and indeed the DLL was missing. What was stranger was that it was present in the nuget packages/ folder for the NHunspell install.
Here is the error message that showed when I reinstalled NHunspell in particular:
PM> update-package -reinstall nhunspell
Attempting to gather dependency information for multiple packages with respect to project 'Guthrie.Web', targeting '.NETFramework,Version=v4.6.2'
Gathering dependency information took 7.41 sec
Attempting to resolve dependencies for multiple packages.
Resolving dependency information took 0 ms
Resolving actions install multiple packages
Retrieving package 'NHunspell 1.2.5554.16953' from 'nuget.org'.
Removed package 'NHunspell 1.2.5554.16953' from 'packages.config'
Successfully uninstalled 'NHunspell 1.2.5554.16953' from Guthrie.Web
Package 'NHunspell.1.2.5554.16953' already exists in folder 'C:\TFS2013\ClientGITCollection\Guthrie\GuthrieEpi\packages'
'Hunspellx86.dll' already exists. Skipping...
'Hunspellx64.dll' already exists. Skipping...
Added package 'NHunspell.1.2.5554.16953' to 'packages.config'
Executing script file 'C:\TFS2013\ClientGITCollection\Guthrie\GuthrieEpi\packages\NHunspell.1.2.5554.16953\tools\install.ps1'
Value does not fall within the expected range.
At C:\TFS2013\ClientGITCollection\Guthrie\GuthrieEpi\packages\NHunspell.1.2.5554.16953\tools\install.ps1:4 char:1
+ $hunspellx86Dll = $project.ProjectItems.Item("Hunspellx86.dll")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException
You cannot call a method on a null-valued expression.
At C:\TFS2013\ClientGITCollection\Guthrie\GuthrieEpi\packages\NHunspell.1.2.5554.16953\tools\install.ps1:5 char:1
+ $hunspellx86Dll.Properties.Item("BuildAction").Value = 0 # BuildActio ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At C:\TFS2013\ClientGITCollection\Guthrie\GuthrieEpi\packages\NHunspell.1.2.5554.16953\tools\install.ps1:6 char:1
+ $hunspellx86Dll.Properties.Item("CopyToOutputDirectory").Value = 2 # ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Value does not fall within the expected range.
At C:\TFS2013\ClientGITCollection\Guthrie\GuthrieEpi\packages\NHunspell.1.2.5554.16953\tools\install.ps1:10 char:1
+ $hunspellx64Dll = $project.ProjectItems.Item("Hunspellx64.dll")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException
You cannot call a method on a null-valued expression.
At C:\TFS2013\ClientGITCollection\Guthrie\GuthrieEpi\packages\NHunspell.1.2.5554.16953\tools\install.ps1:11 char:1
+ $hunspellx64Dll.Properties.Item("BuildAction").Value = 0 # BuildActio ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At C:\TFS2013\ClientGITCollection\Guthrie\GuthrieEpi\packages\NHunspell.1.2.5554.16953\tools\install.ps1:12 char:1
+ $hunspellx64Dll.Properties.Item("CopyToOutputDirectory").Value = 2 # ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Successfully installed 'NHunspell 1.2.5554.16953' to Guthrie.Web

As it turns out, the error message was appearing because the NHunspellx86 and NHunspellx64 DLLs are in the content folder of the nuget package. What this means is that if the file is present in your solution, it does not get overwritten. In order to resolve the error, I had to force uninstall NHunspell (force because I wanted nuget to ignore that the EPiServer spellchecker depended on it):
uninstall-package nhunspell -Force
and then delete the NHunspellx86 and NHunspellx64 DLL's in the root of my website project. Turns out, the original installation of EPiServer.TinyMCESpellChecker had put them there, and the fact that they existed was preventing nuget from reinstalling the package correctly by copying over the DLL's from the content tab. After you've deleted both DLL's, run the following:
install-package nhunspell
Now the console should show NHunspell installing without errors, and when your run EPiServer again, the TinyMCESpellchecker should work without errors!

Related

Issue to use SSH with VSCODE & windows server

I try to use the remote-ssh for windows on vscode but the installation on the server failed.
The server it's a windows server 2022
I spend time on internet to find a way but it's was a failure.
server.cmd' --start-server --host=127.0.0.1 --enable-remote-auto-shutdown --port=0 --connection-secret
[11:00:34.015] >
[11:00:38.215] > Server did not start successfully. Full server log at C:\Users\XXXX\.vscode-server\.97dec172d3256f8ca4bfb2143f3f76b503ca0534.log >>>
> C:\Users\XXXX\.vscode-server\bin\97dec172d3256f8ca4bfb2143f3f76b503ca0534\server.cmd :
> server.sh is being replaced by 'bin/code-server'. Please migrate to the new command and adopt the
> following new default behaviors:
> At line:1 char:1
> + C:\Users\XXXX\.vscode-server\bin\97dec172d3256f8ca4bfb2143f3f76b ...
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[11:00:38.222] >
> + CategoryInfo : NotSpecified: (server.sh is be...ault behaviors::String) [], RemoteE
> xception
> + FullyQualifiedErrorId : NativeCommandError
>
Anyone have a solution for that ?
Kr
Jerry
use vscode with ssh

Powershell Script to Edit IIS File Extensions

Curious if someone could point me in the direction to how I could automate IIS Request Filtering File Extensions? I have used the following per Microsoft manuals, but when the extension is already set to false I get an error. Even though the manual states that changing the value from false to true will enable. Am I missing something very simple?
https://learn.microsoft.com/en-us/iis/configuration/system.webserver/security/requestfiltering/fileextensions/
Start-IISCommitDelay
$fileExtensions = Get-IISConfigSection -CommitPath 'Default Web Site' -SectionPath 'system.webServer/security/requestFiltering' | Get-IISConfigCollection -CollectionName 'fileExtensions'
New-IISConfigCollectionElement -ConfigCollection $fileExtensions -ConfigAttribute #{ 'fileExtension' = '.asax'; 'allowed' = $true } -AddAt 0
Set-IISConfigAttributeValue -ConfigElement $fileExtensions -AttributeName 'applyToWebDAV' -AttributeValue $true
Stop-IISCommitDelay
New-IISConfigCollectionElement : Filename:
Error: Cannot add duplicate collection entry of type 'add' with unique key
attribute 'fileExtension' set to '.asax'
At line:5 char:1
+ New-IISConfigCollectionElement -ConfigCollection $fileExtensions -Con ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-IISConfigCollectionElemen
t], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Micr
osoft.IIS.Powershell.Commands.NewIISConfigCollectionElementCommand
Set-IISConfigAttributeValue : Object reference not set to an instance of an
object.
At line:7 char:1
+ Set-IISConfigAttributeValue -ConfigElement $fileExtensions -Attribute ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-IISConfigAttributeValue],
NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,Microsoft.IIS.Powe
rshell.Commands.SetIISConfigAttributeValueCommand
WARNING: No active transaction.
Never able to figure out why this process doesn't work as it should per the man docs from Microsoft, but found the configuration files for IIS and made an edited version and wrote a Powershell to move the original and place the edited version in the needed directories. Problem solved.

PowerShell & SQL Server : Attempt to retrieve data for object failed for ManagedComputer

I'm currently writing a script to install a new SQL Server instance with PowerShell.
In this script, after the instance has been created, I disable the dynamic port and give it a new fixed port.
Import-Module SqlPs
[...] # Install a new instance SQL Server
$wmi = (Get-Item "SQLServer:\SQL\$Env:ComputerName").ManagedComputer
$urn = "ManagedComputer[#Name='$Env:ComputerName']/ ServerInstance[#Name='$Instance']/ ServerProtocol[#Name='Tcp']"
$tcp = $wmi.GetSmoObject($urn)
$tcp.IPAddresses['IPAll'].IPAddressProperties['TcpPort'].Value = "$Port"
$tcp.IPAddresses['IPAll'].IPAddressProperties['TcpDynamicPorts'].Value = ""
$tcp.Alter()
This script works correctly but when I try to run it a second times on the same PowerShell window, it return the following error :
Exception calling "GetSmoObject" with "1" argument(s): "Attempt to retrieve data for object failed for ManagedComputer 'MYSERVER'."
At .\New-Instance.ps1:316 char:5
+ $tcp = $wmi.GetSmoObject($urn)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : FailedOperationException
$Error[0] | Format-List -Force
Exception : System.Management.Automation.MethodInvocationException: Exception calling "GetSmoObject" with "1" argument(s): "Attempt to retrieve data for object failed for ManagedComputer 'MYSERVER'." --->
Microsoft.SqlServer.Management.Smo.FailedOperationException: Attempt to retrieve data for object failed for ManagedComputer 'MYSERVER'. ---> Microsoft.SqlServer.Management.Smo.MissingObjectException: The
ServerInstance 'MYINSTANCE' does not exist on the server.
at Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer.GetSmoObjectRec(Urn urn)
at Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer.GetSmoObjectRec(Urn urn)
at Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer.GetSmoObject(Urn urn)
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer.GetSmoObject(Urn urn)
at CallSite.Target(Closure , CallSite , Object , Object )
--- End of inner exception stack trace ---
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
TargetObject :
CategoryInfo : NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId : FailedOperationException
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at <ScriptBlock>, D:\SqlServer\Scripts\New-Instance.ps1: line 316
at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
PSMessageDetails :
Yet, the instance 'MYINSTANCE' has been installed successfully. I think the recovered ManagedComputer hasn't been update and doesn't include the new instance 'MYINSTANCE'.
How can I force the refresh of the recovered ManagedComputer ?
My PowerShell Version :
$PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 1 14393 3471

Active Directory. The following exception occurred while retrieving member distinguishedName: An operations error occurred

I try to get information from AD using LDAP. Before, I mounted ntds.dit through DSAMAIN at localhost:5000.
PS C:\Users\Administrator> ([ADSI]"LDAP://localhost:5000/")
format-default : The following exception occurred while retrieving member "distinguishedName": "Unknown error
(0x80005000)"
+ CategoryInfo : NotSpecified: (:) [format-default], ExtendedTypeSystemException
+ FullyQualifiedErrorId : CatchFromBaseGetMember,Microsoft.PowerShell.Commands.FormatDefaultCommand
PS C:\Users\Administrator> ([ADSI]"LDAP://localhost:5000/DC=srv,DC=local")
format-default : The following exception occurred while retrieving member "distinguishedName": "An operations error
occurred.
"
+ CategoryInfo : NotSpecified: (:) [format-default], ExtendedTypeSystemException
+ FullyQualifiedErrorId : CatchFromBaseGetMember,Microsoft.PowerShell.Commands.FormatDefaultCommand
PS C:\Users\Administrator> [ADSI]::Exists("LDAP://localhost:5000/DC=srv,DC=local")
Exception calling "Exists" with "1" argument(s): "An operations error occurred.
"
At line:1 char:1
+ [ADSI]::Exists("LDAP://localhost:5000/DC=srv,DC=local")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DirectoryServicesCOMException
PS C:\Users\Administrator> [adsi]"LDAP://localhost:5000/RootDSE"
distinguishedName : {}
Path : LDAP://localhost:5000/RootDSE
What do I do wrong?

ServiceStack OrmLite Not Retrieving SqlGeography Fields

I've following the instructions here to use SqlGeography types with ServiceStack OrmLite v. 4.0.56:
https://github.com/ServiceStack/ServiceStack.OrmLite/wiki/SQL-Server-Types
SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);
SqlServerConverters.Configure(SqlServer2012Dialect.Provider);
(not a web application)
Here's my DataModel class:
[DataContract]
[Schema("dbo")]
public class BusinessEntity
{
[DataMember, PrimaryKey, AutoIncrement]
public Int16 BusinessEntityId { get; set; }
...
[DataMember]
public SqlGeography LatLong { get; set; }
}
When I retrieve these records using OrmLite, all of the LatLong are null, but there is data in the database:
My tests are simply retrieving all records:
return Db.Select<DataModel.dbo.BusinessEntity>();
It looks like there was an error when installing the nuget package, however, there are no runtime errors (I consistently get this error when installing the nuget package):
Attempting to gather dependency information for package
'ServiceStack.OrmLite.SqlServer.Converters.4.0.56' with respect to
project 'Services\Web\SO.Services.Data.Tests', targeting
'.NETFramework,Version=v4.6.1' Attempting to resolve dependencies for
package 'ServiceStack.OrmLite.SqlServer.Converters.4.0.56' with
DependencyBehavior 'Lowest' Resolving actions to install package
'ServiceStack.OrmLite.SqlServer.Converters.4.0.56' Resolved actions to
install package 'ServiceStack.OrmLite.SqlServer.Converters.4.0.56'
Package 'Microsoft.SqlServer.Types.11.0.2' already exists in folder
'C:\Users\cklepeis\documents\visual studio 2015\Projects\SO\packages'
Added package 'Microsoft.SqlServer.Types.11.0.2' to 'packages.config'
Executing script file 'C:\Users\cklepeis\documents\visual studio
2015\Projects\SO\packages\Microsoft.SqlServer.Types.11.0.2\tools\install.ps1'...
Where-Object : Cannot bind parameter 'FilterScript'. Cannot convert
the "Name" value of type "System.String" to type "S
ystem.Management.Automation.ScriptBlock". At
C:\Users\cklepeis\documents\visual studio
2015\Projects\SO\packages\Microsoft.SqlServer.Types.11.0.2\tools\install.p
s1:11 char:50
+ $folderx86 = $sqlServerTypes.ProjectItems | where <<<< Name -eq "x86"
+ CategoryInfo : InvalidArgument: (:) [Where-Object], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.WhereObjectCommand
Where-Object : Cannot bind parameter 'FilterScript'. Cannot convert
the "Name" value of type "System.String" to type "S
ystem.Management.Automation.ScriptBlock". At
C:\Users\cklepeis\documents\visual studio
2015\Projects\SO\packages\Microsoft.SqlServer.Types.11.0.2\tools\install.p
s1:17 char:50
+ $folderx64 = $sqlServerTypes.ProjectItems | where <<<< Name -eq "x64"
+ CategoryInfo : InvalidArgument: (:) [Where-Object], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.WhereObjectCommand
Where-Object : Cannot bind parameter 'FilterScript'. Cannot convert
the "Name" value of type "System.String" to type "S
ystem.Management.Automation.ScriptBlock". At
C:\Users\cklepeis\documents\visual studio
2015\Projects\SO\packages\Microsoft.SqlServer.Types.11.0.2\tools\install.p
s1:23 char:46
+ $cppLinkx86 = $folderx86.ProjectItems | where <<<< Name -eq "msvcr100.dll"
+ CategoryInfo : InvalidArgument: (:) [Where-Object], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.WhereObjectCommand
Where-Object : Cannot bind parameter 'FilterScript'. Cannot convert
the "Name" value of type "System.String" to type "S
ystem.Management.Automation.ScriptBlock". At
C:\Users\cklepeis\documents\visual studio
2015\Projects\SO\packages\Microsoft.SqlServer.Types.11.0.2\tools\install.p
s1:30 char:46
+ $sqlLinkx86 = $folderx86.ProjectItems | where <<<< Name -eq "SqlServerSpatial110.dll"
+ CategoryInfo : InvalidArgument: (:) [Where-Object], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.WhereObjectCommand
Where-Object : Cannot bind parameter 'FilterScript'. Cannot convert
the "Name" value of type "System.String" to type "S
ystem.Management.Automation.ScriptBlock". At
C:\Users\cklepeis\documents\visual studio
2015\Projects\SO\packages\Microsoft.SqlServer.Types.11.0.2\tools\install.p
s1:37 char:46
+ $cppLinkx64 = $folderx64.ProjectItems | where <<<< Name -eq "msvcr100.dll"
+ CategoryInfo : InvalidArgument: (:) [Where-Object], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.WhereObjectCommand
Where-Object : Cannot bind parameter 'FilterScript'. Cannot convert
the "Name" value of type "System.String" to type "S
ystem.Management.Automation.ScriptBlock". At
C:\Users\cklepeis\documents\visual studio
2015\Projects\SO\packages\Microsoft.SqlServer.Types.11.0.2\tools\install.p
s1:44 char:46
+ $sqlLinkx64 = $folderx64.ProjectItems | where <<<< Name -eq "SqlServerSpatial110.dll"
+ CategoryInfo : InvalidArgument: (:) [Where-Object], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.WhereObjectCommand
AutoHides : False Caption :
Microsoft.SqlServer.Types Collection :
{Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase,
Microsoft.VisualStudio.Platfo
rm.WindowManagement.DTE.WindowBase, Microsoft.VisualStudio.Platform.WindowManagement.DTE.Window
Base, Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase...}
CommandBars : {URL Toolbar, F1 Disambiguation Toolbar}
ContextAttributes : System.__ComObject DTE :
System.__ComObject Document : HWnd :
6425562 Height : 1671 IsFloating : False
Kind : Tool Left : 1674 Linkable
: False LinkedWindowFrame :
Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase
LinkedWindows : Object : System.__ComObject
ObjectKind : {E8B06F52-6D01-11D2-AA7D-00C04F990343} Project
: ProjectItem : Selection : Top
: 283 Type : vsWindowTypeToolWindow Visible
: True Width : 1785 WindowState :
vsWindowStateMaximize HasBeenDeleted : False Events
: Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowEvents
VisibilityEvents :
Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowVisibilityEvents
Rect : 1674.0625,283.020833333333,1785,1671
OutstandingEventCount : 0
Successfully installed 'Microsoft.SqlServer.Types 11.0.2' to
SO.Services.Data.Tests Package
'ServiceStack.OrmLite.SqlServer.Converters.4.0.56' already exists in
folder 'C:\Users\cklepeis\documents\visual studio
2015\Projects\SO\packages' Added package
'ServiceStack.OrmLite.SqlServer.Converters.4.0.56' to
'packages.config' Successfully installed
'ServiceStack.OrmLite.SqlServer.Converters 4.0.56' to
SO.Services.Data.Tests
========== Finished ==========
I'm not seeing any issues installing ServiceStack.OrmLite.SqlServer.Converters NuGet package:
Attempting to gather dependencies information for package 'ServiceStack.OrmLite.SqlServer.Converters.4.0.56' with respect to project 'ConsoleApplication4', targeting '.NETFramework,Version=v4.5'
Attempting to resolve dependencies for package 'ServiceStack.OrmLite.SqlServer.Converters.4.0.56' with DependencyBehavior 'Lowest'
Resolving actions to install package 'ServiceStack.OrmLite.SqlServer.Converters.4.0.56'
Resolved actions to install package 'ServiceStack.OrmLite.SqlServer.Converters.4.0.56'
Adding package 'Microsoft.SqlServer.Types.11.0.2' to folder 'C:\src\wip\ConsoleApplication4\packages'
Added package 'Microsoft.SqlServer.Types.11.0.2' to folder 'C:\src\wip\ConsoleApplication4\packages'
Added package 'Microsoft.SqlServer.Types.11.0.2' to 'packages.config'
Executing script file 'C:\src\wip\ConsoleApplication4\packages\Microsoft.SqlServer.Types.11.0.2\tools\install.ps1'...
AutoHides : False
Caption : Microsoft.SqlServer.Types
Collection : {Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase,
Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase,
Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase,
Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase...}
CommandBars : {URL Toolbar, F1 Disambiguation Toolbar}
ContextAttributes : System.__ComObject
DTE : System.__ComObject
Document :
HWnd : 32967448
Height : 1060
IsFloating : False
Kind : Tool
Left : 74
Linkable : False
LinkedWindowFrame : Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase
LinkedWindows :
Object : System.__ComObject
ObjectKind : {E8B06F52-6D01-11D2-AA7D-00C04F990343}
Project :
ProjectItem :
Selection :
Top : 254
Type : vsWindowTypeToolWindow
Visible : True
Width : 2357
WindowState : vsWindowStateMaximize
HasBeenDeleted : False
Events : Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowEvents
VisibilityEvents : Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowVisibilityEvents
Rect : 73.5,253.5,2357,1060
OutstandingEventCount : 0
Successfully installed 'Microsoft.SqlServer.Types 11.0.2' to ConsoleApplication4
Adding package 'ServiceStack.Interfaces.4.0.56' to folder 'C:\src\wip\ConsoleApplication4\packages'
Added package 'ServiceStack.Interfaces.4.0.56' to folder 'C:\src\wip\ConsoleApplication4\packages'
Added package 'ServiceStack.Interfaces.4.0.56' to 'packages.config'
Successfully installed 'ServiceStack.Interfaces 4.0.56' to ConsoleApplication4
Adding package 'ServiceStack.Text.4.0.56' to folder 'C:\src\wip\ConsoleApplication4\packages'
Added package 'ServiceStack.Text.4.0.56' to folder 'C:\src\wip\ConsoleApplication4\packages'
Added package 'ServiceStack.Text.4.0.56' to 'packages.config'
Successfully installed 'ServiceStack.Text 4.0.56' to ConsoleApplication4
Adding package 'ServiceStack.Common.4.0.56' to folder 'C:\src\wip\ConsoleApplication4\packages'
Added package 'ServiceStack.Common.4.0.56' to folder 'C:\src\wip\ConsoleApplication4\packages'
Added package 'ServiceStack.Common.4.0.56' to 'packages.config'
Successfully installed 'ServiceStack.Common 4.0.56' to ConsoleApplication4
Adding package 'ServiceStack.OrmLite.4.0.56' to folder 'C:\src\wip\ConsoleApplication4\packages'
Added package 'ServiceStack.OrmLite.4.0.56' to folder 'C:\src\wip\ConsoleApplication4\packages'
Added package 'ServiceStack.OrmLite.4.0.56' to 'packages.config'
Successfully installed 'ServiceStack.OrmLite 4.0.56' to ConsoleApplication4
Adding package 'ServiceStack.OrmLite.SqlServer.4.0.56' to folder 'C:\src\wip\ConsoleApplication4\packages'
Added package 'ServiceStack.OrmLite.SqlServer.4.0.56' to folder 'C:\src\wip\ConsoleApplication4\packages'
Added package 'ServiceStack.OrmLite.SqlServer.4.0.56' to 'packages.config'
Successfully installed 'ServiceStack.OrmLite.SqlServer 4.0.56' to ConsoleApplication4
Adding package 'ServiceStack.OrmLite.SqlServer.Converters.4.0.56' to folder 'C:\src\wip\ConsoleApplication4\packages'
Added package 'ServiceStack.OrmLite.SqlServer.Converters.4.0.56' to folder 'C:\src\wip\ConsoleApplication4\packages'
Added package 'ServiceStack.OrmLite.SqlServer.Converters.4.0.56' to 'packages.config'
Successfully installed 'ServiceStack.OrmLite.SqlServer.Converters 4.0.56' to ConsoleApplication4
========== Finished ==========
If these installation issues persist you can try deleting your NuGet /packages folder and clearing your NuGet cache so the next time you install ServiceStack.OrmLite.SqlServer.Converters it will redownload all packages from NuGet again.
To use SQL Server specific types you'll need to use the SqlServer2012Dialect.Provider and also specify you're using SQL Server 2012 on the connection string, e.g:
SqlServerConverters.Configure(SqlServer2012Dialect.Provider);
var dbFactory = new OrmLiteConnectionFactory(
"Server=localhost;Database=test;User Id=test;Password=test;Type System Version=SQL Server 2012",
SqlServer2012Dialect.Provider);
You'll then be able to use the SQL Server specific types as normal, e.g. this example:
db.DropAndCreateTable<BusinessEntity>();
db.Insert(new BusinessEntity
{
BusinessEntityId = 1,
LatLong = SqlGeography.Point(40.6898329, -74.0452177, 4326)
});
db.Select<BusinessEntity>().PrintDump();
Prints out the populated SqlGeography record:
[
{
BusinessEntityId: 1,
LatLong:
{
IsNull: False,
STSrid: 4326,
Lat: 40.6898329,
Long: -74.0452177,
Z: Null,
M: Null,
HasZ: False,
HasM: False
}
}
]

Resources