"Could not load file or assembly 'TypeMock.Interceptors, Version=0.0.0.0" - upgrade

We have just upgraded Typemock from 6.0.2.0 to Typemock 7.3.0.0. And we now get the following error at runtime:
[System.IO.FileNotFoundException] = {"Could not load file or assembly 'TypeMock.Interceptors, Version=0.0.0.0, Culture=neutral, PublicKeyToken=0000000000000000' or one of its dependencies. The system cannot find the file specified.":"TypeMock.Interceptors, Version=0.0.0.0, Culture=neutral, Pu...
During debugging I can see that the source throwing it is mscorlib. The mystifying thing is that I have unloaded all of my projects that have references to Typemock.dlls but still get this error. When I choose "suspend mocking" in the Typemock-menu everything works.
In the GAC I can see that Typemock.Interceptors 7.3.0.0 is installed.
Any ideas?

I called TypeMock support, and they confirmed that it was a bug in TypeMock. They sent me a newer version (7.3.2.0) and the issue has now disappeared.

Related

Firebase Database in Unity with REST API

I am trying to create a connection to the Firebase Realtime Database by following this tutorial: https://medium.com/#rotolonico/firebase-database-in-unity-with-rest-api-42f2cf6a2bbf to understand how it works and modify as I go. However, I am getting the following errors (these are just some of the errors):
Assembly DLL name is reserved for internal use: Assets/UnityEngine.dll (did files generated by a build accidentally end up in your Assets/ folder?)
C:\Program files\2019.4.20f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\FontData.cs(135,16): error CS0433: The type 'TextAnchor' exists in both 'UnityEngine.TextRenderingModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'`
C:\Program Files\2019.4.20f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\InputField.cs(241,10): error CS0433: The type 'SerializeField' exists in both 'UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
These errors are populating when I did the following steps:
Navigate to the Build Files (DLL) folder.
Open CommonData.csproj in your favorite text editor.
Change the UnityInstallFolder value on line 6 to point to your Unity installation directory
On OSX this is likely /Applications/Unity/Editor
On Windows this is likely C:\Program Files (x86)\Unity\Editor
Double click FullSerializer.sln to open up the solution
Run a build-all (F6 in visual studio). Alternatively, you can right-click any of the three projects to build only one of them.
FullSerializer - NoUnity builds Full Serializer so that you can use it outside of Unity.
FullSerializer - Unity builds Full Serializer to a DLL
FullSerializer - Unity - WinRT builds Full Serializer with WinRT APIs (if you're targeting the Windows Store or the Windows Phone export platforms)
You will find the DLLs inside of the Build folder. Please add them to your Unity project's Asset folder.
Here is the path where unity is installed:
C:\Program Files\2019.4.20f1\Editor
I opened the FullSerializer.sln, and build one of the three projects, and so on.
I am not sure what I am doing wrong. Any help would be appreciated.
I was able to determine the issue. It appears that although the instruction suggests adding the source folder in the assets folder of the Unity Project, I remove it from there and put it in the same level as the assets folder. That resolved the issue. Hope this helps anyone else who has encountered this issue.

Scripts fail with error that Microsoft.ServiceFabric.Internal.Strings.dll is unavailable when "Microsoft Service Fabric" is installed

After upgrading to the latest tools, runtime and SDK (5.5.216.0), PowerShell scripts, such as TestConfiguration.ps1, fail with an error that Microsoft.ServiceFabric.Internal.Strings.dll version 5.0.0.0 can't be found. As soon as I deinstall 'Microsoft Service Fabric' from the control panel, it works just fine. This behavior seems very similar to the Newtonsoft.Json.dll issue that was resolved in 5.5.216.0, just with a different assembly this time around.
Is this a known issue?
It quickly gets tedious to have to uninstall 'Microsoft Service Fabric' when I run certain scripts and then have to install it again for others that require it.
Example of error:
PS C:\git\sf-admin\DeploymentScripts\Microsoft.Azure.ServiceFabric.WindowsServer> .\TestConfiguration.ps1 ..\ClusterConfig.Production.Shared.json
Trace folder doesn't exist. Creating trace folder: C:\git\sf-admin\DeploymentScripts\Microsoft.Azure.ServiceFabric.WindowsServer\DeploymentTraces
Running Best Practices Analyzer...
Standalone package dependent files not found. Check package structure. Error: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ServiceFabric.Internal.Strings, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or on
e of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.ServiceFabric.Internal.Strings, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Microsoft.ServiceFabric.ClusterManagementCommon.ValidatorExtensions.ThrowValidationExceptionIfNull[T](T parameter, String parameterName)
at Microsoft.ServiceFabric.DeploymentManager.BPA.BestPracticesAnalyzer.IsJsonConfigModelValid(StandAloneInstallerJsonModelBase config)
Thanks,
Hans
I believe you're getting that error due to the SDK/Runtime installing dll's to the GAC which are being picked up.
Try running moving your Microsoft.Azure.ServiceFabric.WindowsServer folder to another machine and running TestConfiguration.ps1 again.
If you're running the scripts from a box without internet access then you'll need to specify the location of the .cab which contains the runtime
-FabricRuntimePackagePath C:\temp\Microsoft.Azure.ServiceFabric.WindowsServer.5.5.216.0\MicrosoftAzureServiceFabric5.5.216.0.cab

PayPal from NuGet

I added PayPal from NuGet https://www.nuget.org/packages/PayPal/ to my solution but on runtime I get an error
System.IO.FileNotFoundException: Could not load file or assembly 'PayPalCoreSDK, Version=1.7.0.0, Culture=neutral, PublicKeyToken=5b4afc1ccaef40fb' or one of its dependencies.
The system cannot find the file specified. File name: 'PayPalCoreSDK, Version=1.7.0.0, Culture=neutral, PublicKeyToken=5b4afc1ccaef40fb'
Any Idea to fix this issue?
Thanks
Based on the error message you seem to be using the incorrect nuget package.
Could not load file or assembly 'PayPalCoreSDK'
You should use PayPal Core SDK for .NET instead of PayPal .NET SDK

Running migrate.exe from powershell for Cloud Services Project?

I'm trying to write a powershell script that runs migrations for a cloud service project:
$migrator = "C:\Path\EntityFramework.6.1.3\tools\migrate.exe"
$migrateCommand = "$migrator file.dll /StartUpDirectory=C:\path\bin\Test /connectionStringName:myconnection /startUpConfigurationFile:C:\path\app.config /verbose"
Invoke-Expression $migrateCommand
And I keep getting the following error when I run the script: "Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified."
I have copied migrate.exe to my bin folder where all the dll's are and I'm using absolute path's for the startupdirectory and configuration file. Can't seem to figure out what I'm missing? Also another question I had was could migrate.exe be only used with webrole/workerrole projects?
The problem is migrator was searching entityframework.dll in the same working directory. You could change the working directory to the folder which contains your entityframework.dll

LINQPad Query Error

Problem: Can't properly setup LINQPad connection to my Entity Framework dll.
I downloaded LINQPad (v4.42.01)
I started to create a new connection using the Entity Framework DbContext POCO driver
At the setup dialog I pointed to my C# project's dll and it found the appropriate DbContext class.
Next I pointed the config file to the app.config of my C# project
When I hit the Test Button I get this error:
Error: The type initializer for
'System.Data.Entity.Internal.AppConfig' thre an exception. An error
occurred creating the configuration section handler for
entityFramework: Could not load file or assembly 'EntityFramework,
Version=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' on
one of its dependencies. The system cannot find the file specified.
(C:\Code\NET\FTI_Opp_Model\App.Config line 5)
So I tried doing what #Sorax did in this related question and moved my EntityFramework.dll from the one I got from NuGet in my project into the LINQPad.exe folder. This got me a little further along and the Test now worked. I was encouraged because my connection in the LINQPad panel showed all my entities underneath it.
But when I right click on my Borrower entity and chose "Borrower.Take(100)" I received this error from LINQPad:
The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception.
With an inner exception message:
[A]System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection cannot be cast to
[B]System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection. Type
A originates from 'EntityFramework, Version=4.3.1.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' in the context 'Default' at location
'C:\MarkSisson\LinqPad\EntityFramework.dll'. Type B originates from
'EntityFramework, Version=4.3.1.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' in the context 'LoadFrom' at location
'C:\Users\msisson\AppData\Local\Temp\LINQPad\vlnebssu\shadow_ujjvzp\EntityFramework.dll'.
Any ideas?
Download the latest beta - this problem was fixed in 4.42.05.
Btw the important thing to understand that the type of the assembly also include WHERE IT WAS LOADED.
meaning two same assemblies loaded from different location are not the same type!