зеркало из https://github.com/dotnet/infer.git
Use WindowsDesktop SDK to bring Windows Forms and WPF into project. (#234)
ClickThroughModel can run with .NET core (when explicitly built)
This commit is contained in:
Родитель
f72fe0f846
Коммит
2ebf99a950
|
@ -1,11 +1,37 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net461</TargetFramework>
|
||||
<Configurations>Debug;DebugFull;DebugCore;Release;ReleaseFull;ReleaseCore</Configurations>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
</PropertyGroup>
|
||||
|
||||
<Choose>
|
||||
<When Condition="'$(Configuration)'=='DebugFull' OR '$(Configuration)'=='ReleaseFull'">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net461</TargetFramework>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<When Condition="'$(Configuration)'=='DebugCore' OR '$(Configuration)'=='ReleaseCore'">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1'">
|
||||
<DefineConstants>$(DefineConstants);NETCORE;NETSTANDARD;NETSTANDARD2_0</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'net461'">
|
||||
<DefineConstants>$(DefineConstants);NETFULL</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
@ -51,10 +77,6 @@
|
|||
<ProjectReference Include="..\..\Runtime\Runtime.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{B4F97281-0DBD-4835-9ED8-7DFB966E87FF}" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
using System;
|
||||
using Microsoft.ML.Probabilistic.Models;
|
||||
using Microsoft.ML.Probabilistic.Distributions;
|
||||
using Range = Microsoft.ML.Probabilistic.Models.Range;
|
||||
|
||||
namespace ClickThroughModel
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -7,6 +7,7 @@
|
|||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<UseWpf>true</UseWpf>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
@ -42,48 +43,17 @@
|
|||
<Optimize>true</Optimize>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="App.xaml" />
|
||||
<None Remove="ClinicalTrial.xaml" />
|
||||
<None Remove="Images\Infer.ico" />
|
||||
<None Remove="Images\patient.png" />
|
||||
<None Remove="Images\pill-yellow.png" />
|
||||
<None Remove="Images\placebo-blue.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Compiler\Compiler.csproj" />
|
||||
<ProjectReference Include="..\..\Runtime\Runtime.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\Shared\SharedAssemblyFileVersion.cs" />
|
||||
<Compile Include="..\..\Shared\SharedAssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Page Include="ClinicalTrial.xaml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\Infer.ico" />
|
||||
<Resource Include="Images\patient.png" />
|
||||
<Resource Include="Images\pill-yellow.png" />
|
||||
<Resource Include="Images\placebo-blue.png" />
|
||||
<Resource Include="Images\*" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -7,6 +7,8 @@
|
|||
<Configurations>Debug;DebugFull;DebugCore;Release;ReleaseFull;ReleaseCore</Configurations>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<UseWpf>true</UseWpf>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
@ -42,32 +44,11 @@
|
|||
<Optimize>true</Optimize>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="ClassifierView.xaml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="UIAutomationProvider" />
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\Shared\SharedAssemblyFileVersion.cs" />
|
||||
<Compile Include="..\..\Shared\SharedAssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Page Include="ClassifierView.xaml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Compiler\Compiler.csproj" />
|
||||
<ProjectReference Include="..\..\Runtime\Runtime.csproj" />
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -7,6 +7,7 @@
|
|||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<UseWpf>true</UseWpf>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
@ -46,30 +47,11 @@
|
|||
<ProjectReference Include="..\..\Compiler\Compiler.csproj" />
|
||||
<ProjectReference Include="..\..\Runtime\Runtime.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\Shared\SharedAssemblyFileVersion.cs" />
|
||||
<Compile Include="..\..\Shared\SharedAssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Page Include="Window1.xaml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\*" />
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
|
||||
<AddSyntheticProjectReferencesForSolutionDependencies>false</AddSyntheticProjectReferencesForSolutionDependencies>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\..\..\build\nuget-properties.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -11,6 +11,7 @@
|
|||
<RootNamespace>Microsoft.ML.Probabilistic.Compiler.Visualizers</RootNamespace>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
<MonoSupport>false</MonoSupport>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<DefineConstants Condition=" '$(MonoSupport)' == 'false' ">$(DefineConstants);INCLUDE_TRANSFORM_BROWSER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -26,33 +27,15 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Msagl" Version="1.1.3" />
|
||||
<PackageReference Include="Microsoft.Msagl.Drawing" Version="1.1.3" />
|
||||
<PackageReference Include="Microsoft.Msagl.GraphViewerGdi" Version="1.1.3" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<EmbeddedResource Update="*.resx">
|
||||
<DependentUpon>%(FileName).cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<PackageReference Include="Microsoft.Msagl" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.Msagl.Drawing" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.Msagl.GraphViewerGdi" Version="1.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition=" $(DefineConstants.Contains('INCLUDE_TRANSFORM_BROWSER'))">
|
||||
<UseWpf>true</UseWpf>
|
||||
<LanguageTargets Condition="Exists('$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets')">$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition="$(DefineConstants.Contains('INCLUDE_TRANSFORM_BROWSER'))">
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="WindowsBase" />
|
||||
<!-- XAML elements -->
|
||||
<!-- Workaround to make xamls appear in the VS solution explorer -->
|
||||
<None Include="**\*.xaml" />
|
||||
<Page Include="**\*.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Compile Update="**\*.xaml.cs" SubType="Code" DependentUpon="%(Filename)" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" !($(DefineConstants.Contains('INCLUDE_TRANSFORM_BROWSER')))">
|
||||
<!-- XAML elements -->
|
||||
<None Include="**\*.xaml" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче