monotouch xamarin referenced project resource files not copied to app bundle - xamarin.ios

As we're accumulating more and more custom components we've started to split these components out into their own projects / assemblies so we can use them elsewhere easily. I've stumbled across a problem with resources for these components.
I've split out a component and this component has several images for the UI. I've taken the images across into the new project which is a class library and marked all the images as "BundleResource".
This project is referenced by our main application but since doing this the images cannot be loaded. When calling UIImage.FromFile("TheImage.png"); this just results in a null reference. I've checked the bundle in the MTBS directory of my mac build host and the images have not been copied into it. This is clearly the problem.
Has anyone come across this and found a way to make sure that Resources in referenced projects are copied to the iOS app bundle?
Obviously we can get around this by linking the resources in the referencing project but that's a bit of a nasty workaround.

It is a bug with the Mac Build Server. Cleaning solution, rebuilding and redeploying helps.

Related

How to publish solution with class library projects in IIS

I have an Asp.Net Web Api solution with 3 class library projects that are referenced from the main project. I have published the main project to another server on site - MySite/Main. I am unable to figure out how to publish the class library projects to location like so -
MySite/CL1
MySite/CL2
MySite/CL3
This shall enable the main project to reference them properly. How should I go about it?
When you build your web project all the referenced libraries are being copied to the bin folder (check for yourself). This folder is also being published.
If you use IIS it will automatically look for assemblies in the bin folder so you shouldn't worry about making the folder structure to be the same as in your local environment.
So the only thing you should worry about is referencing libraries properly.
The website project is the only one which should be published. You don't need to publish class libraries (I don't think you can do this using Visual Studio)

I am having difficulty getting a new version of a 3rd party SDK to import into Android Studio

I am having difficulty getting a new version of a 3rd party SDK to import into Android Studio.
In the earlier version they released .jar and .so files which I copied into /lib and /jniLibs and then added the lib files into the Android Studio app and everything worked. The app ran, used the libraries and all was good in the world. Recently a new version of this SDK was released but in this new release they have resource files (but they are not compiled into the jar/so files; there is a $Rstring.class files that they say I should import. I've now spent days copying into various locations in the app project with no luck and the missing strings result in crashes when calling their SDK.
OK, I figure I'd try to import their SDK folder (which is how they document to do it if you are using Eclipse). Well, no matter what I've tried and after selecting the folder or SDK's project file I get a dialog asking for the Eclipse workspace and a list of what appears to be source file names. I can't get past this dialog because obviously I don't have their files.
Has anyone run into this and found a solution; perhaps I'm missing something in the process but after spending the better part of 3-4 days trying and searching and trying more things I'm hopeful for help from the community.
OK, I found the answer and it was a combination of issues in how this particular 3rd party distributed the SDK and not fully understanding the menu.
The 3rd party in question packaged the SDK with the output files of the build as well as files that needed to be imported making an import alone to not work.
Combine this with menu confusion: File->Import Module is NOT the same as New->Modules->Import Existing Project only added to the confusion.
The solution ended up being to use the File->Import Module which appears to be a very different operation and once done most of the issues where solved. It solved the main issues I asked above which was missing resourced.
Still missing was the library (.jar) files which had to me copied into the app's lib folder and "added as library" but the .SO files did not need to be copied and in fact doing that resulted in a duplicate files warning.
I'm not sure I can fully explain what happened but what I think happened is that the "module" was where the app read the .so and string resources from but was unable to load the .jar files because (I suspect) these files where not part of the module but rather where outputs of building the source and it was removing the source files which caused the inability of the new->Module->Import to fail.
Hopefully this makes sense or at least give someone an idea of what to look for when/if they run into a similar issue.

Including a .targets file in the universal app shared project to include a custom build action

In separate Windows 8.1/Windows Phone 8.1 projects, including the SharpDX.targets file from the SharpDX repo includes all of its content build actions in each project. Doing the same in the shared project in a universal app doesn't work (project reloads successfully but tools are no in the Build Action list).
Is there an alternate solution to keeping the content in the shared project rather than keeping copies in each of the W8.1/WP8.1 projects just because there is no centralized way of building it?
No, a shared project in a universal app is never really built. It's merely a container of files to be shared into each of the specific projects. If you have custom build actions, you need to include them in each specific project (that requires them).

ServiceStack GitHub Code Branches confusing & lot of repetitive folders everywhere

So I'm looking at the list of projects here:
https://github.com/ServiceStack
I see all the individual projects for download (e.g. ServiceStack.Text, etc.)
But then there's a main "ServiceStack" download and I noticed it contains in it's src folder a ton of ServiceStack projects including the base projects such as Common but leaves some out (like it doesn't have ServiceStack.Text). Furthermore, the projects in src are using names like SL4, SL5 which is prob the versions? This is totally misleading and confusing.
So I created my own solution, downloaded individual projects and added them to my solution. Ok, do I do that or do I use the main ServiceStack download..I mean I see repeat of things all over such as again there is an src\ServiceStack.Common in the ServiceStack download and so on.
How the heck are we supposed to be including this stuff...via individual projects or just use that one huge ServiceStack folder on this download page?

Which project file element specifies a WinRT class library project and not .NET?

I have a WPF class library that I want to port to be a WinRT class library. My plan is to copy the project, edit the project file so that it's a WinRT project instead of WPF, and see where I stand.
However, I cannot find which element in the project file makes it a WinRT project, and not .NET. Any ideas?
I've tried everything including diffing the project file with a WinRT class library project file, and slowly changing it over, but the WPF project never switches to WinRT in VS's eyes.
Sorry if this sounds nuts, I'm looking for the quickest way to find out how much work I need to do to port across.
Thanks
I'd take a different approach to that:
First I'd create a new Windows Store apps class library project.
Then I'd copy all the files from the existing WPF class library folder to the new Windows Store apps class library project folder (without overwriting any of existing files)
In the Solution Explorer window I'd enable Show All Files to see all the copied files and folders.
I'd multi select all the items in the treeview that belong to the project and click on Include In Project from the context menu.
At this point the only thing potentially still missing would be settings at the project level such as conditional compilation symbols and missing references which could easily be added by comparing both projects in Visual Studio or just trying to compile the new projects and seeing what goes wrong.

Resources