These are chat archives for AvaloniaUI/Avalonia

3rd
Feb 2017
Jeremy Koritzinsky
@jkoritzinsky
Feb 03 2017 06:30 UTC
@kekekeks I pushed my wip AppKit and quartz rendering to my fork's OSX branch if you want to take a look.
Andrew
@zezba9000
Feb 03 2017 08:17 UTC
Any way to add color formatting to a "TextBox" object or equivalent?
danwalmsley
@danwalmsley
Feb 03 2017 09:55 UTC
@zezba9000 I had to write my own text editor control from scratch to support that
you can only set all the text to 1 colour
or 1 text style
(or it was last time I tried)
Nikita Tsukanov
@kekekeks
Feb 03 2017 09:57 UTC
FormattedText itself has support for some formatting (colors, I think), while textbox doesn't
danwalmsley
@danwalmsley
Feb 03 2017 10:02 UTC
@kekekeks can formatted text be used directly as a control?
Nikita Tsukanov
@kekekeks
Feb 03 2017 10:04 UTC
It should be easy to wrap it, I think
You can access it in TextBlock
But I'm not sure that it will work with new "everything is immutable" concept by @grokys
WPF uses locks for such things, I think
Steven Kirk
@grokys
Feb 03 2017 10:06 UTC
FormattedText isn't immutable, it's FormattedTextImpl that is
Nikita Tsukanov
@kekekeks
Feb 03 2017 10:07 UTC
And I don't think that's a good idea
It might be a huge structure
Doesn't look immutable to me
Steven Kirk
@grokys
Feb 03 2017 10:09 UTC
ah yeah that needs changing
It might be a huge structure
Nikita Tsukanov
@kekekeks
Feb 03 2017 10:10 UTC
It will be too overhead
Imagine something like 100KB of text with each symbol of different color
And for immutability support you need to copy all that information on each call to SetForegroundBrush
Steven Kirk
@grokys
Feb 03 2017 10:11 UTC
yeah, i'm open to suggestions
Nikita Tsukanov
@kekekeks
Feb 03 2017 10:11 UTC
What exactly do you need that immutability for?
Steven Kirk
@grokys
Feb 03 2017 10:12 UTC
because rendering is now threaded - if the main thread is changing something while the render thread is rendering you get a race
Nikita Tsukanov
@kekekeks
Feb 03 2017 10:12 UTC
WPF handles that with locks
And they have a very specific type for bitmaps that can be changed by user code
Which need to be explicitly locked to be altered
Steven Kirk
@grokys
Feb 03 2017 10:14 UTC
afaik WPF's renderer doesn't use managed objects - it's all in non-managed code
Nikita Tsukanov
@kekekeks
Feb 03 2017 10:14 UTC
Yep, but it does use locking
Steven Kirk
@grokys
Feb 03 2017 10:14 UTC
again, afaics the renderer doesn't share the WPF objects
Nikita Tsukanov
@kekekeks
Feb 03 2017 10:14 UTC
it shares underlying implementations
to WPF control
I noticed that when I needed to render from unmanaged bitmap
My code had very poor performance in some cases
Steven Kirk
@grokys
Feb 03 2017 10:17 UTC
for bitmaps maybe, i'm trying to find where i saw it, but as far as i remember it serializes formatted text to send it to milcore
Nikita Tsukanov
@kekekeks
Feb 03 2017 10:17 UTC
Because it had to wait for locks
Since bitmap was locked by the render thread
I had to workaround that with kind of spin lock
i. e. if UI thread can't lock bitmap right now, enqueue delegate to the event loop and try again
Well, our skia implementation of FormattedText is completely managed one
so we can get away with that
But for Direct2D1 backend you need to clone underlying implementation
Wait
Do you need it to actually be immutable?
Or be clonable
Because in case of cloning there is no much overhead
Steven Kirk
@grokys
Feb 03 2017 10:21 UTC
yeah cloneable would work
Nikita Tsukanov
@kekekeks
Feb 03 2017 10:21 UTC
Or even better
Copy-on-write
Basically, all clones share the same data structures
Until one of them needs to be altered
In this case it will switch to its own copy of data structures
Steven Kirk
@grokys
Feb 03 2017 10:23 UTC
well COW is a form of immutability
but yes that would work
Nikita Tsukanov
@kekekeks
Feb 03 2017 10:24 UTC
So if there are no currently attached clones, FormattedText will just access it's data structures directly
danwalmsley
@danwalmsley
Feb 03 2017 10:24 UTC
The way I got around it in the Avalon studio editor, was to only render the text visible on the screen
Nikita Tsukanov
@kekekeks
Feb 03 2017 10:24 UTC
Hm
Wait, we don't need "clones"
we need snapshots
So if FormattedText is asked for a snapshot it could reuse a previous one

The way I got around it in the Avalon studio editor, was to only render the text visible on the screen

That optimization should go to FormattedText

Since we have line information there
Well, line wrapping will still cost some performance, but still
Steven Kirk
@grokys
Feb 03 2017 10:28 UTC
i think the control itself should probably do the clipping
Nikita Tsukanov
@kekekeks
Feb 03 2017 10:29 UTC
BTW, what is the plan on alpha5 release? I wanted to make iOS platforms use view-embedding too
Steven Kirk
@grokys
Feb 03 2017 10:30 UTC
i wanted to do one soon, but people keep sending PRs ;)
and i keep getting sick
Steven Kirk
@grokys
Feb 03 2017 10:35 UTC
if you wanted to sort out iOS platforms, we can wait for that
would be good to have them working again
Nikita Tsukanov
@kekekeks
Feb 03 2017 10:38 UTC
I also need to make changes for popups
On Android we need to pass parent window
And for that it would be nice to have that .NET Core merged, since it contains a whole new GTK3 backend
Nikita Tsukanov
@kekekeks
Feb 03 2017 10:48 UTC
Well, I could workaround that parent view requirement by using something like this: http://stackoverflow.com/a/38650587/2231814
Steven Kirk
@grokys
Feb 03 2017 10:49 UTC
so the .NET core support PR isn't just .NET core, it's also gtk3?
i will review asap, got a lot of work to catch up with
Nikita Tsukanov
@kekekeks
Feb 03 2017 10:59 UTC

PR isn't just .NET core, it's also gtk3?

https://www.youtube.com/watch?v=UHEW-ZInr6A

There are currently some stubs (win32 icons, window state on GTK3), but in general it works well
danwalmsley
@danwalmsley
Feb 03 2017 11:19 UTC
@kekekeks for porting Avalon studio
which .net class library type do I need to use
portable and .net standard 1.5?
there are so many different permiatations of portable libs I have no idea what I'm looking at now
Nikita Tsukanov
@kekekeks
Feb 03 2017 11:37 UTC
PCL7 should work just fine
And you probably won't be able to build netstandard1.6 anyway
So either PCL or .net standard 1.5
Oh, wait
You probably want to have P/Invoke
So .net standard, that's it
danwalmsley
@danwalmsley
Feb 03 2017 11:38 UTC
ok thanks
Nikita Tsukanov
@kekekeks
Feb 03 2017 11:38 UTC
Just remember to check compatibility matrix
danwalmsley
@danwalmsley
Feb 03 2017 11:38 UTC
I'll go with .net standard 1.5

Just remember to check compatibility matrix

where is this?

Nikita Tsukanov
@kekekeks
Feb 03 2017 11:39 UTC
.NET 4.5 is only compatible with .NETStandard 1.1
danwalmsley
@danwalmsley
Feb 03 2017 11:41 UTC
so 1.6 and below is compatible with .net core 1?
why cant we use 1.6?
oh its not released yet?
Nikita Tsukanov
@kekekeks
Feb 03 2017 11:41 UTC
Not compatible with desktop .NET
For some weird reason
AppVeyor is even unable to build it
danwalmsley
@danwalmsley
Feb 03 2017 11:42 UTC
is there a nice way to upgrade .net 4.6 class lib to the new format?
Nikita Tsukanov
@kekekeks
Feb 03 2017 11:42 UTC
Not one I know about
There is support for converting PCL to .NETStandard
danwalmsley
@danwalmsley
Feb 03 2017 11:43 UTC
so we just have to create a new project
and manually add each file again?
Nikita Tsukanov
@kekekeks
Feb 03 2017 11:43 UTC
So you could basically create a PCL, convert to .NETStandard and then copy-paste your project items from another csproj
And change project GUID
BTW, you will lose the ability to build with Mono
danwalmsley
@danwalmsley
Feb 03 2017 11:45 UTC
as long as it will run on .net core
I don't care about mono after that
or should I?
Nikita Tsukanov
@kekekeks
Feb 03 2017 11:46 UTC
Not sure if you'll be able to build it using .NET Core SDK on linux
It's... complicated
danwalmsley
@danwalmsley
Feb 03 2017 11:46 UTC
but the binaries will run?
Nikita Tsukanov
@kekekeks
Feb 03 2017 11:46 UTC
Yep
danwalmsley
@danwalmsley
Feb 03 2017 11:46 UTC
that's better
I want to build once on appveyor
and use the same binaries
Nikita Tsukanov
@kekekeks
Feb 03 2017 11:46 UTC
It might be better to have P/Invoke-related stuff in a nuget package
danwalmsley
@danwalmsley
Feb 03 2017 11:46 UTC
except native libs
Nikita Tsukanov
@kekekeks
Feb 03 2017 11:47 UTC
You probably still want to debug
Let me check if you can build netstandard with 1.0.0-preview2-00313
You see, .NET Core tooling is currently a mess
danwalmsley
@danwalmsley
Feb 03 2017 11:48 UTC
preview 4 would be better?
it was released only last friday
Nikita Tsukanov
@kekekeks
Feb 03 2017 11:48 UTC
You can build .NETStandard using old msbuild and csproj (with project.json for nuget dependencies) with VS2015, but not XBuild
danwalmsley
@danwalmsley
Feb 03 2017 11:49 UTC
@kekekeks can I use current avalonia nugget in .net standard?
Nikita Tsukanov
@kekekeks
Feb 03 2017 11:49 UTC
You can build .NETStandard using project.json-based tooling, but won't be able to reference those binaries from csproj
You can also install VS2017 and build everything using new msbuild
But for some reason it does not run Avalonia properly
danwalmsley
@danwalmsley
Feb 03 2017 11:50 UTC
Package Sprache 2.0.0.51 is not compatible with netstandard1.5
Nikita Tsukanov
@kekekeks
Feb 03 2017 11:50 UTC
Can't find libSkiaSharp.dll from nuget
danwalmsley
@danwalmsley
Feb 03 2017 11:50 UTC
I'm using vs2017
Nikita Tsukanov
@kekekeks
Feb 03 2017 11:50 UTC
well, good luck with that
danwalmsley
@danwalmsley
Feb 03 2017 11:50 UTC
how did you get sprache to be compatible
?
Nikita Tsukanov
@kekekeks
Feb 03 2017 11:51 UTC
I haven't managed to run it under debugger
And regarding package versions
You can't use ones from current nightly feed
You need to download packages from build 2600
danwalmsley
@danwalmsley
Feb 03 2017 11:52 UTC
ah I need to wait for your pr to be merged?
oh ok
danwalmsley
@danwalmsley
Feb 03 2017 11:58 UTC
so you managed to get a new version of sprache or something?
Nikita Tsukanov
@kekekeks
Feb 03 2017 11:59 UTC
2.1
There is also some wicked dependency magic (netcoreapp1.0profile references more recent package versions which are not compatible with PCL)
So I'm not sure that you even can use avalonia from "NETStandard" right now
From .NET Core, you can
It's serilog and splat actually
That need specific versions
Nikita Tsukanov
@kekekeks
Feb 03 2017 12:04 UTC
Once new tooling is released, we'll probably switch to .NETStandard2.0 completely and ditch xbuild support
Well, we might want to keep core assemblies compatible with .NETStandard1.1 to have .NET 4.5 support
But @grokys really wants those type converters from .NETStandard2.0, so...
Steven Kirk
@grokys
Feb 03 2017 12:10 UTC
yeah, typeconverters would be a massive help. basically, at the moment control authors are stuck with our predefined typeconverters
Nikita Tsukanov
@kekekeks
Feb 03 2017 12:12 UTC
And that's .NET 4.6.1 as minimum framework for us
But who cares if you can bundle .NET Core runtime with your app
Steven Kirk
@grokys
Feb 03 2017 12:12 UTC
well tbh i think typeconverters are available in <.netstandard 2.0
i can't find the table that lists what's available where though any more
Nikita Tsukanov
@kekekeks
Feb 03 2017 12:13 UTC
For .NET 4.5 we need .NETStandard 1.1
Steven Kirk
@grokys
Feb 03 2017 12:14 UTC
looks like they're available in 1.0 to me: https://www.nuget.org/packages/System.ComponentModel.TypeConverter/
Nikita Tsukanov
@kekekeks
Feb 03 2017 12:14 UTC
Nice
So we can keep targeting 1.1
danwalmsley
@danwalmsley
Feb 03 2017 12:20 UTC
@kekekeks
value="C:\Users\keks\Projects\GitHub\Perspex\artifacts\nuget
this folder just contains all .nugetpkg files?
Nikita Tsukanov
@kekekeks
Feb 03 2017 12:22 UTC
Yep
Well, we could upload them to a separate feed, but it will be temporary anyway
danwalmsley
@danwalmsley
Feb 03 2017 12:27 UTC
Package Avalonia 0.4.1-build2600-alpha is not compatible with netstandard1.5 (.NETStandard,Version=v1.5). Package Avalonia 0.4.1-build2600-alpha supports:
  - net45 (.NETFramework,Version=v4.5)
  - netcoreapp1.0 (.NETCoreApp,Version=v1.0)
  - portable-net45+win8 (.NETPortable,Version=v0.0,Profile=Profile7)
Package Serilog 1.5.14 is not compatible with netstandard1.5 (.NETStandard,Version=v1.5). Package Serilog 1.5.14 supports:
  - net40 (.NETFramework,Version=v4.0)
  - net45 (.NETFramework,Version=v4.5)
  - portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)
Package Splat 1.6.2 is not compatible with netstandard1.5 (.NETStandard,Version=v1.5). Package Splat 1.6.2 supports:
  - monoandroid (MonoAndroid,Version=v0.0)
  - monomac (MonoMac,Version=v0.0)
  - monotouch (MonoTouch,Version=v0.0)
  - net45 (.NETFramework,Version=v4.5)
  - netcore45 (.NETCore,Version=v4.5)
  - portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)
  - portable-win81+wpa81 (.NETPortable,Version=v0.0,Profile=Profile32)
  - wp8 (WindowsPhone,Version=v8.0)
  - xamarinios10 (Xamarin.iOS,Version=v1.0)
  - xamarinmac10 (Xamarin.Mac,Version=v1.0)
One or more packages are incompatible with .NETStandard,Version=v1.5.
Package restore failed. Rolling back package changes for 'AvalonStudio.Extensibility'.
how did you get it to work .net standard?
Nikita Tsukanov
@kekekeks
Feb 03 2017 12:28 UTC
dotnet/sdk#391
I didn't
My project is targeting .NET Core
But you can use that PackageTargetFallback
And for splat and serilog just reference more recent versions
      new NuSpecDependency() { Id = "Splat", TargetFramework = "netcoreapp1.0", Version = "2.0.0" },
      new NuSpecDependency() { Id = "Serilog", TargetFramework = "netcoreapp1.0", Version = "2.3.0" },
danwalmsley
@danwalmsley
Feb 03 2017 12:30 UTC
netcoreapp 1 or 1.1?
Nikita Tsukanov
@kekekeks
Feb 03 2017 12:31 UTC
I was targeting netcoreapp1.0
danwalmsley
@danwalmsley
Feb 03 2017 12:31 UTC
1.1 should be ok too I guess?
Nikita Tsukanov
@kekekeks
Feb 03 2017 12:31 UTC
But you probably need that PackageTargetFallback for netstandard dlls
Or just use multitargeting support
So your project will target net45 and netcoreapp1.1
danwalmsley
@danwalmsley
Feb 03 2017 12:32 UTC
it worked!
That's not updated for VS2017
But there you can have something like <TargetFrameworks>net45;netcoreapp1.1</TargetFrameworks>
And
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
  <PackageReference Include="DesktopOnlyDependency">
    <Version>1.0.0</Version>
  </PackageReference>
</ItemGroup>
For framework-specific deps
But it's better to use .NETStandard1.1 if possible
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 12:40 UTC
1.1 has same surface as 1.0
Nikita Tsukanov
@kekekeks
Feb 03 2017 12:41 UTC
1.1 has support for more targets
runtime targets, I mean
1380 new APIs
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 12:46 UTC
Yes I meant that if it works on 1.0 it work on 1.1 :)
Nikita Tsukanov
@kekekeks
Feb 03 2017 12:47 UTC
I wasn't able to run with VS2017
It didn't find libSkiaSharp.dll for some reason
might be useful for that separate-thread renderer
Steven Kirk
@grokys
Feb 03 2017 12:50 UTC
yeah i saw that
it will be useful generally i think!
Eric Winnington
@ewinnington
Feb 03 2017 12:56 UTC
Oh my, just reading the trouble you have with .net standard / .net core configurations and targeting makes me happy my work project is still targeting Framework 4.6. But I'm really looking forward to the moment I can just start a .net core project with avalonia without jumping through too many hoops. You are heroes for the work you do.
Nikita Tsukanov
@kekekeks
Feb 03 2017 12:59 UTC
Once VS2017 is released, we'll just switch to .NETStandard1.1 and forget about these difficulties
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 13:00 UTC
btw
with the recent (yesterday) update VS2017 got SOOOO more stable, specially with .net core tooling
it is usable again finally
danwalmsley
@danwalmsley
Feb 03 2017 13:02 UTC
@grokys @kekekeks is there a type converter class now in nugget package or does avalonia give me this?
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 13:02 UTC
but if I may suggest, you guys should use VSCode for Avalonia once you migrate the projects to the new target
Steven Kirk
@grokys
Feb 03 2017 13:03 UTC
@danwalmsley not sure what you mean
danwalmsley
@danwalmsley
Feb 03 2017 13:05 UTC
some of my code inherits typeconverter
and I'm trying to port to .net core
not sure if that class comes from avalonia
or msft?
Nikita Tsukanov
@kekekeks
Feb 03 2017 13:08 UTC

VSCode

Thank you, but no

We have full dotnet and mobile targets to support
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 13:09 UTC
And?
well, yeah, Xamarin isn’t there yet
you are right
Nikita Tsukanov
@kekekeks
Feb 03 2017 13:11 UTC
VS Code also lack one very significant thing
which is ReSharper
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 13:12 UTC
ic
I don’t use it
it eats a lot of CPU/Memory
and VS is already too bloated to make it even more
not to mention that all the nice refactory stuff are already there
so I dont miss it
Nikita Tsukanov
@kekekeks
Feb 03 2017 13:12 UTC

it eats a lot of CPU/Memory

It's not an issue if your laptop has i7-4800MQ and 32GB RAM

And 1TB+256GB SSD... and 1.5TB HDD...
You know, things that Apple laptops usually lack
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 13:16 UTC
hahaha
true
what is your laptop @kekekeks ?
Nikita Tsukanov
@kekekeks
Feb 03 2017 13:16 UTC
Dell M4800
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 13:17 UTC
Ahh, mobile workstation
nice
I’m considering the new Precision 52xx
they are really thin
and has Xeon proc with 32gb RAM and 1tb m.2 SSD
my surface pro 3 died with battery and I shipped to service, so unfortunately I’m working in a MacMini
i7 16gb but with a crap HDD
Nikita Tsukanov
@kekekeks
Feb 03 2017 13:20 UTC
Consider their customization options
You can get 64GB RAM that way
And regarding macs... I could live with poor hardware, but their keyboards are just unusable
My Dell comes with proper PC 101-key keyboard and trackpoint and two sets of hardware mouse buttons (3 buttons each)
I was using thinkpads before, but they've moved PrintScreen to inappropriate position and that was a show-stopper for me
Nikita Tsukanov
@kekekeks
Feb 03 2017 13:29 UTC
@danwalmsley it seems that .NET Core 1.1 has MEF built-in or something
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 13:33 UTC
Yeah it has a lightweight version of MEF
but I would stay away from it like I said to @danwalmsley on AS
Nikita Tsukanov
@kekekeks
Feb 03 2017 13:44 UTC
I wonder what state corert is currently in
It would be nice to avalonia-app to native code
Could even be a feature that will bring more user base to the project
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 14:28 UTC
The problem is reflection which I believe you rely on while binding
And btw corert have a release this week for uwp
Nikita Tsukanov
@kekekeks
Feb 03 2017 14:37 UTC
dotnet/corert#669
I see a bigger problem there
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 14:40 UTC
Yup
That is why they released only for uwp
danwalmsley
@danwalmsley
Feb 03 2017 14:47 UTC
@galvesribeiro @kekekeks so no reflection at all in .net core?
Nikita Tsukanov
@kekekeks
Feb 03 2017 14:49 UTC
corert
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 15:09 UTC
Curious... how do you guys deal with xaml here? Is it pre-compiled at build time into a c# type or it is parsed in runtime?
Steven Kirk
@grokys
Feb 03 2017 15:35 UTC
xaml is parsed at runtime and uses reflection
there's an attempt underway to convert XAML into C# here: cwensley/Portable.Xaml#41
danwalmsley
@danwalmsley
Feb 03 2017 15:38 UTC
@kekekeks when you ported to .net core did you have problems with references?
i.e. I have Project C -> Project B -> Project A
referencing like that
on .net core I have to get C to reference B and A directly to get it to compile
I didn't have to do that previously
do you know why that might be?
Nikita Tsukanov
@kekekeks
Feb 03 2017 16:03 UTC
It's a known bug
in tooling
dotnet/sdk#547
@danwalmsley
danwalmsley
@danwalmsley
Feb 03 2017 16:04 UTC
so its just a problem in visual studio
Nikita Tsukanov
@kekekeks
Feb 03 2017 16:05 UTC
Yep
danwalmsley
@danwalmsley
Feb 03 2017 16:05 UTC
when I build from command line it will be ok?
Nikita Tsukanov
@kekekeks
Feb 03 2017 16:05 UTC
Probably no
The bug is in .NET Core SDK
Unless there was some new SDK release recently
Try to use 1.0.0-rc3-004530
danwalmsley
@danwalmsley
Feb 03 2017 16:09 UTC
there is a visual studio update since yester day
will try that
Nikita Tsukanov
@kekekeks
Feb 03 2017 16:12 UTC
Wow
RC3 fixed the issue with running on Ubuntu 15.10
I had to edit /etc/os-release to make it think that it's running on 14.04
I'm not updating it on my windows installation however
Since I have some production code that's built using the current SDK
and I've noticed some breaking changes
danwalmsley
@danwalmsley
Feb 03 2017 16:22 UTC
have you seen this error?
image.png
Nikita Tsukanov
@kekekeks
Feb 03 2017 16:23 UTC
Yep
That's one of the breaking changes
Remove <Compile Include="*.cs"> from your project
Fixed Nuget Restore operation issue in scenarios where a project uses both PackageReference elements to manage NuGet packages, and has a reference to another project in the solution.
danwalmsley
@danwalmsley
Feb 03 2017 16:34 UTC
this is bleeding edge!
Nikita Tsukanov
@kekekeks
Feb 03 2017 16:36 UTC
I really like how new csproj files look like
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
  <PropertyGroup>
    <TargetFramework>netcoreapp1.1</TargetFramework>
    <AssemblyName>ControlCatalog</AssemblyName>
    <OutputType>Exe</OutputType>
    <RuntimeIdentifiers>win7-x64;ubuntu.14.04-x64</RuntimeIdentifiers>
    <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
    <GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
    <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
  </PropertyGroup>
  <ItemGroup>
    <EmbeddedResource Include="**\*.resx" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
    <EmbeddedResource Include="**\*.xaml;Assets\*;compiler\resources\**\*" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Avalonia">
      <Version>1.0.0-test6</Version>
    </PackageReference>
    <PackageReference Include="Avalonia.Skia.Desktop">
      <Version>1.0.0-test6</Version>
    </PackageReference>
    <PackageReference Include="Avalonia.Win32">
      <Version>1.0.0-test6</Version>
    </PackageReference>
    <PackageReference Include="Avalonia.Gtk3">
      <Version>1.0.0-test6</Version>
    </PackageReference>
  </ItemGroup>
  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
    <DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
  </PropertyGroup>
</Project>
And that's it
Well, <Compile Include="**\*.cs"> was supported by msbuild ages ago
But VS wasn't very happy with that
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 19:27 UTC
@kekekeks you can still use it if you want
it is just not required anymore
there is a tag that makes the new tooling don't add the files automatically
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 19:33 UTC
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
that does it
if you aren't ready to migrate to new reduced project format, just add it and you are safe
danwalmsley
@danwalmsley
Feb 03 2017 20:26 UTC
@kekekeks does application type need to be console application or Windows?
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 20:36 UTC
@danwalmsley for .net core it is a console application always today
even if you are spinning a server up
or web app
in the end it is a console app
Nikita Tsukanov
@kekekeks
Feb 03 2017 20:41 UTC
@danwalmsley set OutputType type to WinExe
danwalmsley
@danwalmsley
Feb 03 2017 20:42 UTC
were you able to debug?
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 20:43 UTC
WinExe? That is new
o.O
Is it .net core supported or just net45+ ?
Nikita Tsukanov
@kekekeks
Feb 03 2017 20:47 UTC
Hm
net core doesn't support it
danwalmsley
@danwalmsley
Feb 03 2017 20:49 UTC
what debugging?
so it builds and produces AvalonStudio.dll
dot net run wont run it
unless I make it a console app
how do I run it?
why doesn't it output an exe?
Nikita Tsukanov
@kekekeks
Feb 03 2017 20:50 UTC
That's how .NET Core runs binaries
They have a host process
danwalmsley
@danwalmsley
Feb 03 2017 20:51 UTC
ok
Nikita Tsukanov
@kekekeks
Feb 03 2017 20:51 UTC
which is a native (not .NET) executable
danwalmsley
@danwalmsley
Feb 03 2017 20:51 UTC
fair enough
but dotnet run wont execute it
if its winexe
Unable to run your project.
Please ensure you have a runnable project type and ensure 'dotnet run' supports this project.
The current OutputType is 'winexe'.
Nikita Tsukanov
@kekekeks
Feb 03 2017 20:52 UTC
I had PE file patcher somewhere
danwalmsley
@danwalmsley
Feb 03 2017 20:52 UTC
how did you run control catalog?
what does that do?
Nikita Tsukanov
@kekekeks
Feb 03 2017 20:52 UTC
That can change SUBSYSTEM in PE headers
danwalmsley
@danwalmsley
Feb 03 2017 20:54 UTC
so absolutely no way to debug?
What's wrong with debugging?
It worked fine with both VS2015 and VS2017RC
You need to run that tool against that coreclr host exe
danwalmsley
@danwalmsley
Feb 03 2017 20:57 UTC
image.png
Nikita Tsukanov
@kekekeks
Feb 03 2017 20:57 UTC
Are you able to set a breakpoint in your Main method?
danwalmsley
@danwalmsley
Feb 03 2017 20:58 UTC
it crashes before it manages to load the symbols
Nikita Tsukanov
@kekekeks
Feb 03 2017 20:59 UTC
Mkay, so I'm definetely not updating my installation
danwalmsley
@danwalmsley
Feb 03 2017 21:00 UTC
hahaha
I can debug a new project if I create it
ok its something to do with having platform set to x86
Nikita Tsukanov
@kekekeks
Feb 03 2017 21:00 UTC
It doesn't work well with x86, I think
danwalmsley
@danwalmsley
Feb 03 2017 21:01 UTC
I though skiasharp required it
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:01 UTC
wait
danwalmsley
@danwalmsley
Feb 03 2017 21:01 UTC
or has that gone away?
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:01 UTC
hy are you changing the dot net?
danwalmsley
@danwalmsley
Feb 03 2017 21:01 UTC
@kekekeks you have to explain what this changing the subsystem thing is?
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:02 UTC
@danwalmsley it is not dotnet run something it is dotnet yourdll.dll
run is only used to run from the project directory
danwalmsley
@danwalmsley
Feb 03 2017 21:02 UTC
ok @galvesribeiro thanks
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:03 UTC
I’m able to run anything here without never touch on PE patches
in fact I never heard about it before :D
danwalmsley
@danwalmsley
Feb 03 2017 21:04 UTC
I'm not sure why we would need to
still
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:04 UTC
just spoke with someone from dotnet cli team here, they told thta winexe should not work anymore
it was an old target for net TFM
and only on windows
danwalmsley
@danwalmsley
Feb 03 2017 21:05 UTC
ok
so console application
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:05 UTC
the problem is
the exe will open a console
I just asked how can we suppress this console
danwalmsley
@danwalmsley
Feb 03 2017 21:07 UTC
woohoo debugging is working
Nikita Tsukanov
@kekekeks
Feb 03 2017 21:15 UTC

you have to explain what this changing the subsystem thing is?

@danwalmsley toggling between console and non-console application essentially

IMAGE_SUBSYSTEM_WINDOWS_CUI - console executable
IMAGE_SUBSYSTEM_WINDOWS_GUI - "normal" executable
Nikita Tsukanov
@kekekeks
Feb 03 2017 21:20 UTC
So after you publish your app
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:20 UTC
ahh
that is nice
Nikita Tsukanov
@kekekeks
Feb 03 2017 21:20 UTC
It will create AvalonStudio.dll and AvalonStudio.exe
Second one is .NET Core Host application
Which is console app
So you need to patch subsystem there
Jeremy Koritzinsky
@jkoritzinsky
Feb 03 2017 21:21 UTC
hey quick note for everyone using the new project system. you can also use it for older projects like net45 targeting libraries
Nikita Tsukanov
@kekekeks
Feb 03 2017 21:21 UTC
To make it win gui
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:21 UTC
@jkoritzinsky yes you can
but @kekekeks that only work on windows, right?
Jeremy Koritzinsky
@jkoritzinsky
Feb 03 2017 21:21 UTC
Im using that for AvaloniaAV
Nikita Tsukanov
@kekekeks
Feb 03 2017 21:21 UTC
Yep
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:21 UTC
ok
So it is a nogo for @danwalmsley
Nikita Tsukanov
@kekekeks
Feb 03 2017 21:22 UTC
Because other platforms are using their own versions of .NET Core host
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:22 UTC
there must be an (undocumented yet) way to suppress the console
Nikita Tsukanov
@kekekeks
Feb 03 2017 21:22 UTC
which are not PE files
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:22 UTC
yup
Nikita Tsukanov
@kekekeks
Feb 03 2017 21:22 UTC
but ELF and Mach-O executables
And for these systems there is no such concept as "GUI" and "CUI" applications
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:23 UTC
yes
Nikita Tsukanov
@kekekeks
Feb 03 2017 21:23 UTC
Every executable has stdin, stdout and stderr
this guy from .net team is using a “console app” to build his game engine
Nikita Tsukanov
@kekekeks
Feb 03 2017 21:23 UTC
And if you want to interact with those channels
you need a terminal emulator app, kernel-provided terminal emulator (tty0-9) or some kind of COM port
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:24 UTC
and there is no console being opened
Nikita Tsukanov
@kekekeks
Feb 03 2017 21:25 UTC
There is kernel32!FreeConsole function
But it's better to just patch subsystem of the launcher
And console is useful in debug mode anyway, so there is no point of disabling it unless you are publishing binaries
I had C# code to do that somewhere
But it was like 5 years since I've last used it
So I can't find it
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:27 UTC
@mellinoe Eric are you around?
danwalmsley
@danwalmsley
Feb 03 2017 21:33 UTC
@mellinoe also do you know what happened to InheritedExport in the new System.Composition?
danwalmsley
@danwalmsley
Feb 03 2017 21:48 UTC
Avalon studio running on .net core! partially!
image.png
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:49 UTC
did Avalonia got updated to .net core? o.O
netstandard I mean
danwalmsley
@danwalmsley
Feb 03 2017 21:49 UTC
there is a test build available
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:49 UTC
oh, didn’t knew
nice
danwalmsley
@danwalmsley
Feb 03 2017 21:50 UTC
@galvesribeiro loads quicker too!
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 21:50 UTC
yeah
.Net Core is indeed faster
Nikita Tsukanov
@kekekeks
Feb 03 2017 21:59 UTC
Build 2600 on CI server
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 22:00 UTC
cool!
Nikita Tsukanov
@kekekeks
Feb 03 2017 22:01 UTC
We haven't announced it properly yet, since it needs to be merged first
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 22:01 UTC
sure
but it is using the old tooling as I see
Nikita Tsukanov
@kekekeks
Feb 03 2017 22:01 UTC
It works as well with the new one
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 22:01 UTC
ok good
Nikita Tsukanov
@kekekeks
Feb 03 2017 22:04 UTC
Core libraries are still PCL Profile7
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 22:04 UTC
humm
Nikita Tsukanov
@kekekeks
Feb 03 2017 22:04 UTC
But there are .NETStandard versions of GTK/Win32 backends and Skia renderer
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 22:05 UTC
I though you would make all them netstandard
Nikita Tsukanov
@kekekeks
Feb 03 2017 22:05 UTC
We are stuck with VS2015 for now
And want to keep Travis CI build running
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 22:05 UTC
right
Nikita Tsukanov
@kekekeks
Feb 03 2017 22:05 UTC
So moving everything to netstandard is troublesome
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 22:06 UTC
Travis dont work with .net core?
Nikita Tsukanov
@kekekeks
Feb 03 2017 22:06 UTC
You see, we need to reference these projects from Xamarin platforms
So we have to use MSBuild tooling for avalonia libraries
We also don't want to use project.json and then have to do another migration
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 22:07 UTC
you can use netstandard nugets on Xamarin, can’t you?
yep
u are right
Nikita Tsukanov
@kekekeks
Feb 03 2017 22:07 UTC
VS2015 tooling is a mess of msbuild and project.json
So I've limited project.json usage to 4 projects
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 22:08 UTC
yes
just wait then
migrate and announce the upgrade later
when you are confortable with VS2017
Nikita Tsukanov
@kekekeks
Feb 03 2017 22:08 UTC
Basically now we have separate projects for NETStandard versions of backends
That have the same assembly name
And get included to nuget packages under netcoreapp1.0 runtime
It's a bit of a mess, but it works
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 22:10 UTC
Yeah, but man, no rush with that
Nikita Tsukanov
@kekekeks
Feb 03 2017 22:10 UTC
Once VS2017 is released, we'll probably switch to new msbuild tooling right away
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 22:10 UTC
Wait util vs2017
danwalmsley
@danwalmsley
Feb 03 2017 22:21 UTC
I don't think that will be much longer
Gutemberg Ribeiro
@galvesribeiro
Feb 03 2017 22:37 UTC
yup