multitargeting

.NETStandard multi-targeting library packages do not get restored when building

こ雲淡風輕ζ 提交于 2021-02-10 05:44:15
问题 Background: I have created a multi-targeting library that targets net40 , net462 , and netstandard2.0 . The purpose of this library is to wrap StackExchange.Redis and some related reconnect logic. For net40 I need to use an older version of the package than the newer targets. Here is my csproj file: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net40;net462;netstandard2.0</TargetFrameworks> </PropertyGroup> <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">

XCode: Two targets, two main files?

℡╲_俬逩灬. 提交于 2020-01-14 15:04:52
问题 I'm working up a game in XCode, and I want to add a helper application that uses the main application's various classes to build the main application's data files. Specifically: The main application is a card game. I want a helper app that uses the classes such as card.m while it creates the deck.xml files for the deck of custom cards the game uses. My intuition is that the natural way to do this is to add a second compile target to the application, "Card Adder", to build this xml file.

VS2008 targeting .NET 2.0 doesn't stop me from using C# 3 features

喜夏-厌秋 提交于 2019-12-10 17:16:38
问题 I had a VS2005 solution and wanted to get off VS2005 for the new year. I was mostly happy with the upgrade process and pleasantly surprised to see that my build scripts mostly still worked. My question is around the multi-targeting feature - I don't have .NET 3.5 installed on my servers, so I have to continue to target .NET 2.0. That worked, mostly, but I found that I could do things like var returnMe = "result: " + result.ToString(); ...and still debug the project successfully. When I got

Conditional reference in Visual Studio Community 2017

我怕爱的太早我们不能终老 提交于 2019-12-10 01:45:45
问题 I am creating a multi-platform application. I have a multi-targeted shared library (targeting .netstandard 2.0 and .net 4.5)...See project file: <PropertyGroup> <TargetFrameworks>netstandard2.0;net45</TargetFrameworks> </PropertyGroup> When I build the project in visual studio 2017 on windows, I get two directories in the output (netstandard2.0, net45) and the corresponding dlls. The build is a success. When I build the exact same project (same code) in visual studio 2017 on a mac, I get

Best practices for creating both mouse and touch-oriented WPF application [closed]

人走茶凉 提交于 2019-12-08 01:38:56
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . There is a need to develop WPF application which will support both mouse and touch input. I'm looking for an approach that will enable

Dynamic class loading to target multiple Android versions

天大地大妈咪最大 提交于 2019-12-06 14:13:37
问题 I would like to make a single Android app for multiple Android versions (possibly every one of them) My problem is that I want to check what is the version of Android the app is currently running on, and dynamically load a class which is version dependent. This part should be ok. I just wonder how I can achieve that without compilation errors in my Eclipse project. I mean, the project is configured for a particular target (1.5, 2.1 ...), so if a class in my project is not compatible wich the

Best practices for creating both mouse and touch-oriented WPF application [closed]

為{幸葍}努か 提交于 2019-12-06 07:49:06
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . There is a need to develop WPF application which will support both mouse and touch input. I'm looking for an approach that will enable maintaining single codebase and minimize pain to implement that. Some framework or build configuration

Can my .Net app reference two different versions of a .net framework library?

倖福魔咒の 提交于 2019-12-06 01:29:44
问题 Say I have two projects, P4 and P3, targetting .net 4.0 and 3.5 respectively. Each project also has a reference to System.Data. In the case of P4, it will be to System.Data v4.0.0.0 In the case of P3, it will be to System.Data v2.0.0.0 Project P4 also references P3. If P4 is loaded and executed, it uses the .net 4.0 CLR. At runtime, references to System.Data seem to resolve to v4.0 inside both P4 and P3. I can override this by using assemblyBinding redirects, but then both P4 and P3 resolve

Conditional reference in Visual Studio Community 2017

青春壹個敷衍的年華 提交于 2019-12-05 00:58:25
I am creating a multi-platform application. I have a multi-targeted shared library (targeting .netstandard 2.0 and .net 4.5)...See project file: <PropertyGroup> <TargetFrameworks>netstandard2.0;net45</TargetFrameworks> </PropertyGroup> When I build the project in visual studio 2017 on windows, I get two directories in the output (netstandard2.0, net45) and the corresponding dlls. The build is a success. When I build the exact same project (same code) in visual studio 2017 on a mac, I get errors of this nature: The type 'OptionAttribute' exists in both 'CommandLine.DotNetStandard, Version=1.0

Can my .Net app reference two different versions of a .net framework library?

﹥>﹥吖頭↗ 提交于 2019-12-04 04:39:26
Say I have two projects, P4 and P3, targetting .net 4.0 and 3.5 respectively. Each project also has a reference to System.Data. In the case of P4, it will be to System.Data v4.0.0.0 In the case of P3, it will be to System.Data v2.0.0.0 Project P4 also references P3. If P4 is loaded and executed, it uses the .net 4.0 CLR. At runtime, references to System.Data seem to resolve to v4.0 inside both P4 and P3. I can override this by using assemblyBinding redirects, but then both P4 and P3 resolve to v2.0. Is there any way I can configure my application so that P4 uses v4.0 and P3 uses v2.0? Have a