ServiceStack OrmLite Text blobbed value is retrieved as nullservicestack ormlite partial updateServiceStack ORMLiteHow to retrieve auto-incremented Id in ServiceStack OrmLite?ServiceStack Ormlite SqlExpressionVisitor null check in Where extensionServicestack ORMLite Query MultipleServiceStack ORMLite blobbed columns in MySQLServiceStack OrmLite Not Retrieving SqlGeography FieldsORMLite / ServiceStack soft deletesServicestack - OrmLite not part of the ServiceStack namespaceEnum value in tuple using ServiceStack Ormlite throws null reference exception

Make Gimbap cutter

Content Editor Web Part - SharePoint Online?

What publication claimed that Michael Jackson died in a nuclear holocaust?

In American Politics, why is the Justice Department under the President?

Placement of positioning lights on A320 winglets

What do you call the action of "describing events as they happen" like sports anchors do?

Why did Robert pick unworthy men for the White Cloaks?

Savage Road Signs

How can I find out about the game world without meta-influencing it?

Why do (or did, until very recently) aircraft transponders wait to be interrogated before broadcasting beacon signals?

Is tuition reimbursement a good idea if you have to stay with the job

Can you open the door or die? v2

Oxford comma with nonessential phrases

Print "N NE E SE S SW W NW"

Realistic, logical way for men with medieval-era weaponry to compete with much larger and physically stronger foes

What do I need to do, tax-wise, for a sudden windfall?

Can I attach a DC blower to intake manifold of my 150CC Yamaha FZS FI engine?

Why is my Taiyaki (Cake that looks like a fish) too hard and dry?

Am I allowed to determine tenets of my contract as a warlock?

Are the guests in Westworld forbidden to tell the hosts that they are robots?

What is the theme of analysis?

How can you estimate a spike story?

Was the Lonely Mountain, where Smaug lived, a volcano?

What's the difference between DHCP and NAT? Are they mutually exclusive?



ServiceStack OrmLite Text blobbed value is retrieved as null


servicestack ormlite partial updateServiceStack ORMLiteHow to retrieve auto-incremented Id in ServiceStack OrmLite?ServiceStack Ormlite SqlExpressionVisitor null check in Where extensionServicestack ORMLite Query MultipleServiceStack ORMLite blobbed columns in MySQLServiceStack OrmLite Not Retrieving SqlGeography FieldsORMLite / ServiceStack soft deletesServicestack - OrmLite not part of the ServiceStack namespaceEnum value in tuple using ServiceStack Ormlite throws null reference exception






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








2















We have a small application that uses ServiceStack OrmLite for database access. I am currently investigating a broken feature that worked previously.



There are two relevant entities:



[Alias("MyOrder")]
public class OrderEntity

[AutoIncrement]
public int Id get; set;
...

// Saved as JSV blob in the table
public AppEntity Processor get; set;


[Alias("MyApp")]
public class AppEntity

[AutoIncrement]
public int Id get; set;

...

[StringLength(64)]
public string UserName get; set;

public Guid? InternalUserId get; set;



Not sure if that matters but AppEntity is located in another DLL/assembly.



Now there is a strange behavior. Processors are correctly saved in the table. I can also retrieve them in integration tests. However, in production code, when a list of OrderEntity objects is fetched, Processor property is null in every instance.



I digged a little bit into ServiceStack code in the debugger and saw that the JSV string is fetched correctly in the first place but it seems to get lost on the way.



This is the unit test that works:



var connectionString = @"Server=...";
var connectionFactory = new OrmLiteConnectionFactory(connectionString, new SqlServerOrmLiteDialectProvider());
var orderRepository = new OrderRepository(connectionFactory);
var orders = orderRepository.FindBySomeFilter();

// entries have not-null .Processor property


This is a small application that doesn't work:



var connectionString = @"Server=...";
var connectionFactory = new OrmLiteConnectionFactory(connectionString, new SqlServerOrmLiteDialectProvider());
var orderRepository = new OrderRepository(connectionFactory);
var orders = orderRepository.FindBySomeFilter();

// .Processor is not retrieved / null for all entries


Versions:



  • .NET 4.5.2

  • ServiceStack 5.4.0









share|improve this question






















  • Both code examples look exactly the same? Note: Incomplete code that can't be run locally to repro the issue isn't going to be useful to others. I'd recommend trying to put together a MCVE that others can run to repro the issue. If you're saying it used to work, I'd be looking into when it used to work and what changed to break it. Also if you use latest v5.4.1 on MyGet it has source link enabled so you can debug into fx code.

    – mythz
    Mar 24 at 23:43











  • Thanks, I was actually hoping that you would take a look and might think of a direction where to look at, such as missing references. The code indeed looks the same - this is why I don't understand the difference. I will try it with 5.4.1 now and get back.

    – Tarnschaf
    Mar 24 at 23:49











  • If it's the same then it suggests it may be due to environment differences, e.g. are they running the same version and did you add any new global JsConfig changes? Or maybe an Exception is being swallowed, can try JsConfig.ThrowOnError=true to throw on error.

    – mythz
    Mar 24 at 23:53











  • Same versions, however different referenced assemblies (such as XUnit in the integration test project). Projects are in the same VS solution. Failing projects are executable, working are test projects / libraries. No custom JsConfig, JsConfig.ThrowOnError=true does not throw, still Processor are null.

    – Tarnschaf
    Mar 25 at 0:06






  • 1





    Ok! I have just found that there is a swallowed exception in OrmLite. Shows a problem with manifest/assembly reference to "System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0" or a dependency. That's a good point to start.

    – Tarnschaf
    Mar 25 at 0:29

















2















We have a small application that uses ServiceStack OrmLite for database access. I am currently investigating a broken feature that worked previously.



There are two relevant entities:



[Alias("MyOrder")]
public class OrderEntity

[AutoIncrement]
public int Id get; set;
...

// Saved as JSV blob in the table
public AppEntity Processor get; set;


[Alias("MyApp")]
public class AppEntity

[AutoIncrement]
public int Id get; set;

...

[StringLength(64)]
public string UserName get; set;

public Guid? InternalUserId get; set;



Not sure if that matters but AppEntity is located in another DLL/assembly.



Now there is a strange behavior. Processors are correctly saved in the table. I can also retrieve them in integration tests. However, in production code, when a list of OrderEntity objects is fetched, Processor property is null in every instance.



I digged a little bit into ServiceStack code in the debugger and saw that the JSV string is fetched correctly in the first place but it seems to get lost on the way.



This is the unit test that works:



var connectionString = @"Server=...";
var connectionFactory = new OrmLiteConnectionFactory(connectionString, new SqlServerOrmLiteDialectProvider());
var orderRepository = new OrderRepository(connectionFactory);
var orders = orderRepository.FindBySomeFilter();

// entries have not-null .Processor property


This is a small application that doesn't work:



var connectionString = @"Server=...";
var connectionFactory = new OrmLiteConnectionFactory(connectionString, new SqlServerOrmLiteDialectProvider());
var orderRepository = new OrderRepository(connectionFactory);
var orders = orderRepository.FindBySomeFilter();

// .Processor is not retrieved / null for all entries


Versions:



  • .NET 4.5.2

  • ServiceStack 5.4.0









share|improve this question






















  • Both code examples look exactly the same? Note: Incomplete code that can't be run locally to repro the issue isn't going to be useful to others. I'd recommend trying to put together a MCVE that others can run to repro the issue. If you're saying it used to work, I'd be looking into when it used to work and what changed to break it. Also if you use latest v5.4.1 on MyGet it has source link enabled so you can debug into fx code.

    – mythz
    Mar 24 at 23:43











  • Thanks, I was actually hoping that you would take a look and might think of a direction where to look at, such as missing references. The code indeed looks the same - this is why I don't understand the difference. I will try it with 5.4.1 now and get back.

    – Tarnschaf
    Mar 24 at 23:49











  • If it's the same then it suggests it may be due to environment differences, e.g. are they running the same version and did you add any new global JsConfig changes? Or maybe an Exception is being swallowed, can try JsConfig.ThrowOnError=true to throw on error.

    – mythz
    Mar 24 at 23:53











  • Same versions, however different referenced assemblies (such as XUnit in the integration test project). Projects are in the same VS solution. Failing projects are executable, working are test projects / libraries. No custom JsConfig, JsConfig.ThrowOnError=true does not throw, still Processor are null.

    – Tarnschaf
    Mar 25 at 0:06






  • 1





    Ok! I have just found that there is a swallowed exception in OrmLite. Shows a problem with manifest/assembly reference to "System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0" or a dependency. That's a good point to start.

    – Tarnschaf
    Mar 25 at 0:29













2












2








2








We have a small application that uses ServiceStack OrmLite for database access. I am currently investigating a broken feature that worked previously.



There are two relevant entities:



[Alias("MyOrder")]
public class OrderEntity

[AutoIncrement]
public int Id get; set;
...

// Saved as JSV blob in the table
public AppEntity Processor get; set;


[Alias("MyApp")]
public class AppEntity

[AutoIncrement]
public int Id get; set;

...

[StringLength(64)]
public string UserName get; set;

public Guid? InternalUserId get; set;



Not sure if that matters but AppEntity is located in another DLL/assembly.



Now there is a strange behavior. Processors are correctly saved in the table. I can also retrieve them in integration tests. However, in production code, when a list of OrderEntity objects is fetched, Processor property is null in every instance.



I digged a little bit into ServiceStack code in the debugger and saw that the JSV string is fetched correctly in the first place but it seems to get lost on the way.



This is the unit test that works:



var connectionString = @"Server=...";
var connectionFactory = new OrmLiteConnectionFactory(connectionString, new SqlServerOrmLiteDialectProvider());
var orderRepository = new OrderRepository(connectionFactory);
var orders = orderRepository.FindBySomeFilter();

// entries have not-null .Processor property


This is a small application that doesn't work:



var connectionString = @"Server=...";
var connectionFactory = new OrmLiteConnectionFactory(connectionString, new SqlServerOrmLiteDialectProvider());
var orderRepository = new OrderRepository(connectionFactory);
var orders = orderRepository.FindBySomeFilter();

// .Processor is not retrieved / null for all entries


Versions:



  • .NET 4.5.2

  • ServiceStack 5.4.0









share|improve this question














We have a small application that uses ServiceStack OrmLite for database access. I am currently investigating a broken feature that worked previously.



There are two relevant entities:



[Alias("MyOrder")]
public class OrderEntity

[AutoIncrement]
public int Id get; set;
...

// Saved as JSV blob in the table
public AppEntity Processor get; set;


[Alias("MyApp")]
public class AppEntity

[AutoIncrement]
public int Id get; set;

...

[StringLength(64)]
public string UserName get; set;

public Guid? InternalUserId get; set;



Not sure if that matters but AppEntity is located in another DLL/assembly.



Now there is a strange behavior. Processors are correctly saved in the table. I can also retrieve them in integration tests. However, in production code, when a list of OrderEntity objects is fetched, Processor property is null in every instance.



I digged a little bit into ServiceStack code in the debugger and saw that the JSV string is fetched correctly in the first place but it seems to get lost on the way.



This is the unit test that works:



var connectionString = @"Server=...";
var connectionFactory = new OrmLiteConnectionFactory(connectionString, new SqlServerOrmLiteDialectProvider());
var orderRepository = new OrderRepository(connectionFactory);
var orders = orderRepository.FindBySomeFilter();

// entries have not-null .Processor property


This is a small application that doesn't work:



var connectionString = @"Server=...";
var connectionFactory = new OrmLiteConnectionFactory(connectionString, new SqlServerOrmLiteDialectProvider());
var orderRepository = new OrderRepository(connectionFactory);
var orders = orderRepository.FindBySomeFilter();

// .Processor is not retrieved / null for all entries


Versions:



  • .NET 4.5.2

  • ServiceStack 5.4.0






servicestack ormlite-servicestack






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 24 at 23:30









TarnschafTarnschaf

3,36412131




3,36412131












  • Both code examples look exactly the same? Note: Incomplete code that can't be run locally to repro the issue isn't going to be useful to others. I'd recommend trying to put together a MCVE that others can run to repro the issue. If you're saying it used to work, I'd be looking into when it used to work and what changed to break it. Also if you use latest v5.4.1 on MyGet it has source link enabled so you can debug into fx code.

    – mythz
    Mar 24 at 23:43











  • Thanks, I was actually hoping that you would take a look and might think of a direction where to look at, such as missing references. The code indeed looks the same - this is why I don't understand the difference. I will try it with 5.4.1 now and get back.

    – Tarnschaf
    Mar 24 at 23:49











  • If it's the same then it suggests it may be due to environment differences, e.g. are they running the same version and did you add any new global JsConfig changes? Or maybe an Exception is being swallowed, can try JsConfig.ThrowOnError=true to throw on error.

    – mythz
    Mar 24 at 23:53











  • Same versions, however different referenced assemblies (such as XUnit in the integration test project). Projects are in the same VS solution. Failing projects are executable, working are test projects / libraries. No custom JsConfig, JsConfig.ThrowOnError=true does not throw, still Processor are null.

    – Tarnschaf
    Mar 25 at 0:06






  • 1





    Ok! I have just found that there is a swallowed exception in OrmLite. Shows a problem with manifest/assembly reference to "System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0" or a dependency. That's a good point to start.

    – Tarnschaf
    Mar 25 at 0:29

















  • Both code examples look exactly the same? Note: Incomplete code that can't be run locally to repro the issue isn't going to be useful to others. I'd recommend trying to put together a MCVE that others can run to repro the issue. If you're saying it used to work, I'd be looking into when it used to work and what changed to break it. Also if you use latest v5.4.1 on MyGet it has source link enabled so you can debug into fx code.

    – mythz
    Mar 24 at 23:43











  • Thanks, I was actually hoping that you would take a look and might think of a direction where to look at, such as missing references. The code indeed looks the same - this is why I don't understand the difference. I will try it with 5.4.1 now and get back.

    – Tarnschaf
    Mar 24 at 23:49











  • If it's the same then it suggests it may be due to environment differences, e.g. are they running the same version and did you add any new global JsConfig changes? Or maybe an Exception is being swallowed, can try JsConfig.ThrowOnError=true to throw on error.

    – mythz
    Mar 24 at 23:53











  • Same versions, however different referenced assemblies (such as XUnit in the integration test project). Projects are in the same VS solution. Failing projects are executable, working are test projects / libraries. No custom JsConfig, JsConfig.ThrowOnError=true does not throw, still Processor are null.

    – Tarnschaf
    Mar 25 at 0:06






  • 1





    Ok! I have just found that there is a swallowed exception in OrmLite. Shows a problem with manifest/assembly reference to "System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0" or a dependency. That's a good point to start.

    – Tarnschaf
    Mar 25 at 0:29
















Both code examples look exactly the same? Note: Incomplete code that can't be run locally to repro the issue isn't going to be useful to others. I'd recommend trying to put together a MCVE that others can run to repro the issue. If you're saying it used to work, I'd be looking into when it used to work and what changed to break it. Also if you use latest v5.4.1 on MyGet it has source link enabled so you can debug into fx code.

– mythz
Mar 24 at 23:43





Both code examples look exactly the same? Note: Incomplete code that can't be run locally to repro the issue isn't going to be useful to others. I'd recommend trying to put together a MCVE that others can run to repro the issue. If you're saying it used to work, I'd be looking into when it used to work and what changed to break it. Also if you use latest v5.4.1 on MyGet it has source link enabled so you can debug into fx code.

– mythz
Mar 24 at 23:43













Thanks, I was actually hoping that you would take a look and might think of a direction where to look at, such as missing references. The code indeed looks the same - this is why I don't understand the difference. I will try it with 5.4.1 now and get back.

– Tarnschaf
Mar 24 at 23:49





Thanks, I was actually hoping that you would take a look and might think of a direction where to look at, such as missing references. The code indeed looks the same - this is why I don't understand the difference. I will try it with 5.4.1 now and get back.

– Tarnschaf
Mar 24 at 23:49













If it's the same then it suggests it may be due to environment differences, e.g. are they running the same version and did you add any new global JsConfig changes? Or maybe an Exception is being swallowed, can try JsConfig.ThrowOnError=true to throw on error.

– mythz
Mar 24 at 23:53





If it's the same then it suggests it may be due to environment differences, e.g. are they running the same version and did you add any new global JsConfig changes? Or maybe an Exception is being swallowed, can try JsConfig.ThrowOnError=true to throw on error.

– mythz
Mar 24 at 23:53













Same versions, however different referenced assemblies (such as XUnit in the integration test project). Projects are in the same VS solution. Failing projects are executable, working are test projects / libraries. No custom JsConfig, JsConfig.ThrowOnError=true does not throw, still Processor are null.

– Tarnschaf
Mar 25 at 0:06





Same versions, however different referenced assemblies (such as XUnit in the integration test project). Projects are in the same VS solution. Failing projects are executable, working are test projects / libraries. No custom JsConfig, JsConfig.ThrowOnError=true does not throw, still Processor are null.

– Tarnschaf
Mar 25 at 0:06




1




1





Ok! I have just found that there is a swallowed exception in OrmLite. Shows a problem with manifest/assembly reference to "System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0" or a dependency. That's a good point to start.

– Tarnschaf
Mar 25 at 0:29





Ok! I have just found that there is a swallowed exception in OrmLite. Shows a problem with manifest/assembly reference to "System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0" or a dependency. That's a good point to start.

– Tarnschaf
Mar 25 at 0:29












1 Answer
1






active

oldest

votes


















1














Some things you can try for resolving runtime dependency loading issues like this where it's unable to load the System.Runtime.CompilerServices.Unsafe dependency:



  • Try manually adding a reference to the package, or if it's already installed try uninstalling/reinstalling it.

  • Try adding <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> to your project

As this is is a .NET Framework project you can try adding a binding redirect:



<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly>


Or if you already have a binding redirect for this configured, try removing it.



Otherwise upgrading to the latest .NET Framework v4.7+ can also resolve loading runtime system dependencies like this.






share|improve this answer























  • It appears that System.Memory in the broken application had version 4.5.1, it works with 4.5.2 now. ServiceStack seems to actually require just 4.5.1 but I assume that my library which is compiled using 4.5.2 does not work if at runtime only 4.5.1 is present. Unfortunately I am not using NuGet to reference our own libraries yet which might have avoided that...

    – Tarnschaf
    Mar 25 at 0:47












  • @Tarnschaf it’s related to the same runtime loading issues, e.g. you can try a binding redirect.

    – mythz
    Mar 25 at 0:51











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55329588%2fservicestack-ormlite-text-blobbed-value-is-retrieved-as-null%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Some things you can try for resolving runtime dependency loading issues like this where it's unable to load the System.Runtime.CompilerServices.Unsafe dependency:



  • Try manually adding a reference to the package, or if it's already installed try uninstalling/reinstalling it.

  • Try adding <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> to your project

As this is is a .NET Framework project you can try adding a binding redirect:



<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly>


Or if you already have a binding redirect for this configured, try removing it.



Otherwise upgrading to the latest .NET Framework v4.7+ can also resolve loading runtime system dependencies like this.






share|improve this answer























  • It appears that System.Memory in the broken application had version 4.5.1, it works with 4.5.2 now. ServiceStack seems to actually require just 4.5.1 but I assume that my library which is compiled using 4.5.2 does not work if at runtime only 4.5.1 is present. Unfortunately I am not using NuGet to reference our own libraries yet which might have avoided that...

    – Tarnschaf
    Mar 25 at 0:47












  • @Tarnschaf it’s related to the same runtime loading issues, e.g. you can try a binding redirect.

    – mythz
    Mar 25 at 0:51















1














Some things you can try for resolving runtime dependency loading issues like this where it's unable to load the System.Runtime.CompilerServices.Unsafe dependency:



  • Try manually adding a reference to the package, or if it's already installed try uninstalling/reinstalling it.

  • Try adding <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> to your project

As this is is a .NET Framework project you can try adding a binding redirect:



<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly>


Or if you already have a binding redirect for this configured, try removing it.



Otherwise upgrading to the latest .NET Framework v4.7+ can also resolve loading runtime system dependencies like this.






share|improve this answer























  • It appears that System.Memory in the broken application had version 4.5.1, it works with 4.5.2 now. ServiceStack seems to actually require just 4.5.1 but I assume that my library which is compiled using 4.5.2 does not work if at runtime only 4.5.1 is present. Unfortunately I am not using NuGet to reference our own libraries yet which might have avoided that...

    – Tarnschaf
    Mar 25 at 0:47












  • @Tarnschaf it’s related to the same runtime loading issues, e.g. you can try a binding redirect.

    – mythz
    Mar 25 at 0:51













1












1








1







Some things you can try for resolving runtime dependency loading issues like this where it's unable to load the System.Runtime.CompilerServices.Unsafe dependency:



  • Try manually adding a reference to the package, or if it's already installed try uninstalling/reinstalling it.

  • Try adding <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> to your project

As this is is a .NET Framework project you can try adding a binding redirect:



<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly>


Or if you already have a binding redirect for this configured, try removing it.



Otherwise upgrading to the latest .NET Framework v4.7+ can also resolve loading runtime system dependencies like this.






share|improve this answer













Some things you can try for resolving runtime dependency loading issues like this where it's unable to load the System.Runtime.CompilerServices.Unsafe dependency:



  • Try manually adding a reference to the package, or if it's already installed try uninstalling/reinstalling it.

  • Try adding <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> to your project

As this is is a .NET Framework project you can try adding a binding redirect:



<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly>


Or if you already have a binding redirect for this configured, try removing it.



Otherwise upgrading to the latest .NET Framework v4.7+ can also resolve loading runtime system dependencies like this.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 25 at 0:34









mythzmythz

121k14198343




121k14198343












  • It appears that System.Memory in the broken application had version 4.5.1, it works with 4.5.2 now. ServiceStack seems to actually require just 4.5.1 but I assume that my library which is compiled using 4.5.2 does not work if at runtime only 4.5.1 is present. Unfortunately I am not using NuGet to reference our own libraries yet which might have avoided that...

    – Tarnschaf
    Mar 25 at 0:47












  • @Tarnschaf it’s related to the same runtime loading issues, e.g. you can try a binding redirect.

    – mythz
    Mar 25 at 0:51

















  • It appears that System.Memory in the broken application had version 4.5.1, it works with 4.5.2 now. ServiceStack seems to actually require just 4.5.1 but I assume that my library which is compiled using 4.5.2 does not work if at runtime only 4.5.1 is present. Unfortunately I am not using NuGet to reference our own libraries yet which might have avoided that...

    – Tarnschaf
    Mar 25 at 0:47












  • @Tarnschaf it’s related to the same runtime loading issues, e.g. you can try a binding redirect.

    – mythz
    Mar 25 at 0:51
















It appears that System.Memory in the broken application had version 4.5.1, it works with 4.5.2 now. ServiceStack seems to actually require just 4.5.1 but I assume that my library which is compiled using 4.5.2 does not work if at runtime only 4.5.1 is present. Unfortunately I am not using NuGet to reference our own libraries yet which might have avoided that...

– Tarnschaf
Mar 25 at 0:47






It appears that System.Memory in the broken application had version 4.5.1, it works with 4.5.2 now. ServiceStack seems to actually require just 4.5.1 but I assume that my library which is compiled using 4.5.2 does not work if at runtime only 4.5.1 is present. Unfortunately I am not using NuGet to reference our own libraries yet which might have avoided that...

– Tarnschaf
Mar 25 at 0:47














@Tarnschaf it’s related to the same runtime loading issues, e.g. you can try a binding redirect.

– mythz
Mar 25 at 0:51





@Tarnschaf it’s related to the same runtime loading issues, e.g. you can try a binding redirect.

– mythz
Mar 25 at 0:51



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55329588%2fservicestack-ormlite-text-blobbed-value-is-retrieved-as-null%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현