Comments (10)
I believe this is just a known limitation of using custom CLR types that are essentially different from the ones SqlServer uses (while they are the same in functionality and namespace, they are different because the assemblies each of them are defined in aren't signed with the same key, and there's not really any way I can "fake" that).
from microsoft.sqlserver.types.
Actually try adding this to your application startup:
from microsoft.sqlserver.types.
Unfortunately that didn't work for me, i even tried SqlGeometry (since that is what i'm generally using) and still no good.
Does it matter where in startup.cs it's run? I had it running in Configure near the beginning, but not sure if other options were better.
Thanks!
from microsoft.sqlserver.types.
I’ve actually been unable to reproduce this. Even the unit tests “just works” with that API call.
Any chance you could share a self-contained application that reproduces this?
from microsoft.sqlserver.types.
Another thing you could try that might just do the trick is to explicitly load the assembly up-front before querying anything.
from microsoft.sqlserver.types.
I am having the same issue. Tried adding assembly resolve to app.config, also tried with AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; and still I get that error.
I am running net472 console app which references .netstandard2.0 project which contains the code for querying data.
from microsoft.sqlserver.types.
I am running net472 console app
Do not use this library if you use .NET Framework, but instead use the official Microsoft SDK. This library here is to fill the gap for .NET Core and Xamarin developers.
from microsoft.sqlserver.types.
I am having an issue where I have a lot of apps (WebApps, Console, Azure Cloud Services, Azure Functions) which needed to be converted to .NET 6.
Now, all of them reference my DB class library, and I wanted to migrate to .NET 6 in small steps, one app at a time, where my DB class library and all other class libraries would target .netstandard2.0 except those main apps (web, console etc.).
How can I migrate in steps while using the official Microsoft SDK and targeting .netstandard2.0?
from microsoft.sqlserver.types.
I’d recommend multi targeting your class library instead
from microsoft.sqlserver.types.
Thanks, it works when I multitargeted to net472 and net6.0.
from microsoft.sqlserver.types.
Related Issues (20)
- ToString() of SqlHierarchyId does not return "NULL" when IsNull == true HOT 1
- GetDescendant for a simple range fails with a HierarchyIdException HOT 2
- Throw HierarchyIdException instead of ArgumentException in GetDescendant method
- HierarchyId serialized in an invalid format which can't be deserialized HOT 11
- Some Geography cannot be deserialized. HOT 4
- When using Microsoft.Data.SqlClient an InvalidCastException will be thrown HOT 3
- Could not load file or assembly Microsoft.SqlServer.Types HOT 13
- SqlHierarchyId Write/Read roundtrip causes data corruption HOT 9
- System.Data.SqlClient needs a version bumb from 4.5.1 to 4.8.3 HOT 4
- assembly load error HOT 4
- MultiPoint issue? HOT 2
- Specified type is not registered on the target. HOT 1
- Referenced assembly 'Microsoft.SqlServer.Types, Version=2.5.0.0, Culture=neutral, PublicKeyToken=null' does not have a strong name
- Fill DataTable throws DataReader.GetFieldType null
- Insert to SQL Server throws exception - `Specified type is not registered on the target server`. HOT 1
- Using Microsoft.Data.SqlClient 5.0.1 causes System.TypeLoadException: Could not load type 'Microsoft.Data.SqlClient.Server.IBinarySerialize' HOT 10
- Security Vulnerability: https://github.com/advisories/GHSA-8g2p-5pqh-5jmc HOT 7
- Upgrade from Framework to Standard HOT 2
- STIsValid returning incorrect result for parameterized query HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microsoft.sqlserver.types.