shared-project

Newtonsoft.json serializing and deserializing base/inheirited where classes are from shared projects

血红的双手。 提交于 2020-01-13 19:41:08
问题 So I have two classes like the ones below. They are both in the same namespace and in the same shared project. public class Person{ public string Name{get;set;} } public class EmployedPerson : Person{ public string JobTitle{get;set;} } When I serilize these items into rabbitmq I am serializing as the base class like so: JsonSerializerSettings settings = new JsonSerializerSettings { TypeNameAssemblyFormatHandling = TypeNameAssemblyFormatHandling.Simple, TypeNameHandling = TypeNameHandling

Shared Project with RC update 2 for Visual Studio 2013

▼魔方 西西 提交于 2020-01-04 15:28:21
问题 I recently installed the RC update 2 for Visual Studio 2013. When going through the template for a universal app I found a project *******.Shared which had an extension .shproj . When going through some material online what I found was it is - a project template to share code and files, which I thought is so cool. But as I started working on it, I hit a roadblock. How do I add references to this project? Has anyone worked this out? 回答1: There is no need to add references for the shared code.

Xamarin Forms Notification

梦想与她 提交于 2019-12-25 16:47:49
问题 I try to realize a shared project with Xamarin Forms for Android, ios and WinPhone. I want to use notifications and I followed this sample (https://github.com/edsnider/Xamarin.Plugins/tree/master/Notifier) and was able to create a local notification in Android. But i still do not understand how to work with that like Android application. Open a page or check if the page is already active or abort a broadcast for all platforms. Any links that could help me? Am I correct that it only works with

Can't add Shared Project to Visual Studio Test Project

眉间皱痕 提交于 2019-12-21 07:29:46
问题 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, in my TEST Project I can't add ANY reference to the Shared Project (No option). 回答1: You can edit the project's csproj file and at end of imports add an entry like <Import Project="..\SharedProject\SharedProject.projitems" Label="Shared" /> changing

Can't add Shared Project to Visual Studio Test Project

ε祈祈猫儿з 提交于 2019-12-21 07:29:07
问题 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, in my TEST Project I can't add ANY reference to the Shared Project (No option). 回答1: You can edit the project's csproj file and at end of imports add an entry like <Import Project="..\SharedProject\SharedProject.projitems" Label="Shared" /> changing

Shared project with resource dictionary (xaml)

六眼飞鱼酱① 提交于 2019-12-19 08:54:32
问题 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 idea is to load resource dictionary like this var dictionary = new ResourceDictionary(); dictionary.Source = new Uri("/WpfApplication91;component/Dictionary2.xaml", UriKind.Relative); This is obviously fails currently with An exception of type

Visual Studio 2017 cannot create or open .shproj (shared Project) files

丶灬走出姿态 提交于 2019-12-11 14:48:49
问题 I have recently upgraded to Visual Studio 2017 version 15.6.3. After doing so (and fixing a bunch of other issues), I can no longer open or create .shproj files. My existing projects say (load failed) next to each shared project file, and I have the following in my output window whenever I try reloading the project: C:\File\Path\Project.Shared.shproj : error : Expected 1 export(s) with contract name "Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectFactory

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

久未见 提交于 2019-12-07 08:39:03
问题 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 static readonly BindableProperty CheckBoxCommandProperty = BindableProperty.Create<CheckBox, ICommand>( checkbox => checkbox.CheckBoxCommand, null, propertyChanged: (bindable, oldValue, newValue) => { CheckBox checkbox = (CheckBox)bindable;

Newtonsoft.json serializing and deserializing base/inheirited where classes are from shared projects

假如想象 提交于 2019-12-06 07:56:29
So I have two classes like the ones below. They are both in the same namespace and in the same shared project. public class Person{ public string Name{get;set;} } public class EmployedPerson : Person{ public string JobTitle{get;set;} } When I serilize these items into rabbitmq I am serializing as the base class like so: JsonSerializerSettings settings = new JsonSerializerSettings { TypeNameAssemblyFormatHandling = TypeNameAssemblyFormatHandling.Simple, TypeNameHandling = TypeNameHandling.Objects }; JsonConvert.SerializeObject(input, settings) However when deserializing I run into issues. I

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

大兔子大兔子 提交于 2019-12-05 13:06:23
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 static readonly BindableProperty CheckBoxCommandProperty = BindableProperty.Create<CheckBox, ICommand>( checkbox => checkbox.CheckBoxCommand, null, propertyChanged: (bindable, oldValue, newValue) => { CheckBox checkbox = (CheckBox)bindable; EventHandler<bool> eventHandler = checkbox.CheckedChanged; if (eventHandler != null) { eventHandler(checkbox,