I am trying to use AdRotator in my Windows Store application and I just installed it using the Nuget Package manager. I tried to run my app without adding any controls or code behind in XAML/C# Windows store app and it crashes throwing an exception about AdDuplex.
To be more precise I get the following exception
An exception of type 'System.IO.FileNotFoundException' occurred in AdRotatorWin8.DLL but was not handled in user code
Additional information: Could not load file or assembly 'AdDuplex.Windows, Version=8.0.2.0, Culture=neutral, PublicKeyToken=447cab5ae9276daf' or one of its dependencies. The system cannot find the file specified.
I do not plan to use AdDuplex in my app but without adding any code about AdDuplex I keep getting exceptions.
After uninstalling adrotator everything works fine again.
After checking with the packages output window AdDuplex was installed alongside AdRotator. How do I make my app work though?
My default Ad settings file consists only of this
<?xml version="1.0" encoding="utf-8"?>
<AdSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CultureDescriptors>
<AdCultureDescriptor CultureName="default">
<Probabilities Probability="50" AdType="PubCenter" AppID="test_client" SecondaryID="Image_728x90" />
</AdCultureDescriptor>
</CultureDescriptors>
</AdSettings
With numbers and IDs set up properly but obviously I cannot share them here.
The issues persists no matter what I do.
I tried downloading adDuplex but the only availiable version in Nuget is 8.0.5 which in theory should work (since the error is of an earlier version of AdDuplex) but still doesn't
Follow the instructions in this url : http://darkgenesis.zenithmoon.com/adrotator-for-windows-8/
I believe that you have to change
defaultApSettings.xml
remove AdDuplex and set the Ad service that you are going to use.
An alternative solution is to just download the AdDuplex package using Nuget but I believe that is not the best choice if you have already decided that you are not going to use it.
Turns out said version of AdDuplex had Issues with AdRotator and Adrotator has been updated to accomodate the new changes
Related
I have a .Net Core 3.1 WPF app. It needs to connect to a service and pull/push data to that service. The app executable works without any error message. However, when I publish the Self Contained app and make it a single exe file, It is not able to connect to the service and throws an exception with the following message.
Could not load type 'System.Dynamic.IInvokeOnGetBinder' from assembly netstandard, Version=2.1.0.0, Culture=neutral
What may cause this exception?
This must be a bug on the Microsoft side. I went ahead and unchecked the Trim unused assemblies and the app starts working. Although this outputted a bigger executable file, Trimming seems to be removing too much if enabled.
I'm trying to write a timer-triggered Azure Function that downloads a bunch of data and processes it into a SQLite database. I've written code that does this and runs fine on my own machine. But, the same code in Azure yields a DllNotFoundException, complaining that the system can't load "e_sqlite3."
Here is the full error message (for the inner exception):
Exception while executing function: FnordFunction
Microsoft.Azure.WebJobs.Host.FunctionInvocationException : Exception
while executing function: FnordFunction --->
System.TypeInitializationException : The type initializer for
'SQLite.SQLiteConnection' threw an exception. --->
System.DllNotFoundException : Unable to load DLL 'e_sqlite3': The
specified module could not be found. (Exception from HRESULT:
0x8007007E)
at
SQLitePCL.SQLite3Provider_e_sqlite3.NativeMethods.sqlite3_libversion_number()
at
SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()
at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)
at SQLitePCL.Batteries_V2.Init()
at SQLite.SQLiteConnection..cctor()
End of inner exception
Here are the steps to reproduce:
In Visual Studio 2017, I created an Azure Function project using the latest template.
I added my code files to the project, and edited the "Run" method to call the code.
Using NuGet, I added sqlite-net-pcl, and some other libraries I need. (I've also tried this with EntityFrameworkCore, using SQLite; that didn't work either).
Build
Publish
Run. Failure.
The problem might be that my code is wrong--but it works fine when I just make a console .exe.
The problem might be that VS2017 is not bundling the correct dll for SQLite when it builds. I'm not sure how to fix that. I've seen from other searches that the same error message pops up when the platform target is set to "Any CPU," but changing that to x86 or x64 does not fix the problem.
The problem might be that the SQLite libraries I have tried won't run in the Azure Functions sandbox. If so, are there any simple SQLite libraries that will run in the sandbox?
Thanks in advance...
The problem is that when running in a Function App, native binaries can't be automatically loaded from your bin folder, so it's not finding the DLL.
One way to solve this is to drop it in your D:\home\site\tools folder (e.g. using Kudu Console), as that folder is automatically place on the PATH.
I am working on a Xamarin based mobile app. It has previously deployed to an iPhone, and is currently working on the simulator. However, when I try to Debug on my iPhone, I get:
Error MT2002: Failed to resolve assembly: 'PCLStorage.Abstractions, Version=1.0.2.0, Culture=neutral, PublicKeyToken=286fe515a2c35b64' (MT2002) (My_App.iOS)
PCLStorage is installed and up to date in my iOS and Core projects, although neither have any references to the package. It was installed when I added the AWS Core SDK. How do I resolve this error, I assume that is what is stopping the debug on iPhone?
Edit: (based on Answer below)
If I disable the linker in my build settings, I get the error:
My_App/iOS/MTOUCH: Error MT3001: Could not AOT the assembly 'My_App/iOS/obj/iPhone/Debug/build-iphone4.1-9.2.1/mtouch-cache/Build/AWSSDK.Core.dll' (MT3001) (My_App.iOS)
I would really appreciate some suggestions as I haven't made much headroom with this...
Try disabling "Linker" in the build options for Device builds. It's possible that if you are not directly referencing the library, the linker is stripping it out, causing it to fail at runtime.
I just had the same problem after switching from the simulator to an actual device
Fortunately, I've gotten the error only in 3 pages...
Fix was to remove the assembly attribute from the XAML:
From
xmlns:viewModels="clr-namespace:XXX.ViewModels;assembly=XXX"
To
xmlns:viewModels="clr-namespace:XXX.ViewModels"
I'm trying to use Npgsql in a mono app (built for Mac in Xamarin Studio). I was previously using Npgsql 2.x, and that worked OK for me, though gave us cryptic errors related to SSL on another machine. So yesterday I upgraded to the latest (3.0.5) version of Npgsql, but now when I try to build, I get an error:
error MM2002: Failed to resolve
"System.Security.Cryptography.CngKeyBlobFormat
System.Security.Cryptography.CngKeyBlobFormat::get_EccPublicBlob()"
reference from "System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
I posted about this on the Xamarin forums, and was told "Poking around mono, mcs/class/System.Core/System.Security.Cryptography/CngKeyBlobFormat.cs exists but is not included in any build currently."
I'm still relatively new to mono, and don't know how to proceed from here. What do I need to do to use Npgsql in my mono Mac app?
"Poking around mono, mcs/class/System.Core/System.Security.Cryptography/CngKeyBlobFormat.cs exists but is not included in any build currently."
It means that the class is not included in this file.
Now, given that this class is in Microsoft's sources, you should create a pull request that links to that class (via relative path, like other classes are linked already), and remove the old Mono implementation.
NOTE: After you create your pull request (which is easy enough), you will be notified by a Jenkins bot if your change breaks the build or not. If it breaks it, most probably it will be because this class depends on some other one (then, to fix it, just add a new entry in the .sources file; keep doing this until it passes).
UPDATE: Given that you seemed unwilling to contribute to fix the problem yourself, I went ahead and fixed it myself proposing this pull request, which has been merged today. This means that Mono 4.3 (or 4.4) will contain the fix.
I've recently been tasked with adding a report to an older WPF application. Part of the process involved adding ActiveReports to the solution in question.
After getting the report implemented and tested on my local machine, it came time to commit it up to our Dev/Test build environments. Everything went fine, until I attempted to run the application on a machine that did not have ActiveReports installed and licensed on it - I got the "Viewer needs to be licensed error window."
Here's where things get confusing, though. It should be working.
For starters, I'm running ActiveReports 8.0.133.0.
The contents of my licenses.licx file are:
GrapeCity.ActiveReports.SectionReport, GrapeCity.ActiveReports.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
I've generated a satellite licensing DLL for the WPF project's executable, and ensured that it's referenced and set to Copy Local = true. (I've already dealt with this in the past.)
Even though it's not a web project, for safety's sake, I used the WebKey Generator and added an Active Report 8 Developer key to the app.config file.
It gets more interesting, though. When I add the following lines to my licenses.licx file, as the error window I get above suggests I should do:
GrapeCity.ActiveReports.Viewer.Win.Viewer, GrapeCity.ActiveReports.Viewer.Win.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
GrapeCity.ActiveReports.Viewer.Wpf.Viewer, GrapeCity.ActiveReports.Viewer.Wpf.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
When I try to simply build the project in Dev, the build fails with the following message:
[10:29:34] [exec] (CompileLicxFiles target) ->
[10:29:34] [exec] Properties\licenses.licx(2): error LC0004: Exception occurred creating type 'GrapeCity.ActiveReports.Viewer.Win.Viewer, GrapeCity.ActiveReports.Viewer.Win.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff' System.ComponentModel.LicenseException: License cannot be confirmed. Error code: 01-001 [C:\CheckoutDirectory\Project\[(0) BUILD]\UI\UI.csproj]
[10:29:34] [exec] Properties\licenses.licx(3): error LC0004: Exception occurred creating type 'GrapeCity.ActiveReports.Viewer.Wpf.Viewer, GrapeCity.ActiveReports.Viewer.Wpf.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff' System.ComponentModel.LicenseException: License cannot be confirmed. Error code: 01-001 [C:\CheckoutDirectory\Project\[(0) BUILD]\UI\UI.csproj]
For those who don't want to scroll:
System.ComponentModel.LicenseException: License cannot be confirmed. Error code: 01-001
The end result is a sort of Morton's Fork of badness. Either I can build the app, but I can't run the report (which, is sort of the point of me making these changes), or I simply can't build the app at all.
Question: What can I do to get the report viewer to run without a license exception and keep the application building? I should also note, I'm on a short deadline with this!
I was correct to add the Win and WPF viewer lines; it turns out the answer was to upgrade the Build server with Active Reports 8. From there, everything went swimmingly.
TL;DR - Upgrade everything that needs to be upgraded!