I updated NuGet packages today (8/19/2014) for both MVVM Light and the CommonServiceLocator. After doing this, my project can no longer resolve the Microsoft.Practices namespace. This means that the following won't work:
ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
What should I do to resolve this? Thanks.
Are you having a namespace collision with another package perhaps?
You can access the object with it's full namespace:
Microsoft.Practices.ServiceLocation.ServiceLocator
Posting the full error message will help.
Can you make sure that the CommonServiceLocator dll and reference made it into the project?
Related
I have a project at Unity 2019.3 with dotnet 4.x. I am trying to import firebase analicts and I have gotten the following error:
System.TypeInitializationException: The type initializer for 'Firebase.Editor.Measurement' threw an exception. ---> System.MissingMethodException: void Google.EditorMeasurement.set_InstallSourceFilename(string)
--- End of inner exception stack trace ---
at Firebase.Editor.AndroidSettingsChecker..cctor () [0x0000c] in Z:\tmp\tmp.SHkOPK7iEJ\firebase\app\client\unity\editor\src\AndroidAPILevelChecker.cs:37
and
MissingMethodException: void Google.EditorMeasurement.set_InstallSourceFilename(string)
Does anyone have any idea what it could be? Was any library missing? I haven't found reference to this problem anywhere.
I had the exact same problem, I fixed it by fully removing the ExternalDependencyManager folder in the project and replaced it using the latest Jar Resolver plugin from here https://github.com/googlesamples/unity-jar-resolver/blob/master/external-dependency-manager-latest.unitypackage
At the same time I also installed Python 2.7 and added it to system path, but I'm pretty sure the jar resolver thing is what fixed the issue. The root problem is the embedded analytics (EditorMeasurement) fail and Firebase never executes the python scripts that make all the Plugins/Firebase/res/values xmls
Hope this helps! :)
In my case the issue was happening after adding a new Firebase package with a version bigger than the other Firebase packages already in the project. Updating all the packages to the same version solved the problem.
deleting the editor folder inside the PlayServicesResolver folder and then reimporting it from any of the firebase unity packages.
I needed to migrate a Xamarin.Forms project from PCL to .netstandard. I use the PCL compatibility nuget package to consume PCLs referenced in the project but I am having a problem with DryIoc that I'm not sure why it is happening. I figured maybe someone here has seen this and can help. Basically I'm getting CS0121 errors (call is ambiguous between 'method1' and 'method2' ) One of the errors is below. I replaced part of the path with the ~ but it looks like it is confused with itself.
~/.nuget/packages/dryioc/2.12.7/contentFiles/cs/any/Container.cs(56,56): Error CS0121: The call is ambiguous between the following methods or properties: 'DryIoc.ReflectionTools.GetFieldOrNull(System.Type, string)' and 'DryIoc.ReflectionTools.GetFieldOrNull(System.Type, string)' (CS0121) (Masterflex)
Thanks!
Fixed this error by replacing the PackageReference of DryIoc with a Reference node in the csproj file:
<Reference Include="DryIoc">
<HintPath>..\packages\DryIoc.dll.4.1.0\lib\netstandard2.0\DryIoc.dll</HintPath>
</Reference>
I am getting cannot resolve FirebaseRecyclerAdapter when trying to use it even after adding firebase ui in gradle dependency.Thanks in advance
I was getting the same issue, it's resolved by adding the firebase-ui dependency in build.gradle (module:app)
compile 'com.firebaseui:firebase-ui-database:0.4.0'
Also add the import in .java file where you're trying to declare it.
import com.firebase.ui.database.FirebaseRecyclerAdapter;
Go to build.gradle file, add a dependency (get the latest one from here https://github.com/firebase/FirebaseUI-Android)
The latest one on 5 October 2019 is implementation 'com.firebaseui:firebase-ui-database:6.0.2'
If You are facing Problem in 2020 then use this dependency:
implementation 'com.firebaseui:firebase-ui-database:6.0.2'
above mentioned answers are not working in today's date i have tried all of them,remember import this package too:
import com.firebase.ui.database.FirebaseRecyclerAdapter;
Can you show your build.gradle file?
Also, have you tried putting this under your package name in your java class: import com.firebase.ui.database.FirebaseRecyclerAdapter;?
In your app level gradle:add the following firebase dependency
dependencies {
compile'com.firebaseui:firebase-ui-database:1.1.1'
The dependencies quoted above don't seem to work anymore. After about an hour of searching online, I found this; hopefully it helps someone. It certainly fixed my problem:
compile 'com.firebaseui:firebase-ui:0.4.3'
Use exactly the matched version of FireBaseRecyclerAdapter
to the Versions that you have included in gradle for the Firebase Database.
This link will surely help you
https://github.com/firebase/FirebaseUI-Android
In this link, you will find the matched Firebase dependency according to the version.
I tried to import the following three packages, and my problem is solved:
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation "androidx.legacy:legacy-support-v4:1.0.0"
implementation 'com.firebaseui:firebase-ui-database:8.0.1'
implementation 'com.firebaseui:firebase-ui-database:1.2.0'
You can use this gradle dependencies
I got an old project which consist of three different projects. When I am trying to build the project I am getting this error message:
"The type or namespace name 'Ajax' could not be found (are you missing a using
directive or an assembly reference?)"
I have found solution for missing project or namespace online but it looks like I am missing some default library.
The code looks like this:
//Ajax method to Check for existing file name
[Ajax.AjaxMethod()]
public DataTable CheckSearchName(string searchname){
// code goes here
}
Any help?
Finally the problem was solved. I was missing a reference for this project. I found a Ajax.dll file in my website's bin folder. Then all I had to do is just adding a reference to this file (Website/Project > Add reference > Browse > (Browse to Bin folder) > Ajax.dll
That did the trick.
That sounds like the really old Microsoft AJAX.NET library from the .NET 1.1/2.0 days.
See here: Microsoft AJAX.NET, which has a download link to the class library: Ajax.NET Professional.
I have this code:
1: IUnityContainer container = new UnityContainer();
2: container.LoadConfiguration();
Line 1 works, but line 2 not. LoadConfiguration is not found as a member.
I think, i have register all unity-dlls. Why is LoadConfiguration() not found?
LoadConfiguration() is not a member of IUnityContainer. You must be thinking of some other class or interface. Perhaps this one?
IUnityContainer is in the Microsoft.Practices.Unity namespace, but the LoadConfiguration() extension method lives in the Microsoft.Practices.Unity.Configuration namespace. Have you added that namespace to your code?
I believe in the latest version of Unity 5.9.3, Microsoft.Practices.Unity dlls are not part of the nuget. You'd have to install another package from nuget 'Unity.Configuration'. Its an open source package offered by Unity. As of today, Unity Configuration latest version is 5.9.0.
Not only
Unity.Configuration package should be installed
but also
using Microsoft.Practices.Unity.Configuration;
should be declared at top of the cs file.