Skip to content

Commit 6fa8147

Browse files
authored
Merge pull request #500 from microsoft/user/nuform/gallery_release
Fix DXResource Binding Publish Crash & Update to DotNet 6
2 parents 0091c7e + 3791b86 commit 6fa8147

18 files changed

+59
-41
lines changed

Samples/WinMLSamplesGallery/WinMLSamplesGallery (Package)/Package.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<Identity
1010
Name="MicrosoftCorporationII.WindowsMLSamplesGallery"
1111
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
12-
Version="1.0.7.0" />
12+
Version="1.0.17.0" />
1313

1414
<Properties>
1515
<DisplayName>Windows ML Samples Gallery</DisplayName>

Samples/WinMLSamplesGallery/WinMLSamplesGallery (Package)/WinMLSamplesGallery (Package).wapproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,15 @@
4444
<AppxPackageSigningEnabled>False</AppxPackageSigningEnabled>
4545
<EntryPointProjectUniqueName>..\WinMLSamplesGallery\WinMLSamplesGallery.csproj</EntryPointProjectUniqueName>
4646
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
47-
<PackageCertificateThumbprint>25067E5853327016828B1097611C6D97DAF9F5E8</PackageCertificateThumbprint>
47+
<PackageCertificateThumbprint>57F96FCC00B6C183E454195CB67BE5961D5BCEBB</PackageCertificateThumbprint>
4848
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
4949
<GenerateTestArtifacts>True</GenerateTestArtifacts>
5050
<AppxBundlePlatforms>x86|x64|arm64</AppxBundlePlatforms>
5151
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
5252
</PropertyGroup>
53+
<PropertyGroup>
54+
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
55+
</PropertyGroup>
5356
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm64'">
5457
<AppxBundle>Always</AppxBundle>
5558
</PropertyGroup>

Samples/WinMLSamplesGallery/WinMLSamplesGallery/Samples/DXResourceBindingORT/DXResourceBindingORT.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ private async void LaunchWindow(object sender, RoutedEventArgs e)
4141
ToggleLaunchWindowButton();
4242
ToggleLoadingTxtVisibility();
4343

44-
await Task.Run(() => WinMLSamplesGalleryNative.DXResourceBinding.LaunchWindow());
44+
var packagePath = Windows.ApplicationModel.Package.Current.InstalledLocation.Path;
45+
await Task.Run(() => WinMLSamplesGalleryNative.DXResourceBinding.LaunchWindow(packagePath));
4546

4647
ToggleLoadingTxtVisibility();
4748
ClassifyCube();

Samples/WinMLSamplesGallery/WinMLSamplesGallery/WinMLSamplesGallery.csproj

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
4-
<TargetFramework>net5.0-windows10.0.19041.0</TargetFramework>
4+
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
55
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
66
<RootNamespace>WinMLSamplesGallery</RootNamespace>
77
<ApplicationManifest>app.manifest</ApplicationManifest>
@@ -18,6 +18,9 @@
1818
<DefineConstants Condition="$(UseOpenCV)">$(DefineConstants);USE_OPENCV</DefineConstants>
1919
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
2020
</PropertyGroup>
21+
<PropertyGroup>
22+
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
23+
</PropertyGroup>
2124
<ItemGroup>
2225
<Compile Remove="Samples\EncryptedResource\**" />
2326
<EmbeddedResource Remove="Samples\EncryptedResource\**" />
@@ -30,6 +33,8 @@
3033
<ItemGroup>
3134
<None Remove="AllSamplesPage.xaml" />
3235
<None Remove="Controls\PerformanceMonitor.xaml" />
36+
<None Remove="dx_preprocessor_efficient_net.onnx" />
37+
<None Remove="efficientnet-lite4-11.onnx" />
3338
<None Remove="HomePage.xaml" />
3439
<None Remove="Models\fcn-resnet50-12.onnx" />
3540
<None Remove="Models\mosaic.onnx" />
@@ -43,9 +48,12 @@
4348
<None Remove="Samples\ObjectDetector\ObjectDetector.xaml" />
4449
<None Remove="Samples\OpenCVInterop\OpenCVInterop.xaml" />
4550
<None Remove="Samples\ImageSharpInterop\ImageSharpInterop.xaml" />
51+
<None Remove="shaders.hlsl" />
4652
<None Remove="Video.xaml" />
4753
</ItemGroup>
4854
<ItemGroup>
55+
<Content Include="dx_preprocessor_efficient_net.onnx" />
56+
<Content Include="efficientnet-lite4-11.onnx" />
4957
<Content Include="Models\fcn-resnet50-12.onnx">
5058
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
5159
</Content>
@@ -69,6 +77,7 @@
6977
<Content Include="Models\efficientnet-lite4-11.onnx" />
7078
<Content Include="Models\shufflenet-9.onnx" />
7179
<Content Include="Models\squeezenet1.1-7.onnx" />
80+
<Content Include="shaders.hlsl" />
7281
</ItemGroup>
7382
<!-- Large Models -->
7483
<ItemGroup Condition="$(UseLargeModels)">

Samples/WinMLSamplesGallery/WinMLSamplesGalleryNative/cat.jpg renamed to Samples/WinMLSamplesGallery/WinMLSamplesGallery/cat.jpg

File renamed without changes.

Samples/WinMLSamplesGallery/WinMLSamplesGalleryNative/dog.jpg renamed to Samples/WinMLSamplesGallery/WinMLSamplesGallery/dog.jpg

File renamed without changes.

Samples/WinMLSamplesGallery/WinMLSamplesGalleryNative/dx_preprocessor_efficient_net.onnx renamed to Samples/WinMLSamplesGallery/WinMLSamplesGallery/dx_preprocessor_efficient_net.onnx

File renamed without changes.

Samples/WinMLSamplesGallery/WinMLSamplesGalleryNative/efficientnet-lite4-11.onnx renamed to Samples/WinMLSamplesGallery/WinMLSamplesGallery/efficientnet-lite4-11.onnx

File renamed without changes.

Samples/WinMLSamplesGallery/WinMLSamplesGalleryNative/hummingbird.jpg renamed to Samples/WinMLSamplesGallery/WinMLSamplesGallery/hummingbird.jpg

File renamed without changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#pragma once
2+
3+
struct PSInput
4+
{
5+
float4 position : SV_POSITION;
6+
float2 uv : TEXCOORD;
7+
};
8+
9+
Texture2D g_texture : register(t0);
10+
SamplerState g_sampler : register(s0);
11+
12+
PSInput VSMain(float4 position : POSITION, float4 uv : TEXCOORD)
13+
{
14+
PSInput result;
15+
16+
result.position = position;
17+
result.uv = uv;
18+
19+
return result;
20+
}
21+
22+
float4 PSMain(PSInput input) : SV_TARGET
23+
{
24+
return g_texture.Sample(g_sampler, input.uv);
25+
}

0 commit comments

Comments
 (0)