diff --git a/src/IKVM.Image/IKVM.Image.csproj b/src/IKVM.Image/IKVM.Image.csproj
index 17925f663..c4ee10efc 100644
--- a/src/IKVM.Image/IKVM.Image.csproj
+++ b/src/IKVM.Image/IKVM.Image.csproj
@@ -31,7 +31,6 @@
-
diff --git a/src/IKVM.Image/buildTransitive/IKVM.Image.targets b/src/IKVM.Image/buildTransitive/IKVM.Image.targets
index a326018b7..86e4ae4fc 100644
--- a/src/IKVM.Image/buildTransitive/IKVM.Image.targets
+++ b/src/IKVM.Image/buildTransitive/IKVM.Image.targets
@@ -8,6 +8,15 @@
+
+ ikvm
+ ikvm.properties
+ PreserveNewest
+
+ PreserveNewest
+
+
+
@@ -102,9 +111,10 @@
<_IkvmImageItemExpanded Update="@(_IkvmImageItemExpanded)">
- ikvm\%(_IkvmImageItemExpanded.RuntimeIdentifier)\%(_IkvmImageItemExpanded.ImagePath)
- PreserveNewest
- ikvm\%(_IkvmImageItemExpanded.RuntimeIdentifier)\%(_IkvmImageItemExpanded.ImagePath)
+ $(IkvmImageTargetPath)\%(_IkvmImageItemExpanded.RuntimeIdentifier)\%(_IkvmImageItemExpanded.ImagePath)
+ $(CopyIkvmImageItemToOutputDirectory)
+ $(CopyIkvmImageItemToPublishDirectory)
+ $(IkvmImageTargetPath)\%(_IkvmImageItemExpanded.RuntimeIdentifier)\%(_IkvmImageItemExpanded.ImagePath)
false
@@ -138,12 +148,13 @@
<_FilterIkvmImageItems Items="@(_IkvmImageItemExpanded)">
-
-
-
+
<_IkvmImageItemExpanded Remove="@(_IkvmImageItemExpanded)" />
+ <_SourceItemsToCopyToOutputDirectory Include="@(_IkvmImageItemFiltered)" Condition=" '$(IkvmImageItemToNone)' != 'true' " />
+ <_SourceItemsToCopyToPublishDirectory Include="@(_IkvmImageItemFiltered)" Condition=" '$(IkvmImageItemToNone)' != 'true' " />
+
@@ -154,18 +165,22 @@
-
+
-
- PreserveNewest
- ikvm.properties
- ikvm.properties
-
+ <_IkvmPropertiesFileLine Include="ikvm.home.root=$(IkvmImageTargetPath)" />
+
-
-
+
+
+
+ $(CopyIkvmPropertiesFileToOutputDirectory)
+ $(CopyIkvmPropertiesFileToPublishDirectory)
+ $(IkvmPropertiesFileName)
+ $(IkvmPropertiesFileName)
+
+
@@ -176,10 +191,15 @@
+
+
+
+
CollectIkvmImageItemsOutputItems;
- GetDefaultIkvmPropertiesFile;
+ WriteIkvmPropertiesFile;
+ IncludeIkvmPropertiesFile;
$(AssignTargetPathsDependsOn);
diff --git a/src/IKVM.Image/ikvm.properties b/src/IKVM.Image/ikvm.properties
deleted file mode 100644
index d4bc09c4c..000000000
--- a/src/IKVM.Image/ikvm.properties
+++ /dev/null
@@ -1 +0,0 @@
-ikvm.home.root=ikvm
diff --git a/src/IKVM/buildTransitive/IKVM.IkvmReference.targets b/src/IKVM/buildTransitive/IKVM.IkvmReference.targets
index e145a2509..7cf880d4c 100644
--- a/src/IKVM/buildTransitive/IKVM.IkvmReference.targets
+++ b/src/IKVM/buildTransitive/IKVM.IkvmReference.targets
@@ -15,7 +15,7 @@
- <_IkvmFrameworkAssemblyReference Include="@(Reference)" Condition=" '%(Reference.NuGetIsFrameworkReference)' == 'true' Or '%(Reference.FrameworkFile)' == 'true' Or '%(Reference.ResolvedFrom)' == '{TargetFrameworkDirectory}' Or '%(Reference.IsImplicitlyDefined)' == 'true' Or '%(Reference.FrameworkReferenceName)' != '' Or '%(Reference.FrameworkReferenceVersion)' != '' Or '%(Reference.Identity)' == 'mscorlib' "/>
+ <_IkvmFrameworkAssemblyReference Include="@(Reference)" Condition=" '%(Reference.NuGetIsFrameworkReference)' == 'true' Or '%(Reference.FrameworkFile)' == 'true' Or '%(Reference.ResolvedFrom)' == '{TargetFrameworkDirectory}' Or '%(Reference.IsImplicitlyDefined)' == 'true' Or '%(Reference.FrameworkReferenceName)' != '' Or '%(Reference.FrameworkReferenceVersion)' != '' Or '%(Reference.Identity)' == 'mscorlib' Or '%(Reference.Identity)' == 'System' Or $([System.String]::new('%(Reference.Identity)').StartsWith('System.')) "/>
<_IkvmFrameworkAssemblyReference Include="@(Reference)" Condition=" '%(Reference.Identity)' == 'IKVM.Runtime' Or '%(Reference.Filename)%(Reference.Extension)' == 'IKVM.Runtime.dll' " />
<_IkvmFrameworkAssemblyReference Include="@(Reference)" Condition=" '%(Reference.Identity)' == 'IKVM.Java' Or '%(Reference.Filename)%(Reference.Extension)' == 'IKVM.Java.dll' " />
<_IkvmReferenceInstalledAssemblyDirectory Include="$(TargetFrameworkDirectory)" />