-
Notifications
You must be signed in to change notification settings - Fork 525
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
Emit fsx issue124 #303
Emit fsx issue124 #303
Conversation
@@ -9,7 +9,7 @@ | |||
<OutputType>Library</OutputType> | |||
<RootNamespace>Paket</RootNamespace> | |||
<AssemblyName>Paket.Core</AssemblyName> | |||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | |||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to link against the latest MSBuild DLLs to allow project files with ToolsVersion 12.0 to work. I think therefore that we need to be .NET 4.5. Is that a problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mhm seems I don't understand the whole approach.
Can you write a small abstract of what you are doing?
2014-10-28 16:57 GMT+01:00 Robin Neatherway notifications@github.com:
In src/Paket.Core/Paket.Core.fsproj:
@@ -9,7 +9,7 @@
Library
Paket
Paket.Core
- v4.0
- v4.5
We need to link against the latest MSBuild DLLs to allow project files
with ToolsVersion 12.0 to work. I think therefore that we need to be .NET
4.5. Is that a problem?—
Reply to this email directly or view it on GitHub
https://github.com/fsprojects/Paket/pull/303/files#r19480690.
Description of functionality: The entry point is EmitFsx.PrintFsx. This calls into two other modules:
PrintFsx then prints out the references. In the finished version of this PR, this would be written to a script file rather than just printed to the screen. |
Ah Ok thanks for writing this down. Now I have the next question. Why are you analyzing the project?
|
I am glad that helped. A project may depend on other projects and assemblies in the GAC, which Paket would not know about. FSI still needs to be told about these assemblies though. For example, if Project A depends on Project B, System.Xml and Ionic.Zip, then Paket would only know about the last dependency (as far as I understand it). However, to use Project A in FSI, we would want a script file something like:
(paths will of course differ on different systems) This script file can in turn be included with a |
We actually know about framework reference assemblies if they are listed in
|
I thought we are looking for a way to generate fsx import statements based
|
Ah, now I don't understand. When you say nuspec file, are you talking about the nuspec file for a particular nuget package that is in paket.lock or paket.references? As far as I can see, Paket's knowledge only extends to packaged dependencies, and so we have to go to the MSBuild project files to get the full picture (other project references, GAC references etc). I may be wrong on this though. If we generate an fsx import script only with Paket's knowledge (as I understand it), then it will not be complete with respect to a given project. A user would need to add the other references manually before they could interact with the project. For example, to play with Paket.Core in FSI you need a few DLLs:
Obviously the MSbuild DLLs are because of this PR. |
yes exactly. But that wasn't what we were looking for, right? I my use case there is no project. Everything is on nuget. 2014-10-28 17:50 GMT+01:00 Robin Neatherway notifications@github.com:
|
Don't get me wrong. I think your PR is really really useful. But I think it For paket I see a much simpler approach. But I'm not sure if I'm right here. 2014-10-28 18:05 GMT+01:00 Steffen Forkmann sforkmann@gmail.com:
|
Ah, I see. I think we misunderstood each other's use cases. This is what I always had in mind. I think your idea is also useful, but it is a shame that it won't cover this kind of situation. For dealing with nuget packages, I now see why you mention the nuspec file, but I wonder what you have in mind for choosing the right framework. Working with a fsproj file is useful because it gives you context like that. |
I can see this feature in the F# power tools. Right click on project and it
|
Yes, this is perhaps more appropriate. Didn't VS add some capability like this, copy references or something? I really like Paket, as it is command line and decoupled from VS, it looks good for Mono users too. That's why I was looking to add this here. Perhaps it would go better straight into FSI. |
I checked and VS2013 lets you send references to FSI, but not create a script file. |
Not to be merged yet, needs tidying.