-
Notifications
You must be signed in to change notification settings - Fork 22
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
Update Shopify and Dynamics to exclude V8 rendering view. #243
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides aligning the view paths for the different versions, make sure to test whether the views are still copied over on .NET Framework (this doesn't seem to be the case by just looking at the code)...
@@ -15,7 +15,7 @@ public static class Constants | |||
|
|||
public static class RenderingComponent | |||
{ | |||
public const string DefaultV8ViewPath = AppPluginFolderPath + "/Render/Products.cshtml"; | |||
public const string DefaultV8ViewPath = AppPluginFolderPath + "/RenderV8/Products.cshtml"; | |||
|
|||
public const string DefaultV9ViewPath = AppPluginFolderPath + "/Render/ProductsV9.cshtml"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to change this path to also have the version in the folder name?
public const string DefaultV9ViewPath = AppPluginFolderPath + "/Render/ProductsV9.cshtml"; | |
public const string DefaultV9ViewPath = AppPluginFolderPath + "/RenderV9/Products.cshtml"; |
@@ -4,9 +4,10 @@ | |||
<ShopifyPropertyEditorFiles>$(MSBuildThisFileDirectory)..\App_Plugins\UmbracoCms.Integrations\Commerce\Shopify\**\*.*</ShopifyPropertyEditorFiles> | |||
</PropertyGroup> | |||
|
|||
<Target Name="CopyShopifyPropertyEditorAssets" BeforeTargets="Build"> | |||
<Target Condition=" '$(TargetFramework)' != 'net472' " Name="CopyShopifyPropertyEditorAssets" BeforeTargets="Build"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this condition be on the ShopifyPropertyEditorFiles
item group instead, since this target needs to run on both .NET Framework and modern .NET?
And instead of adding multiple includes/excludes, use this instead:
<ShopifyPropertyEditorFiles Include="$(ShopifyPropertyEditorFiles)" />
<ShopifyPropertyEditorFiles Condition="'$(TargetFramework)' != 'net472'" Remove="$(MSBuildThisFileDirectory)..\App_Plugins\UmbracoCms.Integrations\Commerce\Shopify\RenderV8\*.*" />
<ShopifyPropertyEditorFiles Condition="'$(TargetFramework)' == 'net472'" Remove="$(MSBuildThisFileDirectory)..\App_Plugins\UmbracoCms.Integrations\Commerce\Shopify\RenderV9\*.*" />
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion @ronaldbarendse , updated accordingly. On V8 it works fine.
Current PR addresses the issue raised with item #239 , for integrations that have a rendering view for Umbraco 8.
While running in production runtime mode, due to the V8 view, a compilation error occurs.
To address this, I've moved the rendering view to a different folder and excluded it during copy if the targeting framework is not .NET 4.7.2.