-
Notifications
You must be signed in to change notification settings - Fork 123
Add fix for #343 Use ResolveReferences task #345
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
Conversation
This task seems to stably return the reference list now. Added a test using an executable that references a pcl assembly
We should enable all the PCL tests on linux now that that is supported. |
Do you want to do that as a separate PR or? |
I think it's best here so we can see the tests passing across the board. |
Otherwise your new test isn't exercised on Unix. |
Seems some tests are failing, not sure if the correct tasks are in place for all situations, might have to drop this completly if I cant get it working tomorrow. |
Yes, two failing on Travis
|
Ha switching to |
Can you explain a bit more? Almost all the tests pass so things don't seem too bad! Your new test project should probably be under |
I do see that things are worse on Windows though. |
Should have posted this here: 2nd level references test fails on Linux. Output includes:
Classic old friend |
I've pushed what I tried here, which seems decent, although your new test doesn't pass. As I said, the SQLite dlls are not there so it isn't that surprising. |
Having pcl working is the most important think for me, it's unshippable without that. :-(
|
Have you tried it with the SQLite dlls present? Perhaps it works fine. All the other PCL tests work OK. |
Yes Ive tried, we are no further forward its still exactly the same issue, no implicit pcl references are present. |
@rneatherway I just corrected the package folder, although it makes no difference even if you restore the package. |
@rneatherway The only way I can figure at the moment is evaluating the named evaluation group |
Hmm. I don't understand that because we are running |
Heres a gist of the 259 vs sqllite test: |
It makes no difference, mine has the package restored |
With the sqllite one there is an extra property |
Hey did you notice this at the end of the sqlite one:
|
Yep, that target doesn't exist as its a property of the pcl reference rather than the project under test |
What do you mean? That target is found in Microsoft.Common.targets. If I build your sqlite project with xbuild then it runs that target. |
Im guessing its not looking there |
Ah, my mistake. I assumed that as it was a I tried to construct a test for problem (2), but the WebSharper issue no longer occurs and I don't have access to Android projects. @7sharp9 how could we add a test for that? I'm strongly leaning towards bundling a version of MSBuild with FCS as being the correct resolution for this issue, but it would be great to ask somebody in the know. As for the windows issue, with massive thanks again to MS for the recent open-sourcing spree, I have found a suitable logger to subsitute for my |
@rneatherway I dont know, Android projects will require the android msbuild tasks to be present on the cI server:
|
You could make a new task DLL, e.g. by copying and modifying this stuff? Or this DLL or this DLL are MSBuild task DLLs with a 4.0 dependency? I presume trying to load that as a custom task will fail? |
Should be OK to just modify the paths of the targets file and custom task assembly then put them in the project directory. If you do that then we probably don't want to commit the assemblies to this repo but we could at least test whether it is working on an ad-hoc basis. I'm not aware of any other custom tasks that exhibit this behaviour now that Websharper works. If you know of any we could use that instead. |
The other thing you could do to harden the testing is to invoke type checking on the project and assert that there are no Errors present. |
Well I tried using a
But not what and how it happened. By contrast, running msbuild.exe from the command line gives much information:
but I don't know the name of this logger to use it programmatically. |
OK... apparently there is a property called
|
It would be good to get this one resolved so that project cracking is usable :-( |
I couldn't get it working without using the |
This seems to work locally. I had to relax the condition on Dave's new PCL test because Windows uses a slightly different set of assemblies, but I think it still suffices to check that the PCL reference assemblies are being pulled in. |
@rneatherway sounds like progress! |
A binding redirect would have to be applied to the originator process, unless this was invoked oop |
Yes I understand. I think this is consistent with xbuild, msbuild and Visual Studio. |
Ok, I was going over this issue with one of the guys here and he was of the opinion that this function should be done out of process otherwise unknown external dlls could be loaded into the monodevelop process. We have a similar method in MonoDevelop which is running targets for MonoDevelop, all out of process for these reasons. |
Ah right, because of the custom tasks etc? That makes sense. Would that mean having an exe wrapper that just printed the results on standard out? Or is there a cleverer way of doing that in .NET? Either way, I would be glad to merge this and do a release as it at least fixes the PCL referencing issue and generally makes things more robust. @dsyme are you OK with that? |
@rneatherway Did you make changes to both new and old project cracking? |
Yes, the old API now uses the |
@rneatherway MonoDevelop does it like this: And theres a reference resolution task already in existence too, I might have linked you to this a week back maybe. |
I see. I think they should be using I notice this comment:
is pretty telling. I suppose we could always use that method, but I'm pretty happy with where we are now. |
Having unknown references polluting the current runtime process is quite nasty too so its better to be an isolationist here I think. |
@7sharp9 - it seems it would be best to implement the isolation via an appdomain or an external process. Can you do that as part of XS/MD addin implementation or do you think we should do it in FCS? @rneatherway - yes we can merge and re-release. |
Add fix for #343 Use ResolveReferences task
@dsyme Well I would expect to be able to call an exposed method without having to wrap it in another process, it probably should be part of FCS. Ive been told calling msbuild has to be done out of process, so I wont be able to use this functionality as it stands. :-( |
@7sharp9 - well, you can use it, you just have to call it out of process :) I agree it would be good to do that automatically though, I suppose by including a fsservice.exe in the "tools" directory that can be invoked behind the scenes |
At the moment I don't have time to refactor to use out of process though, Ill have to do that before this release goes out, I suppose Android is broken until then too. |
This task seems to stably return the reference list now.
Added a test using an executable that references a pcl assembly