I am currently unable to apply a CustomOverlay to my MobileBarcodeScanner instance and according the documentation on their website, I should be able to but it gives me the following error.
Severity Code Description Project File Line Suppression State
Error CS1061 'MobileBarcodeScanner' does not contain a definition for 'CustomOverlay' and no extension method 'CustomOverlay' accepting a first argument of type 'MobileBarcodeScanner' could be found (are you missing a using directive or an assembly reference?) ScannerTesting C:\Users\kalpr\Source\Repos\ScannerTesting\ScannerTesting\ScannerTesting\MainViewModel.cs 88 Active
I am doing this in my .Net Standard Class library which shares the code between all the different platforms.
Should I be doing this natively for each platform or can I just declare it in the portable .NET Standard project?
Related
I downloaded automapper to a separate class library. I want to use this automapper in web api. I want to add automapper to services in program.cs, but it gives the following error.
Severity Code Description Project File Line Hide Status Error CS1061
'IServiceCollection' does not contain a definition of 'AddAutoMapper'
and no accessible extension method 'AddAutoMapper' was found that
accepts a first argument of type 'IServiceCollection' (could be
missing a using directive or assembly reference?) WebApi
C:\Users\batu_\ Desktop\TaskProject\Backend\WebApi\Program.cs 8
Enabled
enter image description here
I downloaded automapper from nuget to map class library
Can't find AddAutoMapper in program.cs
builder.Services.AddAutoMapper(typeof(MappingProfile));
You need to add a reference to: AutoMapper.Extensions.Microsoft.DependencyInjection
I created a new Winforms Xaf Xpo standard security project with 21.2/5
Then I changed the framework of each project to be 4.7.2
Then I ran the upgrade wizard.
Then I tried to convert the project files to use Nuget with Package References.
However I get the following build errors
Severity Code Description Project File Line Suppression State
Error CS1061 'SecurityStrategy' does not contain a definition for 'RegisterXPOAdapterProviders' and no accessible extension method 'RegisterXPOAdapterProviders' accepting a first argument of type 'SecurityStrategy' could be found (are you missing a using directive or an assembly reference?) DXXpo.Win C:\Users\kirst\source\repos\DXXpo\DXXpo.Win\Program.cs 33 Active
Error CS0246 The type or namespace name 'SecuredObjectSpaceProvider' could not be found (are you missing a using directive or an assembly reference?) DXXpo.Win C:\Users\kirst\source\repos\DXXpo\DXXpo.Win\WinApplication.cs 20 Active
I tried drilling into another new project and I can see that RegisterXPOAdapterProviders has namespace DevExpress.ExpressApp.Security
I already have that installed as a NugetPackage.
I tried installing DevExpress.ExpressApp.Security.Xpo but I get a message
Severity Code Description Project File Line Suppression State
Error NU1101 Unable to find package DevExpress.ExpressApp.Persistent.Base. No packages exist with this id in source(s): DevExpressMy, nuget.org, SBDCommonFeed#Local DXXpo.Win C:\Users\kirst\source\repos\DXXpo\DXXpo.Win\DXXpo.Win.csproj 1
There are no packages starting with DevExpress.ExpressApp.Persistent in the feed.
The docs are here
This question is possibly related.
I managed to resolve this issue by including the package DevExpress.ExpressApp.Security.Xpo
The ProductManagement and ResourceManagement use the following command to do that
Container.RegisterWcf(WcfHostFactory);
But when I try to do that in my custom module, I get the following error message:
CS1061 'IContainer' does not contain a definition for 'RegisterWcf' and no accessible extension method 'RegisterWcf' accepting a first argument of type 'IContainer' could be found (are you missing a using directive or an assembly reference?)
Am I missing an assembly reference? And if that's the case: Which one am I missing?
In preparation for cross-platform we extracted WCF to an isolated package Moryx.Runtime.Wcf. That also contains the container extension.
Decided to experiment with the Uno Platform, so I followed the instructions here: https://platform.uno/docs/articles/get-started.html
Set up a new solution in VS2019 16.6.4 using the Cross-Platform App (Uno Platform) template, then updated all the NuGet packages.
Without changing a line of code, I'm unable to build the solution (or just the UWP project). With UWP/x86 selected, I get these two build errors:
Error CS1929 'ILoggerFactory' does not contain a definition for
'AddConsole' and the best extension method overload
'ConsoleLoggerExtensions.AddConsole(ILoggingBuilder,
Action)' requires a receiver of type
'ILoggingBuilder' [PROJECT].Droid, [PROJECT].UWP, [PROJECT].Wasm,
[PROJECT].iOS,
[PROJECT].macOS [PATH] \ [PROJECT].Shared\App.xaml.cs 116 Active
Error CS1061 'App' does not contain a definition for
'InitializeComponent' and no accessible extension method
'InitializeComponent' accepting a first argument of type 'App' could
be found (are you missing a using directive or an assembly
reference?) [PROJECT].Droid, [PROJECT].UWP, [PROJECT].Wasm,
[PROJECT].iOS,
[PROJECT].macOS [PATH] \ [PROJECT].Shared\App.xaml.cs 116 Active
Any thoughts on how to fix this?
Downgrade your Microsoft.Extensions.Logging.Console and Microsoft.Extensions.Logging.Filter nuget packages to version 1.1.1
I am creating a Portable Class Library (PCL) and I am trying to use List.Exists() and List.TrueForAll(), but I am being told that System.Collections.Generic.List does not contain a definition for either Exists or TrueForAll. The PCL I am creating is to work across the .Net 4.5, Silverlight 4, Windows Phone 7.5, Mono Android, and Mono iOS. Is there something that I am missing?
Note: This code works in a .Net 4.0 Library which I have made.
Code Examples which return errors:
List<object> set0;
List<object> set1;
if (set0.TrueForAll(obj0 => set1.Exists(obj1 => obj0.Equals(obj1))))
return true;
if(!(set0.Exists(obj0 => !set1.Exists(obj1 => obj0.Equals(obj1)))))
return true;
Errors Recived:
Error: 'System.Collections.Generic.List' does not contain a
definition for 'Exists' and no extension method 'Exists' accepting a
first argument of type 'System.Collections.Generic.List'
could be found (are you missing a using directive or an assembly
reference?)
Error: 'System.Collections.Generic.List' does not contain a
definition for 'TrueForAll' and no extension method 'TrueForAll'
accepting a first argument of type
'System.Collections.Generic.List' could be found (are you
missing a using directive or an assembly reference?)
You seem to be trying to determine, in a cumbersome way, if set0 is a subset (mathematically) of set1. If you change your type from List<> to HashSet<> or SortedSet<>, you will get this functionality for free.
Otherwise, consider to use
set0.Except(set1).Any()
from Linq.
I'm not sure which methods exist in the Portable Class Library (PCL), but according to the List<>.Exists doc this method does. And also the Linq methods I mentioned.