Adding Silver/Swift file to existing VS C# project

Good day,

Similar to this question - Using Swift and C# together - but for VS 2015. I have an existing C# project I would like to start adding Silver/Swift code to. I tried it, but there is some magic in VS I am not familiar with to tell it how to build and link the Swift code.

Can this be done? If so, how?

Thank you.

You can’t add Swift to a Visual C# project, because VC# uses Micrssoft’s compiler. What you can do is create a RemObjects C# project, move/copy your .cs files to it, and then add Swift files to it as well. Does that work for you?

yours,
marc

Very good idea. That will work as long as it can import and call all the modules I need, and it doesn’t give me any license warnings or errors (I have not paid anything [yet] for Elements [I expect to if this passes the prototyping phase though, because I appreciate all you have built here]).

Okay, that partly worked. There is a license trial for the C# , but it only has templates for Windows projects.

To be honest, I was trying to do something I thought would be pretty slick: use Silver in VS over .NET and use Xamarin.Forms to write a cross-platform mobile app. That would be pretty slick.

But I suspect that there are some internal magical incantations I would have too get right to make things work right. That is, I do not know how projects are tagged to target iOS, Android and how to ensure the support files - .xcassets, info.plist, etc. are handled properly in a .NET/Silver hybrid. Perhaps something to go into a wishlist…

That should work fine, yes. But indeed, we don;t have any ready-to-use file templates for Xamarin.

There’s two roads not iOS/Android; using just Elements, you would normally target iOS and Android directly, natively. This would not be using .NET at all.

But you can also use the .NET backend of our compiler plus Xamarin, to build apps. As far as Elements would be concerned, everything is a .NET (not an iOS or Java/Android) project, then. And you’d use Xamarin’s toolchain tom get your .NET code to run on iOS and Android (Xamarin should not carte what language it’s written in, as long as it builds to a .dll with .NET code).

does this make sense?