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
29
votes
4 answers

Why can't I create Shared Project in Visual Studio 2015?

I downloaded visual studio community 2015. I tried to create a Shared Project and am getting an error: Content from Microsoft.Windows.UI.Xaml.CSharp.targets
kriper
  • 1,034
  • 2
  • 12
  • 23
23
votes
1 answer

Xamarin Shared Library and PCL

What is the exact difference between xamarin shared project and portable class library? When to use shared library and when to use portable class library? Is this possible to write native functionality in shared projects like showing alert,accessing…
PC Parker
  • 257
  • 2
  • 7
23
votes
1 answer

Visual Studio 2015 - Shared Projects Reference Tab Missing on Web Project

I upgraded to Visual Studio 2015 from our MSDN subscription because I was pretty excited to read about Shared Projects... No more managing 21382 nuget packages in our dependencies when all we want to do is reuse code. So I built a test shared…
Ryan Mann
  • 5,178
  • 32
  • 42
16
votes
2 answers

Can't add Shared Project to Visual Studio Test Project

I'm using Visual Studio 2015 I have a Shared Project as an Independent Solution (A collection of Extensions used in several others Solutions). I want to TEST the Shared Project (Independently any other solution). So, I add a new TEST Project. But,…
15
votes
3 answers

Shared projects and resource files

We have a solution with a shared project that is referenced by two other projects. In the shared project, we have resx files, but we noticed the code-behind Designer.cs file is not updated when adding or modifying terms in the resx. Apparently,…
Verthosa
  • 1,671
  • 1
  • 15
  • 37
7
votes
2 answers

How do I reference a Visual Studio Shared Project in a .NET Core Class Library

I have created a number of Shared Projects and am testing whether these can be shared among all the different project types as I hope and expect. I've managed all of them so far (sometimes with a little workaround), but I can't yet figure out how to…
Arwin
  • 973
  • 1
  • 10
  • 21
6
votes
1 answer

Shared project with T4 template

I am big fan of shared projects and I want to use T4 templates similarly: reference shared project in different solutions and get access to generated content without hassle. How to make T4 templates work in shared projects?
Sinatr
  • 20,892
  • 15
  • 90
  • 319
6
votes
3 answers

Referencing shared project in several projects of solution

I am trying to fix warning Warning CS0436: The type 'Class1' in '...\SharedProject1\SharedProject1\Class1.cs' conflicts with the imported type 'Class1' in 'ClassLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type…
Sinatr
  • 20,892
  • 15
  • 90
  • 319
5
votes
0 answers

Visual Studio Shared Projects Images/CSS

I have a Shared Project and a .net Core 2.0 web app which references the shared project. My intention is to maintain a set of common css and images within the shared project for use by multiple web apps. But I can't work out how to include the…
5
votes
3 answers

Shared project with resource dictionary (xaml)

I am looking for a way to share ResourceDictionary between projects. Adding new item to shared project doesn't offer resource dictionary. It can be created in other (main) project and dragged. But then I can't change its build options to Page: The…
Sinatr
  • 20,892
  • 15
  • 90
  • 319
4
votes
2 answers

Custom View with Bindable Property not binding properly on Xamarin.Forms SAP

I have a checkbox that's supposed to fire the IsEnabled event of a button. But somehow the command that's supposed to do that never gets properly binded and therefore executed. This is the bindable property in CheckBox.xaml.cs (the control): public…
Ivan
  • 57
  • 11
  • 26
4
votes
0 answers

Visual Studio 2015 and Shared Projects on Windows 7

When I try to create a Shared Project in Visual Studio 2015 I get the same error dialog as in this post. Why can't I create Shared Project in Visual Studio 2015? Unfortunately I'm on Windows 7 so I don't get the "Windows 8" project template option…
Craig W.
  • 17,838
  • 6
  • 49
  • 82
4
votes
0 answers

Localizable strings in Visual Studio's Shared Project

I'm trying to utilize a Shared Project concept to share the client application logic between WPF project and Android (Xamarin.Forms). In both projects I want to use the same localizable texts, therefore, it looks logical for me to move resource file…
ie.
  • 5,982
  • 1
  • 29
  • 44
4
votes
1 answer

Is it possible to reference a shared project from another shared project?

I'm looking at the new shared Project Feature in Visual Studio 2013. It's a pretty nice Feature, but how can I use code from a "Base" shared Project in a "Higher Level" shared Project? Looks like the referencing feature is missing in shared…
Markus
  • 2,184
  • 2
  • 22
  • 32
3
votes
2 answers

C# Using references/class library in a shared project

I have just learned and created a shared project in visual studio 2017. I have noticed that the shared project did not have the "Reference" to refer to other resources (other projects, class library, …). I even take a look at the .shproj file and…
Thế Long
  • 516
  • 7
  • 19
1
2 3 4 5 6 7