Installing RelationExtensions for petapoco firing error - petapoco

I have installed petapoco RelationExtensions from NUGET and it`s firing error message:
Error 4 The type or namespace name 'IDatabase' could not be found (are you missing a using directive or an assembly reference?) C:\Users\testkit\Models\PetaPocoRelationExtensions.cs 13
Is there the need to dowload any other files?
How can I correct the error?

If you change the IDatabase references to Database references this will work correctly. Nuget has been updated to fix this in 1.0.2.
The IDatabase interface is available on my branch at http://github.com/schotime/petapoco along with extra features, like Fluent Mapping.

Related

Global.Micrsoft.VisualBasic.ApplicationsServices... is not defined error BC30002

I'm converting some old legacy VB apps from .NET framework to .NET 5, and have worked through most of the issues, however, I'm lost on these:
Error BC30002 Type 'Global.Microsoft.VisualBasic.ApplicationServices.ApplicationBase' is not defined.
Error BC30002 Type 'Global.Microsoft.VisualBasic.ApplicationServices.User' is not defined.
Error BC30002 Type 'Global.Microsoft.VisualBasic.Devices.Computer' is not defined.
Error BC30002 Type 'Global.Microsoft.VisualBasic.MyServices.Internal.ContextValue' is not defined.
VisualBasic 10.3.0 package is included in the project.
Any tips are appreciated.
Thanks,
Bill
I came accross the same issue today trying to update a .net framework (4.6 but I guess it applies to 4.x generally) to .net 5 using Microsofts Upgrade assistent.
I found the solution in this bug report on github:
Simply put, add the following to your newly created .vbproj-file:
<PropertyGroup>
<MyType>Empty</MyType>
</PropertyGroup>
Place at the end of of .vbproj-file just before </Project> end tag.

AutoMapper 10.0 failing with message "Instance property 'Current' is not defined for type 'System.Collections.IDictionaryEnumerator'"

I'm using AutoMapper in a project, and it was using version 9.0.0 along with version 7.0.0 of AutoMapper.Extensions.Microsoft.DependencyInjection, and everything was working.
I have a call to GetService on my IServiceProvider to resolve a service, and after upgrading to version 10.0.0 (and version 8.0.1 of the DI project), the call is failing with the following message:
'Instance property 'Current' is not defined for type 'System.Collections.IDictionaryEnumerator'
I tried to look into the code to see if I can find out why it's happening, but I wasn't successful.
Although I did find that this line in the source code is failing for me
Any help is greatly appreciated.
Thank you

ASP.NET Core configurations issue with rc1 vs rc2 and more

I am using the DotNetCore.1.0.0-VS2015Tools.Preview2.exe with Visual Studio Update 3.
I am unable to migrate code to read settings in the appsettings.json file from an MVC6 app.
The code uses the #inject Microsoft.Extensions.OptionsModel.IOptions Settings syntax in a razor file to read the configuration.
The only version of Microsoft.Extensions.OptionsModel.IOptions available is rc1, whereas the Microsoft.Extensions.Options.ConfigurationExtensions version is rc2.
Therefore I am getting the 'ambiguous call' error referred to in a related .net github issue:
Error CS0121 The call is ambiguous between the following methods or properties:
Microsoft.Extensions.DependencyInjection.OptionsServiceCollectionExtensions.Configure and Microsoft.Extensions.DependencyInjection.OptionsConfigurationServiceCollectionExtensions.Configure. This error is about using ANY rc1 version concurrently with any rc2 version of any library/component listed in project.json.
leaving out the Microsoft.Extensions.OptionsModel.Options part I get this further error:
Could not load type 'Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions' from assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
Of course, I realize this is part of the worst (or most visible) release mess in ms-land history. And such is the cost of progress. But I still would like to know the answer, please.

Field not found: 'Nancy.Bootstrapper.NancyBootstrapperLocator.Bootstrapper'

i recently have been using Nancy fx and i'm in love with it, but when i try to make a structuremap ioc like the documentation page suggested i get the error
Field not found: 'Nancy.Bootstrapper.NancyBootstrapperLocator.Bootstrapper'.
i have override the getApplicationContainer function like shown in the file
https://github.com/CarlosBolanos/apadrina/blob/master/Application/Bootstrapper.cs
but still get the same error, i look on the code on the rnancy repository
https://github.com/NancyFx/Nancy.Bootstrappers.StructureMap/blob/master/src/Nancy.Bootstrappers.StructureMap/StructureMapNancyBootstrapper.cs
and i cant see the bootstrapper property
does any1 else have this error too i've been trying to set this up for hours,
if i remove the nancystructuremap in nugget the error goes away.
or do i need to set something else on the bootstrap class.
I ran into this scenario after installing Nancy.Bootstrappers.Ninject from Nuget. My Nancy project was created using the Nancy Visual Studio templates, and were referencing Nancy 0.21.1.
What I found was installing the bootstrapper package caused the base Nancy package to get upgraded from 0.21.1 to 0.23.2. This is fine, except that the Nancy.Hosting.Aspnet and the Razor engine packages were NOT upgraded from 0.21.1.
To fix the error, I had to update all of the Nancy-related packages I was using to match the 0.23.2 package.

Unable to load proxy factory factory exception

I am having this annoying error while running my Nhibernate project. It was running okey and all of a sudden it just start asking for a file in this path "d:\CSharp\NH\NH\nhibernate\src\NHibernate\Bytecode\AbstractBytecodeProvider.cs" and when cancel, it throws an exception saying it says
Unable to load type 'NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle' during configuration of proxy factory class.
Possible causes are:
- The NHibernate.Bytecode provider assembly was not deployed.
- The typeName used to initialize the 'proxyfactory.factory_class' property of the session-factory section is not well formed.
Solution:
Confirm that your deployment folder contains one of the following assemblies:
NHibernate.ByteCode.LinFu.dll
NHibernate.ByteCode.Castle.dll
It is become frustrating for me... need help please -:)
Make sure that you have following dlls copied to the output folder and loaded by your process:
NHibernate.ByteCode.Castle.dll
Castle.Core.dll
NHibernate.dll
Iesi.Collections.dll
log4net.dll
And your NHibernate configuration has this line:
<property name="proxyfactory.factory_class">
NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle
</property>
As an option, you can try to upgrade to latest version of NHibernate - 3.2. They have a built in proxy generator so it should be simpler for you. You will not need these additional dlls. Just remove the config line above if you use NHibernate 3.2.
If for some reasons you can not upgrade to 3.2 you may consider using different byte code providers. NHibernate supports 3 of them out of the box. Try LinFu or Spring:
NHibernate.ByteCode.Castle.ProxyFactoryFactory
NHibernate.ByteCode.LinFu.ProxyFactoryFactory
NHibernate.ByteCode.Spring.ProxyFactoryFactor
Upgrade to the latest version and you will not need an external proxyfactory anymore.