Skip to content

Instantly share code, notes, and snippets.

View stefansedich's full-sized avatar

Stefan Sedich stefansedich

  • Sage AI
  • San Francisco, California
View GitHub Profile
Has anyone ever had an issue with assembly load failing occasionally in an azure role but working fine locally? if I restart my service it will work for a while then eventually fail with the following:
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Data.Services.Client, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Microsoft.Data.Services.Client, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
We have version 5.6.1.1 of that assembly referenced with the appropriate binding redirect in place, it does SOMETIMES work so it can't be solely the redirect. I even tried to turn on fusion logging and while I can see logs for other assemblies I cannot see any references to this assembly in the logs.
Any ideas how to track this down?
void Main()
{
FormatUsingSerilog("{Message} {Number}", "Foo", 2).Dump(); // Outputs: "Foo" 2
FormatUsingSerilog("{@Foo}", new { Property = 2 }).Dump(); // Outputs: { Property = 2 }
FormatUsingSerilog("{@Foo}", new Foo { Property = 2 }).Dump(); // Outputs: UserQuery+Foo
}
static string FormatUsingSerilog(string format, params object[] args) {
var parser = new MessageTemplateParser();
var template = parser.Parse(format);
public class ParentActor : ReceiveActor {
private ActorRef _child;
public ParentActor() {
_child = Context.ActorOf<Child>();
Receive<Start>(m => {
_child.Tell(new Child.Start{State = 123}));
});
}
ubuntu@connect-mongo-rs1b:/data$ echo "{nThreads:32,fileSizeMB:1000,r:true}" | sudo mongoperf
mongoperf
use -h for help
parsed options:
{ nThreads: 32, fileSizeMB: 1000, r: true }
creating test file size:1000MB ...
testing...
options:{ nThreads: 32, fileSizeMB: 1000, r: true }
wthr 32
new thread, total running : 1
echo "{nThreads:32,fileSizeMB:1000,w:true}" | sudo mongoperf
mongoperf
use -h for help
parsed options:
{ nThreads: 32, fileSizeMB: 1000, w: true }
creating test file size:1000MB ...
testing...
options:{ nThreads: 32, fileSizeMB: 1000, w: true }
wthr 32
new thread, total running : 1
echo "{nThreads:32,fileSizeMB:1000,r:true}" | sudo mongoperf
mongoperf
use -h for help
parsed options:
{ nThreads: 32, fileSizeMB: 1000, r: true }
creating test file size:1000MB ...
testing...
options:{ nThreads: 32, fileSizeMB: 1000, r: true }
wthr 32
new thread, total running : 1
[TestFixture]
public class ResetScenario
{
private Stopwatch _stopwatch;
public void GivenX(int a)
{
}
void Main()
{
dynamic foo = 1000000000000000;
// DOES NOT WORK
var x = Convert.ToInt64(foo);
// WORKS!!!
//long x = Convert.ToInt64(foo);
[SetUp]
public void SetUp()
{
_cleanupListener = new CleanupTestDataEventListener();
var cfg = new Configuration()
.DataBaseIntegration(x =>
{
x.Dialect<SQLiteDialect>();
x.ConnectionString = "Data Source=test.db;Version=3;";
[TearDown]
public void TearDown()
{
using(var session = CreateSession())
{
using(var tx = session.BeginTransaction())
{
foreach (var entity in _cleanupListener.InsertedEntities)
{
session.Delete(entity);