{"id":367343,"date":"2024-05-21T03:19:10","date_gmt":"2024-05-21T03:19:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=367343"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=367343","title":{"rendered":"<span>\u041a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0432 \u0441\u0431\u043e\u0440\u043a\u0430\u0445 .NET \u2014 \u043f\u0438\u0448\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f MSBuild<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 .NET \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b. \u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0438 \u0444\u0430\u0439\u043b\u043e\u0432 CSS. \u0422\u0430\u043a\u0436\u0435 \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0432\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 MSBuild \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, Windows \u0438 Linux \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 (\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u041e\u0421, \u0438\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u044b \u0438\u043b\u0438 \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u044e\u0442). <\/p>\n<h2>\u041d\u0430\u0447\u0430\u043b\u043e<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 <strong>CrossPlatform<\/strong> (\u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f Avalonia UI, \u0443 \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0442\u0438\u043f\u0430), \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0431\u043b\u043e\u043a <code>PropertyGroup<\/code> \u0444\u0430\u0439\u043b\u0430 <code>CrossPlatform.csproj<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre><code class=\"xml\">&lt;RuntimeIdentifiers>win-x64; linux-x64&lt;\/RuntimeIdentifiers><\/code><\/pre>\n<p>\u042d\u0442\u0438\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c MSBuild, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u043d\u0430 64 \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0445 Windows \u0438 Linux.<\/p>\n<h2>\u0421\u043b\u0443\u0447\u0430\u0439 1: \u0418\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>\u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <code>pandoc<\/code> \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c, \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 <code>pdf<\/code><\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <code>run<\/code> \u043d\u0430 C++ \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 5 \u0441\u0435\u043a\u0443\u043d\u0434, \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c Windows \u0438 Linux.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;chrono> #include &lt;thread> int main() {     std::cout &lt;&lt; \"Some cool application running...\" &lt;&lt; std::endl;     std::this_thread::sleep_for(std::chrono::milliseconds(5000)); }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h3>\u0420\u0435\u0441\u0443\u0440\u0441\u044b<\/h3>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b <code>run<\/code> (\u0434\u043b\u044f Linux) \u0438 <code>run.exe<\/code> (\u0434\u043b\u044f Windows) \u0432 \u043a\u043e\u0440\u0435\u043d\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412 \u0444\u0430\u0439\u043b <code>CrossPlatform.csproj<\/code> \u043f\u043e\u0441\u043b\u0435 \u0441\u0435\u043a\u0446\u0438\u0438 <code>PropertyGroup<\/code> \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"xml\">&lt;ItemGroup Condition=\"$(RuntimeIdentifier.StartsWith('linux'))\">     &lt;Content Include=\"run\">         &lt;CopyToOutputDirectory>PreserveNewest&lt;\/CopyToOutputDirectory>     &lt;\/Content> &lt;\/ItemGroup>      &lt;ItemGroup Condition=\"$(RuntimeIdentifier.StartsWith('win'))\">     &lt;Content Include=\"run.exe\">         &lt;CopyToOutputDirectory>PreserveNewest&lt;\/CopyToOutputDirectory>     &lt;\/Content> &lt;\/ItemGroup><\/code><\/pre>\n<ul>\n<li>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442<code>ItemGroup<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0435 <code>Condition<\/code><\/p>\n<\/li>\n<li>\n<p>\u0410\u0442\u0440\u0438\u0431\u0443\u0442 <code>Condition<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 <code>ItemGroup<\/code> \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 &#8212; <em>\u0435\u0441\u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e RuntimeIdentifier \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043d\u0430 &#8216;linux&#8217; \u0438\u043b\u0438 &#8216;windows&#8217;<\/em> (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/visualstudio\/msbuild\/msbuild-conditions?view=vs-2022\" rel=\"noopener noreferrer nofollow\">\u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/a> \u0438\u043b\u0438 \u0432 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0435 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438)<\/p>\n<\/li>\n<li>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442<code>Content<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 &#8212; <em>\u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0432 \u0432\u044b\u0445\u043e\u0434\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443<\/em>, \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <code>Include<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043f\u0443\u0442\u044c \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u043e\u0440\u043d\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/ide\/build-actions?view=vs-2022\" rel=\"noopener noreferrer nofollow\">\u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/a>)<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435, \u0444\u0430\u0439\u043b <code>run.exe<\/code> \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0432\u044b\u0445\u043e\u0434\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Windows \u043b\u044e\u0431\u043e\u0439 \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u0438, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, <code>run<\/code> \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0435\u0441\u043b\u0438 \u0441\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f Linux<\/p>\n<h3>UI<\/h3>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 <code>MainWindow.xaml<\/code> \u0434\u043e\u0431\u0430\u0432\u0438\u043c Grid \u0438 \u043a\u043d\u043e\u043f\u043a\u0443 \u0432 \u043d\u0435\u043c, \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 <code>run<\/code>:<\/p>\n<pre><code class=\"xml\">&lt;Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\">   &lt;Button x:Name=\"Opener\">\u041d\u0430\u0436\u043c\u0438&lt;\/Button> &lt;\/Grid><\/code><\/pre>\n<p>\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f Windows: <code>dotnet publish --runtime win-x64 -p:PublishSingleFile=true<\/code><\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f Linux: <code>dotnet publish --runtime linux-x64 -p:PublishSingleFile=true<\/code><\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <strong>&#8212;runtime<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <strong>-p:PublishSingleFile=true<\/strong> \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043e \u0432 \u0435\u0434\u0438\u043d\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b (\u0442\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 &#8212; \u0431\u044b\u043b\u043e \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u0432\u0438\u0434\u043d\u043e, \u043a\u0430\u043a\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043f\u043e\u043f\u0430\u043b\u0438 \u0432 \u043f\u0430\u043f\u043a\u0443 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438)<\/p>\n<\/div>\n<\/details>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c08\/3d6\/42c\/c083d642cd22b353053929927d259591.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0431\u043e\u0440\u043a\u0438 (\u0442\u0435\u043c\u043d\u044b\u0439 \u0444\u043e\u043d - Windows, \u0441\u0432\u0435\u0442\u043b\u044b\u0439 - Linux)\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0431\u043e\u0440\u043a\u0438 (\u0442\u0435\u043c\u043d\u044b\u0439 \u0444\u043e\u043d - Windows, \u0441\u0432\u0435\u0442\u043b\u044b\u0439 - Linux)\" width=\"487\" height=\"211\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c08\/3d6\/42c\/c083d642cd22b353053929927d259591.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0431\u043e\u0440\u043a\u0438 (\u0442\u0435\u043c\u043d\u044b\u0439 \u0444\u043e\u043d &#8212; Windows, \u0441\u0432\u0435\u0442\u043b\u044b\u0439 &#8212; Linux)<\/figcaption><\/div>\n<\/figure>\n<p> \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c \u043f\u043e\u043f\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u0430\u0439\u043b run, \u0430 \u043d\u0435 \u043e\u0431\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f \u0432 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ad1\/317\/8ee\/ad13178ee58da0758cc6d62c9513a433.png\" alt=\"\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c (\u0442\u0435\u043c\u043d\u044b\u0439 \u0444\u043e\u043d - Windows, \u0441\u0432\u0435\u0442\u043b\u044b\u0439 - Linux)\" title=\"\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c (\u0442\u0435\u043c\u043d\u044b\u0439 \u0444\u043e\u043d - Windows, \u0441\u0432\u0435\u0442\u043b\u044b\u0439 - Linux)\" width=\"1240\" height=\"638\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ad1\/317\/8ee\/ad13178ee58da0758cc6d62c9513a433.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c (\u0442\u0435\u043c\u043d\u044b\u0439 \u0444\u043e\u043d &#8212; Windows, \u0441\u0432\u0435\u0442\u043b\u044b\u0439 &#8212; Linux)<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u043e\u043a\u043d\u0430\u0445, \u0432 Windows \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u043a\u043d\u043e \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c <code>Some cool application running...<\/code>, \u0432 Linux \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445.<\/p>\n<h2>\u0421\u043b\u0443\u0447\u0430\u0439 2: \u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441<\/h2>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043e\u043a\u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043f\u0440\u0438\u0447\u0435\u043c \u0441\u0432\u043e\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c. <\/p>\n<h3>\u0420\u0435\u0441\u0443\u0440\u0441\u044b<\/h3>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c 2 \u0444\u0430\u0439\u043b\u0430, <code>windows.png<\/code> \u0438 <code>linux.png<\/code>, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 Images \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0442\u0443\u0434\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/685\/877\/0c2\/6858770c28fd4c99932a5d5dfcf7f907.png\" alt=\"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\" title=\"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\" width=\"445\" height=\"338\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/685\/877\/0c2\/6858770c28fd4c99932a5d5dfcf7f907.png\"\/><\/p>\n<div><figcaption>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0444\u0430\u0439\u043b <strong>CrossPlatform.csproj<\/strong> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"xml\">&lt;ItemGroup Label=\"LinuxResources\" Condition=\"$(RuntimeIdentifier.StartsWith('linux'))\">   &lt;EmbeddedResource Include=\"Images\\linux.png\">       &lt;LogicalName>Images.Banner.png&lt;\/LogicalName>   &lt;\/EmbeddedResource>      &lt;Content Include=\"run\">         &lt;CopyToOutputDirectory>PreserveNewest&lt;\/CopyToOutputDirectory>     &lt;\/Content> &lt;\/ItemGroup>  &lt;ItemGroup Label=\"WindowsResources\" Condition=\"$(RuntimeIdentifier.StartsWith('win'))\">     &lt;EmbeddedResource Include=\"Images\\windows.png\">         &lt;LogicalName>Images.Banner.png&lt;\/LogicalName>     &lt;\/EmbeddedResource>        &lt;Content Include=\"run.exe\">         &lt;CopyToOutputDirectory>PreserveNewest&lt;\/CopyToOutputDirectory>     &lt;\/Content> &lt;\/ItemGroup><\/code><\/pre>\n<ul>\n<li>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 <code>EmbeddedResource<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 (CrossPlatform.exe \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435) \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435, \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>Include<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0444\u0430\u0439\u043b \u043e\u0442 \u043a\u043e\u0440\u043d\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 <code>LogicalName<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0438\u043c\u044f, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0437 \u043a\u043e\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430.<\/p>\n<\/li>\n<\/ul>\n<h2>UI<\/h2>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u043c Grid \u0432 \u0444\u0430\u0439\u043b\u0435 <code>MainWindow.xaml<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code>&lt;Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" ColumnDefinitions=\"2* *\">     &lt;Image Width=\"500\" Margin=\"0 0 150 0\" Grid.Column=\"0\" Source=\"resm:Images.Banner.png\"\/>     &lt;Button Grid.Column=\"1\" x:Name=\"Opener\">\u041d\u0430\u0436\u043c\u0438&lt;\/Button> &lt;\/Grid><\/code><\/pre>\n<p>\u041c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>Image<\/code>, \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>Source<\/code> \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043d\u0430\u0448 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u0432\u0438\u0434\u0430 <code>resm:Images.Banner.png<\/code> (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0432 Avalonia UI <a href=\"https:\/\/docs.avaloniaui.net\/ru\/docs\/0.10.x\/getting-started\/assets\" rel=\"noopener noreferrer nofollow\">\u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/a>). <\/p>\n<p>\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 \u0438\u0437 \u043f\u0443\u043d\u043a\u0442\u0430 1 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/87c\/8bb\/6ed\/87c8bb6ed7112df00fc9b49e18f39040.png\" alt=\"\u041e\u0434\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 2 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 (\u0442\u0435\u043c\u043d\u044b\u0439 \u0444\u043e\u043d - Windows, \u0441\u0432\u0435\u0442\u043b\u044b\u0439 - Linux)\" title=\"\u041e\u0434\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 2 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 (\u0442\u0435\u043c\u043d\u044b\u0439 \u0444\u043e\u043d - Windows, \u0441\u0432\u0435\u0442\u043b\u044b\u0439 - Linux)\" width=\"1920\" height=\"1016\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/87c\/8bb\/6ed\/87c8bb6ed7112df00fc9b49e18f39040.png\"\/><\/p>\n<div><figcaption>\u041e\u0434\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 2 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 (\u0442\u0435\u043c\u043d\u044b\u0439 \u0444\u043e\u043d &#8212; Windows, \u0441\u0432\u0435\u0442\u043b\u044b\u0439 &#8212; Linux)<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f, \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0434\u043b\u044f \u043e\u0431\u0435\u0438\u0445 \u041e\u0421. \u041c\u043e\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 \u0432\u0441\u0442\u0440\u043e\u0438\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430, \u043e\u0442\u043a\u0440\u044b\u0432 \u0444\u0430\u0439\u043b CrossPlatform.exe \u0432 <code>dotPeek<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/218\/919\/aaa\/218919aaae43155df3c510c3cd2e5503.png\" alt=\"\u0420\u0435\u0441\u0443\u0440\u0441\u044b \u0441\u0431\u043e\u0440\u043a\u0438\" title=\"\u0420\u0435\u0441\u0443\u0440\u0441\u044b \u0441\u0431\u043e\u0440\u043a\u0438\" width=\"908\" height=\"650\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/218\/919\/aaa\/218919aaae43155df3c510c3cd2e5503.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0441\u0443\u0440\u0441\u044b \u0441\u0431\u043e\u0440\u043a\u0438<\/figcaption><\/div>\n<\/figure>\n<h2>\u0427\u0442\u043e \u0435\u0441\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f MSBuild<\/h2>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u043a\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438 \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c:<\/p>\n<pre><code class=\"xml\">\/\/\u041f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 &lt;ItemGroup>     &lt;EmbeddedResource Include=\"Images\\linux.png\">         &lt;LogicalName>Images.Banner.Linux.png&lt;\/LogicalName>     &lt;\/EmbeddedResource>     &lt;EmbeddedResource Include=\"Images\\windows.png\">         &lt;LogicalName>Images.Banner.Windows.png&lt;\/LogicalName>     &lt;\/EmbeddedResource> &lt;\/ItemGroup><\/code><\/pre>\n<pre><code class=\"cs\">\/\/\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441 - \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0431\u0438\u043d\u0434\u0438\u043d\u0433\u0430 public class DataProvider {    private static string ImageResourceName => RuntimeInformation.IsOSPlatform(OSPlatform.Linux)                                                    ? \"Images.Banner.Linux.png\"                                                                                                                 : \"Images.Banner.Windows.png\";                                                                                                                                                                public static IImage Image =>                                                                         new Bitmap(Assembly.GetCallingAssembly().GetManifestResourceStream(ImageResourceName));     }<\/code><\/pre>\n<pre><code class=\"xml\">\/\/\u0423\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0432 \u043e\u043a\u043d\u0435 &lt;Window xmlns:nc=\"using:CrossPlatform\" x:DataType=\"nc:DataProvider\" ...> &lt;Window.DataContext>     &lt;nc:DataProvider>&lt;\/nc:DataProvider> &lt;\/Window.DataContext>  \/\/\u0417\u0430\u0431\u0438\u043d\u0434\u0438\u0442\u044c Source \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e Image \u043a\u043b\u0430\u0441\u0441\u0430 DataProvider &lt;Image Width=\"500\" Margin=\"0 0 150 0\" Grid.Column=\"0\" Source=\"{Binding Image}\"\/><\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0440\u044f\u0434\u043e\u043c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u043c\u043e\u0433 \u0431\u044b \u0431\u044b\u0442\u044c, \u0438\u0437-\u0437\u0430 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u0434 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c<\/p>\n<\/li>\n<\/ul>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 MSBuild \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0433\u0438\u0431\u043a\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u0435\u043c, \u0447\u0442\u043e, \u043a\u0430\u043a \u0438 \u0432 \u043f\u0440\u0438 \u043a\u0430\u043a\u0438\u0445 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430\u0445 \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 \u0432\u0430\u0448\u0435\u0433\u043e .NET \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 MSBuild \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043a\u0440\u043e\u0441\u0441-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. <\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/Cregennan\/CrossPlatformMSBuild\" rel=\"noopener noreferrer nofollow\">\u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0430 GitHub<\/a><\/p>\n<details class=\"spoiler\">\n<summary>\u0427\u0442\u043e \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 MSBuild<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 MSBuild \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 (<a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/msbuild\/common-msbuild-project-properties?view=vs-2022\" rel=\"noopener noreferrer nofollow\">\u0440\u0430\u0437<\/a>, <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/dotnet\/core\/project-sdk\/msbuild-props\" rel=\"noopener noreferrer nofollow\">\u0434\u0432\u0430<\/a>) \u0438\u043b\u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432:<\/p>\n<ul>\n<li>\n<p><strong>RuntimeIdentifier(s)<\/strong> &#8212; \u0446\u0435\u043b\u0435\u0432\u0430\u044f(\u044b\u0435) \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430(\u044b) \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0431\u043e\u0440\u043a\u0438<\/p>\n<\/li>\n<li>\n<p><strong>SelfContained<\/strong> &#8212; \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u043c (\u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d \u043b\u0438 runtime \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043a\u043e\u0434\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f)<\/p>\n<\/li>\n<li>\n<p><strong>Configuration<\/strong> (\u043e\u0431\u044b\u0447\u043d\u043e Debug \u0438\u043b\u0438 Release) &#8212; \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441\u0431\u043e\u0440\u043a\u0438<\/p>\n<\/li>\n<li>\n<p><strong>ImplicitUsings <\/strong>&#8212; \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043b\u0438 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430<a href=\"https:\/\/endjin.com\/blog\/2021\/09\/dotnet-csharp-10-implicit-global-using-directives\" rel=\"noopener noreferrer nofollow\"> \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/li>\n<\/ul>\n<h3>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438<\/h3>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/visualstudio\/msbuild\/msbuild-conditions?view=vs-2022\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a><\/p>\n<ul>\n<li>\n<p>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f (==, !=, &lt;, >, &lt;=, >=)<\/p>\n<\/li>\n<li>\n<p>Exists(&#8216;filename&#8217;) &#8212; \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b\/\u043f\u0430\u043f\u043a\u0430<\/p>\n<\/li>\n<li>\n<p>\u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 (!, And, Or)<\/p>\n<\/li>\n<\/ul>\n<h3>\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h3>\n<p>\u041c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0437<a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/msbuild\/property-functions?view=vs-2022\" rel=\"noopener noreferrer nofollow\"> \u044d\u0442\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 BCL<\/a>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"cs\">\/\/\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 Condition=\"$(RuntimeIdentifier.StartsWith('linux'))\" \/\/ String.StartsWith    Condition=\"$(SomeCustomProperty.Trim('linux') == 'SomeCustomValue')\" \/\/ String.Trim  \/\/\u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f Condition=\"$([System.Text.RegularExpressions.Regex]::IsMatch(          $(DefineConstants), '^(.*;)*SOME_CONTANT_NAME(;.*)*$'))\"<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/791512\/\"> https:\/\/habr.com\/ru\/articles\/791512\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 .NET \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b. \u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0438 \u0444\u0430\u0439\u043b\u043e\u0432 CSS. \u0422\u0430\u043a\u0436\u0435 \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0432\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 MSBuild \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, Windows \u0438 Linux \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 (\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u041e\u0421, \u0438\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u044b \u0438\u043b\u0438 \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u044e\u0442). <\/p>\n<h2>\u041d\u0430\u0447\u0430\u043b\u043e<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 <strong>CrossPlatform<\/strong> (\u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f Avalonia UI, \u0443 \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0442\u0438\u043f\u0430), \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0431\u043b\u043e\u043a <code>PropertyGroup<\/code> \u0444\u0430\u0439\u043b\u0430 <code>CrossPlatform.csproj<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre><code class=\"xml\">&lt;RuntimeIdentifiers>win-x64; linux-x64&lt;\/RuntimeIdentifiers><\/code><\/pre>\n<p>\u042d\u0442\u0438\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c MSBuild, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u043d\u0430 64 \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0445 Windows \u0438 Linux.<\/p>\n<h2>\u0421\u043b\u0443\u0447\u0430\u0439 1: \u0418\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>\u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <code>pandoc<\/code> \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c, \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 <code>pdf<\/code><\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <code>run<\/code> \u043d\u0430 C++ \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 5 \u0441\u0435\u043a\u0443\u043d\u0434, \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c Windows \u0438 Linux.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;chrono> #include &lt;thread> int main() {     std::cout &lt;&lt; \"Some cool application running...\" &lt;&lt; std::endl;     std::this_thread::sleep_for(std::chrono::milliseconds(5000)); }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h3>\u0420\u0435\u0441\u0443\u0440\u0441\u044b<\/h3>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b <code>run<\/code> (\u0434\u043b\u044f Linux) \u0438 <code>run.exe<\/code> (\u0434\u043b\u044f Windows) \u0432 \u043a\u043e\u0440\u0435\u043d\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412 \u0444\u0430\u0439\u043b <code>CrossPlatform.csproj<\/code> \u043f\u043e\u0441\u043b\u0435 \u0441\u0435\u043a\u0446\u0438\u0438 <code>PropertyGroup<\/code> \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"xml\">&lt;ItemGroup Condition=\"$(RuntimeIdentifier.StartsWith('linux'))\">     &lt;Content Include=\"run\">         &lt;CopyToOutputDirectory>PreserveNewest&lt;\/CopyToOutputDirectory>     &lt;\/Content> &lt;\/ItemGroup>      &lt;ItemGroup Condition=\"$(RuntimeIdentifier.StartsWith('win'))\">     &lt;Content Include=\"run.exe\">         &lt;CopyToOutputDirectory>PreserveNewest&lt;\/CopyToOutputDirectory>     &lt;\/Content> &lt;\/ItemGroup><\/code><\/pre>\n<ul>\n<li>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442<code>ItemGroup<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0435 <code>Condition<\/code><\/p>\n<\/li>\n<li>\n<p>\u0410\u0442\u0440\u0438\u0431\u0443\u0442 <code>Condition<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 <code>ItemGroup<\/code> \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 &#8212; <em>\u0435\u0441\u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e RuntimeIdentifier \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043d\u0430 &#8216;linux&#8217; \u0438\u043b\u0438 &#8216;windows&#8217;<\/em> (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/visualstudio\/msbuild\/msbuild-conditions?view=vs-2022\" rel=\"noopener noreferrer nofollow\">\u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/a> \u0438\u043b\u0438 \u0432 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0435 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438)<\/p>\n<\/li>\n<li>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442<code>Content<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 &#8212; <em>\u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0432 \u0432\u044b\u0445\u043e\u0434\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443<\/em>, \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <code>Include<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043f\u0443\u0442\u044c \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u043e\u0440\u043d\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/ide\/build-actions?view=vs-2022\" rel=\"noopener noreferrer nofollow\">\u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/a>)<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435, \u0444\u0430\u0439\u043b <code>run.exe<\/code> \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0432\u044b\u0445\u043e\u0434\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Windows \u043b\u044e\u0431\u043e\u0439 \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u0438, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, <code>run<\/code> \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0435\u0441\u043b\u0438 \u0441\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f Linux<\/p>\n<h3>UI<\/h3>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 <code>MainWindow.xaml<\/code> \u0434\u043e\u0431\u0430\u0432\u0438\u043c Grid \u0438 \u043a\u043d\u043e\u043f\u043a\u0443 \u0432 \u043d\u0435\u043c, \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 <code>run<\/code>:<\/p>\n<pre><code class=\"xml\">&lt;Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\">   &lt;Button x:Name=\"Opener\">\u041d\u0430\u0436\u043c\u0438&lt;\/Button> &lt;\/Grid><\/code><\/pre>\n<p>\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f Windows: <code>dotnet publish --runtime win-x64 -p:PublishSingleFile=true<\/code><\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f Linux: <code>dotnet publish --runtime linux-x64 -p:PublishSingleFile=true<\/code><\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <strong>&#8212;runtime<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <strong>-p:PublishSingleFile=true<\/strong> \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043e \u0432 \u0435\u0434\u0438\u043d\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b (\u0442\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 &#8212; \u0431\u044b\u043b\u043e \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u0432\u0438\u0434\u043d\u043e, \u043a\u0430\u043a\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043f\u043e\u043f\u0430\u043b\u0438 \u0432 \u043f\u0430\u043f\u043a\u0443 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438)<\/p>\n<\/div>\n<\/details>\n<figure class=\"\">\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0431\u043e\u0440\u043a\u0438 (\u0442\u0435\u043c\u043d\u044b\u0439 \u0444\u043e\u043d &#8212; Windows, \u0441\u0432\u0435\u0442\u043b\u044b\u0439 &#8212; Linux)<\/figcaption><\/div>\n<\/figure>\n<p> \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c \u043f\u043e\u043f\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u0430\u0439\u043b run, \u0430 \u043d\u0435 \u043e\u0431\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f \u0432 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c (\u0442\u0435\u043c\u043d\u044b\u0439 \u0444\u043e\u043d &#8212; Windows, \u0441\u0432\u0435\u0442\u043b\u044b\u0439 &#8212; Linux)<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u043e\u043a\u043d\u0430\u0445, \u0432 Windows \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u043a\u043d\u043e \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c <code>Some cool application running...<\/code>, \u0432 Linux \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445.<\/p>\n<h2>\u0421\u043b\u0443\u0447\u0430\u0439 2: \u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441<\/h2>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043e\u043a\u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043f\u0440\u0438\u0447\u0435\u043c \u0441\u0432\u043e\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c. <\/p>\n<h3>\u0420\u0435\u0441\u0443\u0440\u0441\u044b<\/h3>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c 2 \u0444\u0430\u0439\u043b\u0430, <code>windows.png<\/code> \u0438 <code>linux.png<\/code>, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 Images \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0442\u0443\u0434\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<figure class=\"\">\n<div><figcaption>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0444\u0430\u0439\u043b <strong>CrossPlatform.csproj<\/strong> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"xml\">&lt;ItemGroup Label=\"LinuxResources\" Condition=\"$(RuntimeIdentifier.StartsWith('linux'))\">   &lt;EmbeddedResource Include=\"Images\\linux.png\">       &lt;LogicalName>Images.Banner.png&lt;\/LogicalName>   &lt;\/EmbeddedResource>      &lt;Content Include=\"run\">         &lt;CopyToOutputDirectory>PreserveNewest&lt;\/CopyToOutputDirectory>     &lt;\/Content> &lt;\/ItemGroup>  &lt;ItemGroup Label=\"WindowsResources\" Condition=\"$(RuntimeIdentifier.StartsWith('win'))\">     &lt;EmbeddedResource Include=\"Images\\windows.png\">         &lt;LogicalName>Images.Banner.png&lt;\/LogicalName>     &lt;\/EmbeddedResource>        &lt;Content Include=\"run.exe\">         &lt;CopyToOutputDirectory>PreserveNewest&lt;\/CopyToOutputDirectory>     &lt;\/Content> &lt;\/ItemGroup><\/code><\/pre>\n<ul>\n<li>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 <code>EmbeddedResource<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 (CrossPlatform.exe \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435) \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435, \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>Include<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0444\u0430\u0439\u043b \u043e\u0442 \u043a\u043e\u0440\u043d\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 <code>LogicalName<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0438\u043c\u044f, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0437 \u043a\u043e\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430.<\/p>\n<\/li>\n<\/ul>\n<h2>UI<\/h2>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u043c Grid \u0432 \u0444\u0430\u0439\u043b\u0435 <code>MainWindow.xaml<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code>&lt;Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" ColumnDefinitions=\"2* *\">     &lt;Image Width=\"500\" Margin=\"0 0 150 0\" Grid.Column=\"0\" Source=\"resm:Images.Banner.png\"\/>     &lt;Button Grid.Column=\"1\" x:Name=\"Opener\">\u041d\u0430\u0436\u043c\u0438&lt;\/Button> &lt;\/Grid><\/code><\/pre>\n<p>\u041c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>Image<\/code>, \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>Source<\/code> \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043d\u0430\u0448 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u0432\u0438\u0434\u0430 <code>resm:Images.Banner.png<\/code> (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0432 Avalonia UI <a href=\"https:\/\/docs.avaloniaui.net\/ru\/docs\/0.10.x\/getting-started\/assets\" rel=\"noopener noreferrer nofollow\">\u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/a>). <\/p>\n<p>\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 \u0438\u0437 \u043f\u0443\u043d\u043a\u0442\u0430 1 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041e\u0434\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 2 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 (\u0442\u0435\u043c\u043d\u044b\u0439 \u0444\u043e\u043d &#8212; Windows, \u0441\u0432\u0435\u0442\u043b\u044b\u0439 &#8212; Linux)<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f, \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0434\u043b\u044f \u043e\u0431\u0435\u0438\u0445 \u041e\u0421. \u041c\u043e\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 \u0432\u0441\u0442\u0440\u043e\u0438\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430, \u043e\u0442\u043a\u0440\u044b\u0432 \u0444\u0430\u0439\u043b CrossPlatform.exe \u0432 <code>dotPeek<\/code>:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0435\u0441\u0443\u0440\u0441\u044b \u0441\u0431\u043e\u0440\u043a\u0438<\/figcaption><\/div>\n<\/figure>\n<h2>\u0427\u0442\u043e \u0435\u0441\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f MSBuild<\/h2>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u043a\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438 \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c:<\/p>\n<pre><code class=\"xml\">\/\/\u041f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 &lt;ItemGroup>     &lt;EmbeddedResource Include=\"Images\\linux.png\">         &lt;LogicalName>Images.Banner.Linux.png&lt;\/LogicalName>     &lt;\/EmbeddedResource>     &lt;EmbeddedResource Include=\"Images\\windows.png\">         &lt;LogicalName>Images.Banner.Windows.png&lt;\/LogicalName>     &lt;\/EmbeddedResource> &lt;\/ItemGroup><\/code><\/pre>\n<pre><code class=\"cs\">\/\/\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441 - \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0431\u0438\u043d\u0434\u0438\u043d\u0433\u0430 public class DataProvider {    private static string ImageResourceName => RuntimeInformation.IsOSPlatform(OSPlatform.Linux)                                                    ? \"Images.Banner.Linux.png\"                                                                                                                 : \"Images.Banner.Windows.png\";                                                                                                                                                                public static IImage Image =>                                                                         new Bitmap(Assembly.GetCallingAssembly().GetManifestResourceStream(ImageResourceName));     }<\/code><\/pre>\n<pre><code class=\"xml\">\/\/\u0423\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0432 \u043e\u043a\u043d\u0435 &lt;Window xmlns:nc=\"using:CrossPlatform\" x:DataType=\"nc:DataProvider\" ...> &lt;Window.DataContext>     &lt;nc:DataProvider>&lt;\/nc:DataProvider> &lt;\/Window.DataContext>  \/\/\u0417\u0430\u0431\u0438\u043d\u0434\u0438\u0442\u044c Source \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e Image \u043a\u043b\u0430\u0441\u0441\u0430 DataProvider &lt;Image Width=\"500\" Margin=\"0 0 150 0\" Grid.Column=\"0\" Source=\"{Binding Image}\"\/><\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0440\u044f\u0434\u043e\u043c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u043c\u043e\u0433 \u0431\u044b \u0431\u044b\u0442\u044c, \u0438\u0437-\u0437\u0430 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u0434 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c<\/p>\n<\/li>\n<\/ul>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 MSBuild \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0433\u0438\u0431\u043a\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u0435\u043c, \u0447\u0442\u043e, \u043a\u0430\u043a \u0438 \u0432 \u043f\u0440\u0438 \u043a\u0430\u043a\u0438\u0445 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430\u0445 \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 \u0432\u0430\u0448\u0435\u0433\u043e .NET \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 MSBuild \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043a\u0440\u043e\u0441\u0441-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. <\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/Cregennan\/CrossPlatformMSBuild\" rel=\"noopener noreferrer nofollow\">\u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0430 GitHub<\/a><\/p>\n<details class=\"spoiler\">\n<summary>\u0427\u0442\u043e \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 MSBuild<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 MSBuild \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 (<a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/msbuild\/common-msbuild-project-properties?view=vs-2022\" rel=\"noopener noreferrer nofollow\">\u0440\u0430\u0437<\/a>, <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/dotnet\/core\/project-sdk\/msbuild-props\" rel=\"noopener noreferrer nofollow\">\u0434\u0432\u0430<\/a>) \u0438\u043b\u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432:<\/p>\n<ul>\n<li>\n<p><strong>RuntimeIdentifier(s)<\/strong> &#8212; \u0446\u0435\u043b\u0435\u0432\u0430\u044f(\u044b\u0435) \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430(\u044b) \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0431\u043e\u0440\u043a\u0438<\/p>\n<\/li>\n<li>\n<p><strong>SelfContained<\/strong> &#8212; \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u043c (\u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d \u043b\u0438 runtime \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043a\u043e\u0434\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f)<\/p>\n<\/li>\n<li>\n<p><strong>Configuration<\/strong> (\u043e\u0431\u044b\u0447\u043d\u043e Debug \u0438\u043b\u0438 Release) &#8212; \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441\u0431\u043e\u0440\u043a\u0438<\/p>\n<\/li>\n<li>\n<p><strong>ImplicitUsings <\/strong>&#8212; \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043b\u0438 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430<a href=\"https:\/\/endjin.com\/blog\/2021\/09\/dotnet-csharp-10-implicit-global-using-directives\" rel=\"noopener noreferrer nofollow\"> \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/a><\/p>\n<\/li>\n<\/ul>\n<h3>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438<\/h3>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/visualstudio\/msbuild\/msbuild-conditions?view=vs-2022\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a><\/p>\n<ul>\n<li>\n<p>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f (==, !=, &lt;, >, &lt;=, >=)<\/p>\n<\/li>\n<li>\n<p>Exists(&#8216;filename&#8217;) &#8212; \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b\/\u043f\u0430\u043f\u043a\u0430<\/p>\n<\/li>\n<li>\n<p>\u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 (!, And, Or)<\/p>\n<\/li>\n<\/ul>\n<h3>\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h3>\n<p>\u041c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0437<a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/msbuild\/property-functions?view=vs-2022\" rel=\"noopener noreferrer nofollow\"> \u044d\u0442\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 BCL<\/a>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"cs\">\/\/\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 Condition=\"$(RuntimeIdentifier.StartsWith('linux'))\" \/\/ String.StartsWith    Condition=\"$(SomeCustomProperty.Trim('linux') == 'SomeCustomValue')\" \/\/ String.Trim  \/\/\u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f Condition=\"$([System.Text.RegularExpressions.Regex]::IsMatch(          $(DefineConstants), '^(.*;)*SOME_CONTANT_NAME(;.*)*$'))\"<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/791512\/\"> https:\/\/habr.com\/ru\/articles\/791512\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-367343","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/367343","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=367343"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/367343\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=367343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=367343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=367343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}