aspnet.xunit: please fix casing of System.Xml dependency
borgdylan opened this issue · 11 comments
In https://github.com/aspnet/aspnet.xunit/blob/master/src/xunit.runner.kre/project.json#L9, it should be System.Xml
and not System.XML
. As things currently are all people on Linux/Mac cannot move from Xunit.KRunner
to xunit.runner.kre
@bricelam can you take a look? I thought that System.Xml
was a weird one where the XML
is supposed to be in all caps for the assembly name, but maybe not the package name? Because it's been that way for like over a decade? Or maybe I'm totally wrong... Also @davidfowl because I think he might also know something about this...
The file name is System.Xml.dll
, as also displayed in MSDN library pages. With teh current casing i get "'splosions" when i run k test
as shown below:
dylan@ubuntu-server:/var/www/Code/dylannet/vnext/dylan.NET.Tasks.Tests$ k test
System.InvalidOperationException: Failed to resolve the following dependencies for target framework 'Asp.Net,Version=v5.0':
gac/System.XML
Searched Locations:
/var/www/Code/dylannet/vnext/{name}/project.json
/home/dylan/.kpm/packages/{name}/{version}/{name}.nuspec
/usr/lib/mono/4.5/{name}.dll
/usr/lib/mono/4.5/Facades/{name}.dll
Try running 'kpm restore'.
at Microsoft.Framework.Runtime.DefaultHost.GetEntryPoint (System.String applicationName) [0x00000] in <filename unknown>:0
at Microsoft.Framework.ApplicationHost.Program.ExecuteMain (Microsoft.Framework.Runtime.DefaultHost host, System.String applicationName, System.String[] args) [0x00000] in <filename unknown>:0
at Microsoft.Framework.ApplicationHost.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
Also, remember System.Xml is not a real package for aspnet50
so we are talking about the GAC here.
Also in acse it helps, this is my project file:
{
"version": "1.1.1.1",
"code" : "*.dyl;*/*.dyl",
"resources" : "*.resources",
"language": {
"name": "dylan.NET",
"assembly": "dylan.NET.K",
"projectReferenceProviderType": "dylan.NET.K.DNProjectReferenceProvider"
},
"dependencies": {
"dylan.NET.K" : "",
"xunit.runner.kre": "1.0.0-*",
"dylan.NET.Tasks": ""
},
"compilationOptions": {
"define": [],
"optimize": "false"
},
"commands": {
"test" : "xunit.runner.kre"
},
"frameworks": {
"aspnet50": {
"dependencies": {
}
}
}
}
Yeah, it's "System.XML.dll" on Windows. Except the GAC folder which is "System.Xml". The assembly name is also "System.Xml". @davidfowl We shouldn't be doing case-sensitive resolution at all...
Yes we should be. GAC references are a bit messy though.
So, what is the solution to get this working??
FWIW, I was getting:
System.InvalidOperationException: Failed to resolve the following dependencies for target framework 'Asp.Net,Version=v5.0':
framework/System.XML
And editing ~/.k/packages/xunit.runner.utility/2.0.0-rc3-build2880/xunit.runner.utility.nuspec to replace
<frameworkAssembly assemblyName="System.XML" targetFramework="ASP.Net5.0" />
with
<frameworkAssembly assemblyName="System.Xml" targetFramework="ASP.Net5.0" />
(changing System.XML to System.Xml) fixed it for me. This is on a case-insensitive HFS+ macosx system, using mono 3.12 and KRE version 1.0.0-beta3-11030 of the mono runtime.
FYI, I've submitted a pull request to xunit to fix this for good.