Closed xavierdecoster closed 9 years ago
Complementing, I've built this package using KRE 1.0.0-alpha4-10353 and Mono 3.8 on OSX
Below project.json
{
"version": "1.0.0.0",
"dependencies": {
"NLog": "3.1.0"
},
"frameworks": {
"net45": {
"dependencies": { }
}
}
}
That makes alot more sense. Can you try a windows machine
Ok, on Windows it worked well. Just so you know, Xunit also not worked on OSX.
Thanks David!
xunit? What?
When I run my unit tests using Xunit (Xunit.KRunner) it gives me that error:
Missing method Microsoft.Framework.Runtime.IApplicationEnvironment::get_RuntimeFramework() in assembly data-0x7ff52b049000, referenced in assembly /Users/vinicius/.kpm/packages/Xunit.KRunner/1.0.0-alpha4-10314/lib/net45/Xunit.KRunner.dll
System.MissingMethodException: Method not found: 'Microsoft.Framework.Runtime.IApplicationEnvironment.get_RuntimeFramework'.
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in
Ok that's unrelated and because you're using incompatible versions of the KRE and the xunit package. Let's try to keep this bug focused on the nuget/zip issue
Hi @xavierdecoster do you still have this problem? Thanks.
@muratg I can verify and run it through a test setup if @viniciuschiele can send us a new package built on Mono using the latest kpm beta
This is still a problem, the long term solution is nuget core changing to read zip and produce OPC. /cc @jeffhandley
Closing this as by design. The new NuGet 3 API s required to open packages now :smile:
We can provide a package that demonstrates the issue. It was built with KPM using the following command:
kpm build
The symptoms were reported to @MyGet on September 19, 2014, by @viniciuschiele. He should be able to answer any questions you might have regarding how the package was built. The package and a solution reproducing the issue have been emailed to @davidfowl and @jeffhandley (and can be sent over again upon simple request).
Symptoms:
NuGet.Core's OptimizedZipPackage class is using System.IO.Packaging.Package.Open(path) (from Windowsbase.dll v4.0.0) internally. It is this call that throws the NotSupportedException with the above message. We used NuGet.Core.2.8.3-alpha0001.
The following piece of code reproduces this internal issue:
Diving into the symbols where the exception got thrown, I traced it back to the static ZipArchive.VerifyVersionNeededToExtract method. When parsing the _rels/.rels, the version parameter at some point has a value of 63, which does not have a matching value in the ZIPIOVersionNeededToExtract enum.
Looks like the packages produced by NuGet are using different implementations of OptimizedZipPackage, ZipArchive and ZipPackage than the ones being used in K. Perhaps there's some incompatibility there, not sure.