Code: Select all
Local oiConC As IC2CSMethods.iConnectC
oiConC := IC2CSMethods.iConnectC{}
oiConC:DoSomething()
Of course this is wrong. It should go to the C# method DoSomething which is in a separate project but the same solution.
I see multiple posts over the years what the problem usually is and of course it has never been fixed:
The problem begins when you added the reference to the DLL and not to the project... In this case VS will remember forever that and will always open 'from metadata' even you changed the reference from DLL to project... The only way I now of, is manually editing the project file and remove the DLL reference...
However, I removed the below XML from the project file and on re-opening the solution it was back and nothing changed. Plus that I would say that it is the correct reference, to the actual C# project. But that does not seems to be used. Even if I unload the C# project in the solution, the X# program using the C# method(s) still compiles without error (and keeps showing the metadata).
How can I solve this?
Dick
<ItemGroup>
<ProjectReference Include="IC2CSMethodsIC2CSMethods.csproj">
<Name>IC2CSMethods</Name>
<Project>{f6d8ba6c-be7e-4846-bbd0-f9a5dd176302}</Project>
<Private>True</Private>
</ProjectReference>
</ItemGroup>