Open toddmcintosh opened 1 year ago
As a followup I've tried a few different versions of the build (8.4, 8.2) and I'm getting the same error. I'm assuming this means it's an issue with my machine? If you could point me in the right direction I would appreciate it.
Would help to see the IkvmReference line you're using. This is a very odd error.
IkvmReference holds the path of the JAR or .class files in a metadata property named Compile. And that allows wildcards. So, you can for instance, do IkvmReference Include="foo*\.jar". If it detects a wildcard, it tries to expand it, which eventually requires enumerating file system entries. Which, it looks like is breaking for you. Which is odd: first, it's just a call to Directory.EnumerateFileSystemEntries
, which is Runtime code (not ours). We wouldn't expect that to fail like this. But I guess it's possible.... if maybe it's trying to enumerate the entire C: drive or something. Which shouldn't happen unless you've actually configured IkvmReference to do so, and I don't see any valid reason to do this.
Like if you try to IkvmReference Include="C:\**" />
or something, I can imagine this happening. But that makes no sense to do. So I'd like to see what you're doing.
Also, just so you know, given that FOP is a well published and maintained library, you can probably just access it through Maven.
I thought I was having issues with a networked drive so I ended up just putting it in the root of C.
<ItemGroup>
<IkvmReference Include="C:\fop.jar">
<AssemblyName>Fop23</AssemblyName>
<AssemblyVersion>2.3</AssemblyVersion>
<AssemblyFileVersion>2.3</AssemblyFileVersion>
</IkvmReference>
</ItemGroup>
When I try to add IKVM.Maven.Sdk to an empty .NET Standard 2.0 class library, I get this build error:
Build started...
1>------ Build started: Project: ClassLibrary3, Configuration: Debug Any CPU ------
1>C:\Users\toddmcintosh1\.nuget\packages\ikvm.msbuild\8.4.4\buildTransitive\netstandard2.0\IKVM.MSBuild.targets(39,9): error : Could not locate IKVM.Runtime.dll.
1>Done building project "ClassLibrary3.csproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Is there something being cached from before that is blocking the maven package from running?
Oh. We don't support .NET standard at all. So that's one issue. Not even IkvmReference supports it.
Can you try just putting the time someplace other than C?
So I was able to get the IKVM.Maven.Sdk package to load in my project, and the maven repo indeed has a Fop artifact, and I as able to use this strategy to load Fop into my .NET Core 6 project. Thank you so much for the direction, I had no experience with the world of Maven before! Cheers.
Neato. Let's leave this issue open, as it does represent something that's broken. Some error with IkvmReference when using the C:\ drive directly.
I'm trying to use IkvnmReference to compile a copy of Apache's FOP (fop.jar) using Ikvm 8.4.5. I've been getting multiple **The "IkvmReferenceItemPrepare" task failed unexpectedly** errors.
The latest one has to do with the application trying to acces the "Documents and Settings" folder to which access is denied in Windows 10. I've run Visual Studio in admin mode, and this still did not help.
Here's the error in the build output. Any advice would be appreciated.