I'm trying to create simple DataAccess portable class library for 3 platforms (ios, android, wp7.5).
All I want is to create webrequests, convert data and return it to UI of each platform.
I was able to create library like this (portable) under Mac OS X Xamarin Studio and successfully used it at iPhone app.
But then I opened this solution under Visual Studio (to add Windows Phone UI project) it gave me build error with description that it couldn't find System.Net namespace.
When I checked portable class targets I was surprised to see there even XBOX selected:
When I selected correct targets (MonoDroid/Monotouch/WindowsPhone7.5) I was able to compile but when I start the app I received the following error:
"c:\Downloads\Noname.CrossXam\Noname.CrossXam\Noname.CrossXam.iPhone\Noname.CrossXam.iPhone.csproj"
(_RemoteBuild target) (1) -> (_ResolveAssemblies target) ->
C:\Program Files
(x86)\MSBuild\Xamarin\iOS\Xamarin.MonoTouch.Common.targets(68,3):
error : Exception while loading assemblies:
System.IO.FileNotFoundException: Could not load assembly 'System.Net,
Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
Perhaps it doesn't exist in the MonoTouch profile? ...
0 Warning(s)
1 Error(s)
Same code (same solution) works just fine under Mac OS X with Xamarin Studio.
Sample solution is here:
https://dl.dropboxusercontent.com/u/19503836/Noname.CrossXam.zip
Please advise.
The issue was in System.Net.dll assembly which is not exists under MonoTouch & MonoAndroid profiles. But that classes are implemented at System.dll under those profile and to make it work you need TypeForwardedToAttribute.
All that type forwarding configuration exists at MVVMCross nuget package which I was able to install only after updating nuget (the last comment from this post: http://slodge.blogspot.com/2013/04/my-current-pcl-setup-in-visual-studio.html)
So there were two issues:
1. Old nuget package manager (update is required)
2. TypeForwardedToAttribute configuration (exists at MvvmCross)
Hope it will be useful for someone.
Have you tried to change target framework to .Net 4.5? You should see Profile104 in your .csproj file
Related
I cannot successfully compile an extension library that is freshly created using the Customization Project -> Extension Library -> Create New.
When compiling the freshly created extension library, I get the following error in the output, but no errors show in the error report:
1>C:\Program Files (x86)\Acumatica ERP\SilcotekDev\App_Data\Projects\ManufacturingTest\ManufacturingTest\Test.cs(6,7,6,9): error CS0246: The type or namespace name 'PX' could not be found (are you missing a using directive or an assembly reference?)
I have another custom extension library which had compiled successfully in the past, but today is not. Here is the full error list from that project's compilation:
I do have a custom DAC which I imported directly into the extension library, and I had compiled it before with that DAC added. Today it won't compile at all.
With update 3 of version 6.1 Acumatica has changed the target framework for its websites from 4.5.1 to 4.5.2. Unfortunately, the target version of the Addon.csproj VS project from the \App_Data\WebsiteSolution\Addon folder was not updated to .Net Framework 4.5.2 until update 9 of ver. 6.1 (build #6.10.0945). Because of the lower target version set for extension library VS project, VS cannot build the dll and therefore copy it to the Bin folder of your website.
There are 2 ways to resolve this type of an issue:
Change target framework version in VS for your extension library project:
Open the Addon.csproj VS project in a text editor, like NotePad, and change the target framework to v4.5.2 as shown in the screenshot below (located in the \App_Data\WebsiteSolution\Addon folder inside your Acumatica website root folder). Create a new customization project inside Acumatica, then in Customization Manager create extension library for the new project
There are a lot of things that could cause this problem.
1. is your program set up to read the PX namespace?
2. are you References setup the right way. You can always check by right clicking on the reference and selecting "Add reference"
I'm developing an app with C# & Visual Studio 2015 Community for windows 10.
I was trying to create a package for store (appxupload file) but it gives me error:
Loading assembly "C:\Users\Ramtin\.nuget\packages\System.Private.Uri\4.0.0\runtimes\win8-aot\lib\netcore50\System.Private.Uri.dll" failed. System.IO.FileNotFoundException: Could not load file or assembly 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Invalid Resx file. String reference not set to an instance of a String.
Parameter name: suffix MyAPP C:\Users\Ramtin\.nuget\packages\System.Private.Uri\4.0.0\runtimes\win8-aot\lib\netcore50\System.Private.Uri.dll
how can I solve this?
note: I have individual account for develop
I haven't received this error myself, but you should verify that you have the latest Windows 10 SDK installed and latest VS2015 updates.
Visual Studio 2015 Update 2 just came out last week: https://www.visualstudio.com/en-us/news/vs2015-update2-vs.aspx
When you launch VS2015, check the notifications area on the top right for any newly available updates.
When you click File | New | Project in VS2015, check the list of Universal project template types and look to see if there's a list item that prompts you to download the latest SDK.
My screenshot below shows the template types and also the (optional) Template10 that I have available to me. If you don't have the latest SDK, you should see an additional entry that prompts you to download the latest SDK (as opposed to creating a new project)
After verifying that you have the latest of everything, try generating a new package again and please comment below to let us know whether it worked (or if you are still getting errors).
I want to use SmartThreadPool in a Mono for Android Application. Unfortunatley I am getting an error, when I reference the SmartThreadPool.dll from the project:
C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(2,2):
Error: Exception while loading assemblies: System.IO.FileNotFoundException:
Could not load assembly 'System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for
Android profile?
File name: 'System.Web.dll'
at Monodroid.Tuner.MonoDroidResolver.Resolve(AssemblyNameReference reference,
ReaderParameters parameters)
at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(List`1
assemblies, AssemblyDefinition assembly)
at Xamarin.Android.Tasks.ResolveAssemblies.Execute()
I already tried to put the library under the Assets folder and set its BuildAction to AndroidAssets as read in http://adnankhan12.wordpress.com/2012/10/23/android-mono-error-using-other-dlls-novell-monodroid-common-targets. But still it does not work.
At the moment, I am not able to use SmartThreadPool, but on the webpage of the project mono support is stated explicitly. So what am I missing or doing wrong?
Can somebody help me?
Thanks in advance.
According to the API Reference documentation the only class accessible from the namespace System.Web is HttpUtility class.
You might be right that Mono does have SmartThreadPool, however it is not included in Mono for Android and MonoTouch.
You can see which assemblies ship with Mono for Android here, and for MonoTouch here.
EDIT:
Also the DLL you are referencing is not built with either the Mono for Android or Monotouch compile and hence you will have troubles referencing it in your project. You also need to be aware of dependencies it might have.
I have a project using Reactive Extensions and ReactiveUI. I upgraded to the pre release version and I have the following line of code
OAPHCreationHelperMixin.ObservableToProperty(observable,
Function(x) x.Value
Visual studio tells me there is an error here on the method ObservableToPropertyin that the following assembly is missing
Error 9
C:\Users\phelan\workspace\WeinMeasEval\WeinMeasEval\Global\ObservableBinding.vb
Reference required to assembly
'System.Reactive.Interfaces,
Version=2.0.20823.0,
Culture=neutral,
PublicKeyToken=31bf3856ad364e35'
containing the type 'System.Reactive.Concurrency.IScheduler'. Add one to your project.
Now I click the link which suggests it will add the reference and then nothing
happens. If I look in my project references I see that the assembly is indeed
in the assembly list and it is the correct version 2.0.20823.0 and if I look on
the path the DLL is indeed there.
Any ideas?
This is now fixed, check out ReactiveUI 4.0 Preview 5
It turns out that at this date reactive UI is not built yet for .NET 4.5 as the developer is having some build issues.
As a work around I build it myself by pulling the repository from Git and referring to the core library directly from within my .NET 4.5 project.
This seems to work at the moment. YMMV
Do you have Target Framework set to full .net or to Client Profile (in project settings)?
I am trying to deploy a Visual C++ application (developed with Microsoft Visual Studio 2008) using a Setup and Deployment Project. After installation, users on some target computers get the following error message after launching the application executable: “This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem.” Another user after installation could run the application properly. I cannot find the root cause of this problem, despite spending several hours on the Visual Studio help files and online forums (most postings date back to 2006). Does anyone at Stack Overflow have a suggestion? Thanks in advance. Additional details appear below.
The application uses FLTK 1.1.9 for a GUI library, as well as some Boost 1.39 libraries (regex, lexical_cast, date_time, math).
I made sure I am trying to deploy the release version (not the debug version) of the application. The Runtime library in the Code Generation settings is Multi-threaded DLL (/MD).
The dependency walker of myapp.exe lists the following DLLs: wsock32.dll, comctl32.dll, kernel32.dll, user32.dll, gdi32.dll, shell32.dll, ole32.dll, mvcp90.dll, msvcr90.dll.
In the Setup and Deployment Project, I add the following DLLs to the File System on Target Machine: fltkdlld.dll, and a folder named Microsoft.VC90.CRT with msvcm90.dll, msvcp90.dll, mcvcr90.dll and Microsoft.VC90.CRT.manifest.
The installation process on the target computers getting the error message requires having the .Net Framework 3.5 installed first.
Any suggestion? Thanks in advance!
Add the Visual C++ Redistributable to your Deployment project and be sure to run Setup.exe instead of the MSI when installing. This will invoke the VCRedist bootstrapper to ensure your PC has those pieces before installing your app.
Dependency Walker only shows static (link time) dependencies - it cannot possibly know about dynamic dependencies such as COM objects.
I had a similar problem after the ATL security updates last year. My app needed a later version of the C++ runtime libraries than the deployment project included.
Try running Windows Update on the target machines after installation, or download and install the latest (28 July 2009) C++ redistributable package directly.
http://support.microsoft.com/?kbid=973551
That solved the problem for me. I haven't fixed the deployment project yet though.