Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images not generated for .NET Core 3.1 WPF project #29

Open
follesoe opened this issue Oct 22, 2020 · 2 comments
Open

Images not generated for .NET Core 3.1 WPF project #29

follesoe opened this issue Oct 22, 2020 · 2 comments

Comments

@follesoe
Copy link

The images are not generated for my .NET Core 3.1 WPF project. I have verified that my app works as expected on Android, iOS, and UWP.

Looking at https://github.com/Redth/ResizetizerNT/blob/master/Resizetizer.NT/Resizetizer.NT.targets#L21 the _ResizetizerIsWPF variable is set using this expression:

<_ResizetizerIsWPF Condition="'$(IsApplication)' == 'True' And '$(NuGetRuntimeIdentifier)' == 'win' And '$(TargetPlatformIdentifier)'=='Windows'">True</_ResizetizerIsWPF>

In my WPF project I added the following target to debug the build:

<Target Name="ResizeTizerDebug" BeforeTargets="Build" Condition="true">
  <Message Text="IsApplication=$(IsApplication), NuGetRuntimeIdentifier=$(NuGetRuntimeIdentifier), TargetPlatformIdentifier=$(TargetPlatformIdentifier), _ResizetizerIsWPF=$(_ResizetizerIsWPF)" Importance="high" />
</Target>

The output of the debug message is as follow:

IsApplication=true, NuGetRuntimeIdentifier=, TargetPlatformIdentifier=Windows, _ResizetizerIsWPF=

So based on the check it looks like the '$(NuGetRuntimeIdentifier)' == 'win' check will not be true, as the $(NuGetRuntimeIdentifier) is not set.

@follesoe
Copy link
Author

I was able to work around the issue by setting the _ResizetizerIsWPF property manually in the WPF .csproj file:

<PropertyGroup>
  <_ResizetizerIsWPF>true</_ResizetizerIsWPF>
</PropertyGroup>

But the $(NuGetRuntimeIdentifier) issue is probably something to fix/understand.

@Redth
Copy link
Owner

Redth commented Oct 27, 2020

Looks like i'll need to find a better way to detect WPF for net core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants