Csla.Luna, what's this? - wpf

I have this wpf form; the call to InitializeComponent() brings up this message:
Binding Failure was detected.
The assembly with display name
'Csla.Luna' failed to load in the
'Load' binding context of the
AppDomain with ID 1. The cause of the
failure was:
System.IO.FileNotFoundException: Could
not load file or assembly 'Csla.Luna,
Version=3.6.1.0, Culture=neutral,
PublicKeyToken=93be5fdc093e4c30' or
one of its dependencies. The system
cannot find the file specified.
File name: 'Csla.Luna, Version=3.6.1.0, Culture=neutral,
PublicKeyToken=93be5fdc093e4c30'
=== Pre-bind state information ===
LOG: User = DOMAIN\blah.blah
LOG: DisplayName = Csla.Luna, Version=3.6.1.0, Culture=neutral,
PublicKeyToken=93be5fdc093e4c30
(Fully-specified)
LOG: Appbase = file:///D:/MyPath/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : PresentationFramework,
Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file:
D:\MyPath\bin\Debug\Myapplication.vshost.exe.Config
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Csla.Luna, Version=3.6.1.0,
Culture=neutral,
PublicKeyToken=93be5fdc093e4c30
LOG: Attempting download of new URL
file:///D:/MyPath/bin/Debug/Csla.Luna.DLL.
LOG: Attempting download of new URL
file:///D:/MyPath/bin/Debug/Csla.Luna/Csla.Luna.DLL.
LOG: Attempting download of new URL
file:///D:/MyPath/bin/Debug/Csla.Luna.EXE.
LOG: Attempting download of new URL
file:///D:/MyPath/bin/Debug/Csla.Luna/Csla.Luna.EXE.
We use Csla but in a data access component that is not developed by me;
I don't know what Csla.Luna is, and I couldn't find anything about it online. Any help?...
The only "out of the ordinary" thing that I am doing on that form is that I am binding to some ObjectDataProviders that call static methods accessing the database, but It worked so far, and I can't tell whether this is the problem or not.
Any help would be appreciated. Can't believe that Google has no clue about this Csla.Luna thing.

I don't believe Csla.Luna is part of the original framework. You should try and contact the person in charge of developing the data acces component to find out more about it.
In any case, it seem that you are missing this file (Csla.Luna.dll).
You could also use Reflector to pinpoint the location of the call to this Csla.Luna assembly...

Related

Is this a good way to reference Thinktecture DLLs from a strongly-named .NET DLL?

PROBLEM:
I am trying to help a co-worker who wants to reference Thinktecture.IdentityModel.Client.Net45.dll from a VB.NET DLL –- call it MyVBNet.dll -- that is strongly-named. When we run an executable that references MyVBNet.dll, MyVBNet.dll’s attempt to instantiate a Thinktecture object results in the following exception:
FileLoadException was unhandled by user code
An exception of type 'System.IO.FileLoadException' occurred in MyVBNet.dll but was not handled in user code
Additional information: Could not load file or assembly 'Thinktecture.IdentityModel.Client.Net45, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
Here is code that I added to the constructor of an object in MyVBNet.dll to reproduce the exception above:
Dim lobjURI = New Uri("http://localhost:4200/")
Dim lobjOAuth2Client = New Thinktecture.IdentityModel.Client.OAuth2Client(lobjURI)
POTENTIAL WORKAROUND:
I tried to work around the problem as follows and afterward was able to instantiate a Thinktecture OAuth2Client object in MyVBNet.dll on a Windows 10 computer. However, I do not know whether this is a good approach.
[1] Find a Developer Command Prompt in the Start menu and do "[right click] > Run as administrator" on it.
[2] In the resulting window, if you do not already have a SNK file with a strong name key, key in something similar to the following to create an SNK file, keyPair2.snk in the example:
sn -k keyPair2.snk
[3] Copy a Thinktecture DLL to a directory, cd the Developer Command Prompt window to that directory, and key in the following, where Thinktecture.IdentityServer3.dll is an example of a Thinktecture DLL:
ildasm Thinktecture.IdentityServer3.dll /output:Thinktecture.IdentityServer3.il
move Thinktecture.IdentityServer3.dll Thinktecture.IdentityServer3.dll_Original
ilasm Thinktecture.IdentityServer3.il /dll /res:Thinktecture.IdentityServer3.res /key=keyPair2.snk
gacutil /i Thinktecture.IdentityServer3.dll
[4] In Visual Studio, remove your current references to Thinktecture DLLs and replace them by doing "[right click] > Add Reference... > Browse..." on the References node in the Solution Explorer for the assembly to which you wish to add a reference. Then select the DLL that you want under C:\Windows\Microsoft.NET\assembly\GAC_MSIL.

DDRMenu - Could not locate Razor Host Factory type: System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc

We have tried to upgrade dnn site from v7.3.2 to v8.0.3 but the upgrade was failed and while rolling back the changes the DDRmenu disappeared and the logger shows. The specified dll is present in the bin folder. Can anyone help us?
[ERROR] DotNetNuke.Services.Exceptions.Exceptions -
System.NullReferenceException: Object reference not set to an instance
of an object. at DotNetNuke.Web.Razor.RazorEngine.Render[T](TextWriter
writer, T model) [ERROR] DotNetNuke.Services.Exceptions.Exceptions -
System.InvalidOperationException: Could not locate Razor Host Factory
type: System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc at
System.Web.WebPages.Razor.WebRazorHostFactory.CreateFactory(String
typeName) at
System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey
key, Func2 valueFactory) at
System.Web.WebPages.Razor.WebRazorHostFactory.CreateHostFromConfigCore(RazorWebSectionGroup
config, String virtualPath, String physicalPath) at
System.Web.WebPages.Razor.WebRazorHostFactory.CreateHostFromConfig(String
virtualPath, String physicalPath)
How did you roll back? You should have reverted to the old version of the database and the old files. Did you delete all of the files before restoring?

Unable to run application outside of Visual Studio

Our .Net 4.0 app that runs normally while hosted by VS always crashes while loading (less than 1 second after executing) while not debugging (both debug and release binaries).
The app contains 5 libraries (all of it with .Net 4.0) + NHibernate dependencies.
It does not even fire the UnhandledException event, it just crashes right away with a OutOfMemoryException (I could only see that with the Windows Event Viewer).
Event Viewer tells me that kernelbase.dll had a OutOfMemoryException, and
Fuslogvw.exe tells me that System.Core fails to load:
*** Input Assembly Binder Log (6/27/2016 # 15:41:54) ***
The operation failed.
Result of the Association: hr = 0x8007000e. Insufficient storage space to complete the operation.
Assembly Manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\Users\User\Source\Manager\MySoftware\MySoftware.WPF.App\bin\Release\MySoftware.WPF.App.exe
---Follows a detailed log of errors.
=== Pre-Association state information ===
LOG: DisplayName = System.Core, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089
(Fully-specified)
LOG: Appbase = file:///C:/Users/User/Source/Manager/MySoftware/MySoftware.WPF.App/bin/Release/
LOG: initial PrivatePath = NULL
Logging: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = MySoftware.WPF.App.exe
Calling assembly: MySoftware.WPF. App, Version 1.0.0.0, Culture = neutral, PublicKeyToken = null.
===
LOG: this Association starts at the default load context.
LOG: using application configuration file: C:\Users\User\Source\Manager\MySoftware\MySoftware.WPF.App\bin\Release\MySoftware.WPF.App.exe.Config
LOG: using host configuration file:
LOG: using machine configuration file C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: post policy reference: System.Core, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089
LOG: assembly located by searching on GAC.
ERR: unrecoverable error during pre download verification (hr = 0x8007000e).
I have 4GB of RAM with 60% occupied, so maybe that's not the problem. Can you give me a hint where to look?

How to use ReactiveUI with WinForms

I have decided to learn ReactiveUI after seeing what can be done with it, but my enthusiasm has been broken at the first attempt to run a simple project. I have recreated the example from this article, using reactiveui-winforms.Net40 version 6.5.0 from NuGet. Everything compiles ok, but i get an exception during runtime at the following line
var OKCmdObs = this.WhenAny(vm => vm.EnteredText,
s => !string.IsNullOrWhiteSpace(s.Value));
System.InvalidOperationException occurred
HResult=-2146233079
Message=The current thread has no Dispatcher associated with it.
Source=System.Reactive.Windows.Threading
StackTrace:
at System.Reactive.Concurrency.DispatcherScheduler.get_Current()
at ReactiveUI.PlatformRegistrations.<>c.<Register>b__0_7() in C:\workspace\git-perso\ReactiveUI\ReactiveUI\Platform\Registrations.cs:line 75
InnerException:
Does anyone have any idea of what's happening ?
The mentioned article does not have the compiled project available for download, and i didn't find any complete "Hello-World" project for reactiveui-winforms.
My test project can be downloaded here.
In Visual Studio, if i Continue(F5), another exception occures :
System.NullReferenceException occurred
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=ReactiveUI
StackTrace:
at ReactiveUI.IROObservableForProperty.<>c__DisplayClass1_0.<GetNotificationForProperty>b__6(IReactivePropertyChangedEventArgs`1 x) in C:\workspace\git-perso\ReactiveUI\ReactiveUI\IROObservableForProperty.cs:line 44
InnerException:
If i continue to hit F5 i get :
System.Exception was unhandled by user code
HResult=-2146233088
Message=An OnError occurred on an object (usually ObservableAsPropertyHelper) that would break a binding or command. To prevent this, Subscribe to the ThrownExceptions property of your objects
Source=ReactiveUI
This exception is caused because RxUI always tries to initialize for WPF, even though (because you're also using the winforms package) it'll override this setting with a Winforms-based scheduler right after.
It should be harmless though, as it's catched and ignored. You're probably hitting it within VS ?

bug in aspnet_compiler?

I have a solution with several web projects.
I have built each project into its own folder (there's about 10 projects):
/build/projA
/build/projB
/build/projC
If I call
aspnet_compiler -v / -p \"build/#{proj}\" merged/#{proj}
on each one in turn, everything is fine.
If I make all 10 calls to aspnet_compiler in parallel, I get assembly loading errors, saying the referenced assemblies are in use.
Is this a bug? Why would it be in use? It shouldn't be.
The assemblies that cant be loaded are in multiple projects, but each one has its own copy in its bin folder.
Update: it seems to occur (for some) of the assemblies that are references of references. Those loaded with complete binding information seem to work.
Here's a dump from one of the failed loadings from fuslogvw
The operation failed.
Bind result: hr = 0x80070020. The process cannot access the file because it is being used by another process.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = andrew.bullock
LOG: DisplayName = Yahoo.Yui.Compressor
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Yahoo.Yui.Compressor | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///E:/build/ProjA/
LOG: Initial PrivatePath = E:\build\ProjA\bin
LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\src_projects_proja\061ad2e7
LOG: Cache Base = C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\src_projects_proja\061ad2e7
LOG: AppName = 627cc9a9
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: E:\build\ProjA\web.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/src_projects_proja/061ad2e7/627cc9a9/Yahoo.Yui.Compressor.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/src_projects_proja/061ad2e7/627cc9a9/Yahoo.Yui.Compressor/Yahoo.Yui.Compressor.DLL.
LOG: Attempting download of new URL file:///E:/build/ProjA/bin/Yahoo.Yui.Compressor.DLL.
LOG: Assembly download was successful. Attempting setup of file: E:\build\ProjA\bin\Yahoo.Yui.Compressor.dll
LOG: Entering download cache setup phase.
ERR: Error extracting manifest import from file (hr = 0x80070020).
ERR: Setup failed with hr = 0x80070020.
ERR: Failed to complete setup of assembly (hr = 0x80070020). Probing terminated.
If you call the ClientBuildManager directly, outside of aspnet_compiler there doesn't seem to be a problem, no idea why.
var parameter = new ClientBuildManagerParameter
{
PrecompilationFlags = PrecompilationFlags.ForceDebug
};
var client = new ClientBuildManager("/", src, dest, parameter);
client.PrecompileApplication();

Resources