coreclr

Is it possible to make desktop GUI application in .NET core?

给你一囗甜甜゛ 提交于 2019-11-28 16:28:22
i have been developing winforms programs for few years.i am now looking into .NET core (including ASP.NET core MVC).i am searching for the new GUI desktop technology.in visual studio 2015 update 3 i can't see any option to make a GUI app in .NET core. what am i missing ? You're not missing anything. Currently, there is no reasonable way to create GUI applications directly using .Net Core. Though UWP (Universal Windows Platform) is partially built on top of .Net Core. Also, .Net Core 3.0 (daily builds are already available) will include support for Winforms and WPF, though it will be Windows

Get list of loaded Assemblies on UAP10 platform

和自甴很熟 提交于 2019-11-28 11:37:27
On "normal" .NET assemblies targeting .NET Framework 4, I can use AppDomain.CurrentDomain.GetAssemblies() to get a list of all loaded assemblies. How to do this on a Windows Universal App or on a CoreCLR application? One way to kinda do what you want is to get the DLLs/assemblies which is located in the folder in which your app is installed (which one can assume in some cases is being used/loaded in your app). public static async Task<List<Assembly>> GetAssemblyList() { List<Assembly> assemblies = new List<Assembly>(); var files = await Windows.ApplicationModel.Package.Current

Is it possible to make desktop GUI application in .NET core?

孤街醉人 提交于 2019-11-27 19:51:05
问题 I have been developing WinForms programs for few years. I am now looking into .NET Core (including ASP.NET Core MVC). I am searching for the new GUI desktop technology. In Visual Studio 2015 update 3 I can't see any option to make a GUI app in .NET Core. What am I missing? 回答1: You were not missing anything. MS shipped no reasonable way to create GUI applications directly using .Net Core until .Net Core 3, though UWP (Universal Windows Platform) is partially built on top of .Net Core. .Net

Building a .NET Core app via command line, so that it works on a machine without .NET Core installed

折月煮酒 提交于 2019-11-27 17:11:50
问题 My end goal is to create a cross-platform (non-web) console application, so I'm exploring .NET Core right now. In my previous .NET projects, I did all the development inside Visual Studio, but I also created a batch/MSBuild file so I could build the whole project (including setups, NuGet packages, zip files with binaries etc.) with one single click. Here's an example from a previous project. In the end, I want to do something similar with my .NET Core test project. But right now I'm failing

C++/CLI Support in .Net Core

泪湿孤枕 提交于 2019-11-27 13:04:46
问题 Our project structure is like, native.dll :- This contains pure native code written in c\c++. This native.dll exposes some functions using *def file. Wrapper Library(wrapper.dll compiled with .Net framework v4.0) :- In order to use functionality of native.dll , a Wrapper lib(wrapper.dll) is written in C++\CLI using :clr\oldsyntax . This wrapper has all code of Interoperability and Marshalling . Application(Console App v4.0) directly uses wrapper.dll to use functionality provided by native.dll

How to publish environment specific appsettings in .Net core app?

岁酱吖の 提交于 2019-11-27 12:47:05
问题 I have 3 environment specific appsettings files in my .Net core application in project.json I have setup publishOptions like this. ( based on suggestion here) "publishOptions": { "include": [ "wwwroot", "appsettings.development.json", "appsettings.staging.json", "appsettings.production.json", "web.config" ] }, I have 3 corresponding startup classes that uses appropriate appsettings based on environment var builder = new ConfigurationBuilder() .SetBasePath(env.ContentRootPath) .AddJsonFile($

Entry point can be marked with the 'async' modifier on CoreCLR?

坚强是说给别人听的谎言 提交于 2019-11-27 07:47:40
问题 In Stephan Cleary's recent blog post about Async Console Apps on .NET CoreCLR he shows us that in CoreCLR (currently running on Visual Studio 2015, CTP6), the entry point "Main" can actually be marked as async Task , compile properly and actually run: public class Program { public async Task Main(string[] args) { Console.WriteLine("Hello World"); await Task.Delay(TimeSpan.FromSeconds(1)); Console.WriteLine("Still here!"); Console.ReadLine(); } } Gives the following output: This is strengthend

Get list of loaded Assemblies on UAP10 platform

随声附和 提交于 2019-11-27 06:18:29
问题 On "normal" .NET assemblies targeting .NET Framework 4, I can use AppDomain.CurrentDomain.GetAssemblies() to get a list of all loaded assemblies. How to do this on a Windows Universal App or on a CoreCLR application? 回答1: One way to kinda do what you want is to get the DLLs/assemblies which is located in the folder in which your app is installed (which one can assume in some cases is being used/loaded in your app). public static async Task<List<Assembly>> GetAssemblyList() { List<Assembly>

Maybe a C# compiler bug in Visual Studio 2015

久未见 提交于 2019-11-27 01:41:01
I think this is a compiler bug. The following console application compiles und executes flawlessly when compiled with VS 2015: namespace ConsoleApplication1 { class Program { static void Main(string[] args) { var x = MyStruct.Empty; } public struct MyStruct { public static readonly MyStruct Empty = new MyStruct(); } } } But now it's getting weird: This code compiles, but it throws a TypeLoadException when executed. namespace ConsoleApplication1 { class Program { static void Main(string[] args) { var x = MyStruct.Empty; } public struct MyStruct { public static readonly MyStruct? Empty = null; }

Maybe a C# compiler bug in Visual Studio 2015

感情迁移 提交于 2019-11-26 12:28:09
问题 I think this is a compiler bug. The following console application compiles und executes flawlessly when compiled with VS 2015: namespace ConsoleApplication1 { class Program { static void Main(string[] args) { var x = MyStruct.Empty; } public struct MyStruct { public static readonly MyStruct Empty = new MyStruct(); } } } But now it\'s getting weird: This code compiles, but it throws a TypeLoadException when executed. namespace ConsoleApplication1 { class Program { static void Main(string[]