I installed the namespace XPlat.Services.Maps via NuGet. But now it seems to not contain the class MapLocationFinder.
When I type XPlat.Services.Maps.MapLocationFinder it results in an error that says there is no such member
However on this page its clearly using this class in this namespace.
https://xplat.gitbook.io/docs/xplat.services.maps/maplocationfinder
Is there something wrong?
XPlat.Services.Maps.MapLocationFinderResult for example works fine
Related
So I am working on a project someone gave me.
In the project, there is a main Namespace, lets call it "Program".
In that namespace are several different classes.
Now I had to derive from a class in Namespace Devices.
There was already another class derived from the object Device.
So I went ahead, created my class, included it in the Devices namespace, derived it from Device and did my job.
But not shortly afterwards, I couldnt use any of the base variables, methods and so on. The whole intellisense doesnt work on that class.
And even worse is, that it doesnt seem to be included into the assembly.
How can I get my class being recognized by Intellisense, the assembly and so on? I made a test class which only was like this:
Namespace Devices
Class Testcle
' ... Nothing
End Class
End Namespace
And it worked perfectly fine. It was included in the assembly, Intellisense worked, etc.
The folder structure looked a bit like this:
[Project]
↳ [-] Devices (Folder and Namespace)
[-] AlreadyExistingClassDerivedFromDevice (Folder)
↳ AlreadyExistingClassDerivedFromDevice.vb
[-] MyClassDerivedFromDevice (Folder)
↳ MyClassDerivedFromDevice.vb
↳ [+] Other (Folder)
↳ Testcle.vb
↳ Device.vb
Is there anything Im missing? Like is there a hidden setting I have to activate?
Edit:
The declarations look a bit like this (but in different files):
Device.vb
Namespace Devices
Public MustInherit Class Device
' ...
End Class
End Namespace
This works:
AlreadyExistingClassDerivedFromDevice.vb
Namespace Devices
Public NotInheritable Class AlreadyExistingClassDerivedFromDevice
Inherits Device
' ...
End Class
End Namespace
This doesnt work:
MyClassDerivedFromDevice.vb
Namespace Devices
Public NotInheritable Class MyClassDerivedFromDevice
Inherits Device
' ...
End Class
End Namespace
There is literally no difference with the inheriting classes. Only the inner workings. But those shouldnt have an effect on the accessability of the ctor or Intellisense or something, right?
I write this as an answer because it solved my problem. However, I dont know what cause it had and dont know the exact steps to actually solve the problem in a 'proper' way.
What I did is the following:
I renamed the file MyClassDerivedFromDevice.vb to MyClassDerivedFromDevice_Old.vb, created a new class named MyClassDerivedFromDevice.vb and just after adding the namespace and making sure Intellisense and everything works properly, I just copied the code from MyClassDerivedFromDevice_Old.vb (after the line Namespace Devices up to End Namespace into MyClassDerivedFromDevice.vb.
That solved the problem.
Short version:
1) Rename NotWorkingClass.vb to NotWorkingClass_Old.vb
2) Add new class with name NotWorkingClass.vb.
3) Add Namespaces to NotWorkingClass.vb.
4) Check whether everything works accordingly (Intellisense, etc.) and it is recognized by Visual Studio.
5) Copy all code starting after Namespace X to right before End Namespace from NotWorkingClass_Old.vb to NotWorkingClass.vb (which should now work).
Say I have a class library project (Library) which contains a class of:
Public Class SomeClass(Of TTypeA, TTypeB)
Then, in another project UIProject in a different solution, I define a class that is derived from (inherits) SomeClass:
Imports Library
Public Class SomeDerivedClass
Inherits SomeClass(Of String, Boolean)
I have included Library.pdb and Library.xml alongside Library.dll (in the same folder) when I added the class libary reference to the UIProject.
Now, In UIProject I create a ClassDiagram (ClassDiagram1.cd), and add in the SomeClass class. So far so good.
The next step is to right-click on SomeClass in the diagram, and select "Show Base Class" from the dropdown. At this point, I am given the error:
Error HRESULT E_FAIL has been returned from a call to a COM
component.
If I do the same but for a non-generic version of SomeClass, then SomeClass is included in the class diagram, no problem.
No errors show up in ActivityLog.xml; nor in the Windows Event Viewer.
Is this a bug in Visual Studio (in which case I'll report it); or am I doing something wrong (and if so are there any other error logs or traces I can do to narrow down the issue further)?
The answer seems to be that COM does not work with generic types; and that it works in VS2017.
"Base class <baseclassname1> specified for class
'' cannot be different from the base class
'' of one of its other partial types"
The problem is that I only declared the class in one place, the actual class file, and only declared it once, non partially.
All my other classes that inherit from "DialogBase" work fine, but one file with the most code just stopped working.
What else could be the problem? Could it be declared partial somewhere else?
Class CostDialog inherits DialogBase(This works fine)
Class Blend inherits DialogBase(This errors)
Blend is only written as Public Class Blend in the Blend.vb file ONCE
This error makes no sense
You may have multiple code behind files with the same class name. I was converting a web site to a web application and found that there were two instances of Home. So Project/abc/home.aspx /aspx.vb and Project/def/home.aspx/ /aspx.vb will cause a conflict if both home.aspx.vb files have the same class name.
My fix was to leave all the file names untouched but modify the class name to abc_home and def_home in their respective code behind file and then change the Inherits property at the top of their .aspx pages.
Highly doubt this is still an issue for you, but maybe for someone else.
At the moment I´m trying tests on the interoperability of VB6 and .NET using COM.
I have followed this simple example to call a .NET component from COM.
https://msdn.microsoft.com/en-us/library/ms973802.aspx
The DLL is registered and the assembly was "succesfully added to the cache". However when I take a look into the object browser of VB6 I can only see methods of the interface and not of the actual class. COM is set on visible and the correct path for the KeyFile, are both in the AssemblyInfo.vb file. The .NET Class+Interface looks like this:
Public Interface iTemperature
'some properties and functions
End Interface
Public Class NET_Temperature
Implements iTemperature
'some implemented public properties and functions
End Class
When I try to run the following Code:
Set moTempClass = New PhysServer2.NET_Temperature
Set moTemp = moTempClass
I´m getting the well known 429-runtime error, saying that creating an object through an Active-X-component does not work. There is a lot of information on the internet regarding this error with unregistered DLL/TLB, but I´m more concerned about the fact that only the methods and properties of the interface are shown in the object browser and not the implemented methods/properties of the interface - the class. How can I fix this Error and make the methods in my class sort of visible to COM and the object browser?
I am trying to get this: System.Deployment.Application.ApplicationDeployment.CurrentDeployment.IsFirstRun
But the application namespace is not there. I just see System.Deployment.Internal. The object browser, however, shows me all the properties and methods of that namespace, but my app can't see it.
What am I missing?
Did you add a reference to System.Deployment?