Questions tagged [shared-project]

A Visual Studio 'Shared Project' allows code and assets to be shared amongst other projects.

Shared Project is a new project type that first appears in Visual Studio 2013 Update 2. The code (and assets) in a shared project are included in other projects at compile time.

This may be used as an alternative to Portable Class Libraries, such as when sharing code amongst projects which in their entirety are not cross-compatible.

For example, a solution which has multiple projects that build separate executables for alternative platforms (such as Android and iOS). The Shared Project may hold common code and assets that work on both platforms.

95 questions
1
vote
0 answers

Not able to access interface defined with in same shared project c#

I was having a requirement to create a common project and use it for multiple applications. I have used class libraries for this before. So this time, wanted to explore Shared Project. I created one Shared Project. I created one interface and want…
Priya
  • 1,375
  • 8
  • 21
  • 45
1
vote
1 answer

Binding data of multiple classes to single list view/xamarin forms

Hello how can i bind data of multiple classes to a single list view through xaml. I sucessfully bind data from single class to a lisview but when i try to bind data of more than one classes it didn't show anything in xaml.
1
vote
2 answers

Shared project - not compiling

Recently I learned about shared projects and how I can separate large chunks of my code (ie: all my UI controls) into another area to clean my up main code without adding a dll to my execution path. AMAZING, except it only partially works. If I move…
Adam
  • 19
  • 1
1
vote
0 answers

Choose which compiler to use when compiling individual files in the Shared Project?

I have one Windows project, a Linux project and a Shared Project referenced by both the first two projects. I've set up everything necessary to build the Linux project with a Remote Debugger. Now when I try to compile a file individually in the…
1
vote
1 answer

Reference shared project in dotnetcore classlib, and have the build work on windows and linux

My goal is to reference a shared project from a dotnetcore class library. In order to do this I opened my solution that I made on linux with .NET Command Line Tools (1.0.4) in visual studios 2017 on windows, since I read that vs2017 supported…
BillHaggerty
  • 6,157
  • 10
  • 35
  • 68
1
vote
0 answers

Connect Xamarin Cross-Platform project to OData Service

I am using Visual studio 2017 Xamarin Cross-Platform template. This should connect to an OData. So I added these NuGet Packages: Microsoft.data.odata (v 5.8.2) Microsoft.odata.Client (v 6.16.0) There is no error yet. But: According to xamarin…
1
vote
1 answer

Xamarin shared projects or Add as Link?

If I understand correctly Xamarin shared project allows us to share code between Xamarin mobile projects (Android, iOS, Windows Phone). What are the options if I need to share source files between Xamarin projects and some other project types (like…
Maxim
  • 13,029
  • 6
  • 30
  • 45
1
vote
2 answers

How to use Custom Renderer in Xamarin Shared Project

I am using Shared Project for my cross platform mobile application and want to use Custom renderer in my app for native support. Is there any way i can use Custom renderer in my app.
1
vote
0 answers

Xamarin forms location of Grid or Button on screen

I have been trying for a while to find the exact location of a grid and the button inside the grid I have on my screen. It is within many layers of Grids and StackLayouts, which have varying paddings. I have tried using absolute layout, but it never…
1
vote
1 answer

Xamarin - How to create a shared page that I can include into a GridView in non-shared project?

I would like to know if it's possible to create a page that I can include (such as a fragment in Android) into a gridView. I also want to know if I can interact with it from my current page/activity? Xamarin, Visual Studio 2015, Non-Shared…
Emixam23
  • 3,854
  • 8
  • 50
  • 107
1
vote
0 answers

Can I store resources and Windows Forms in a Visual Studio Shared Project?

I've got ProjectA. It has a WinForm and some .resx files in it. I created a Shared Project (ProjectA-shared) and moved everything to it. ProjectA references ProjectA-shared. When I compile the Solution with VS2013 and the Shared Project plug-in, …
Steve Dunn
  • 21,044
  • 11
  • 62
  • 87
1
vote
1 answer

Migrating shared project from VS 2013 to 2015

We have a solution on VS 2013 that contains a shared code project type (https://github.com/firstfloorsoftware/mui). We made some minor changes in this code and it has being part of our solution for a while. Now I want to open this project in VS…
Igor Kondrasovas
  • 1,479
  • 4
  • 19
  • 36
1
vote
0 answers

Android Spotify API breaks Xamarin runtime with exception

I have stripped down my Xamarin android app in the hopes of solving why I am getting a null pointer exception in a very specific case. It includes two java binding projects and one shared code project. Please checkout and run this solution…
Fhl
  • 1,079
  • 1
  • 12
  • 26
1
vote
1 answer

Missing Visual Studio Project Template for Xamarin Shared Project

Visual Studio 2013 with update 4 does not show a shared project template. I only have the Xamarin forms project templates. I just installed a fresh update of Xamarin this morning. Based on what I've found so far, this used to be an issue with VS…
1
vote
2 answers

Reference something from a shared project

So I am using Xamarin to create an Android App. All the android "stuff" will be in the Android project and I have created a Shared Project to house the business logic, so that I will be able to use it should I have to create an IOS app. I have…
Percy
  • 2,855
  • 2
  • 33
  • 56