-
Notifications
You must be signed in to change notification settings - Fork 790
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
Using Paste to add files to an F# project causes the order of files in the project and on the UI to get out of sync #104
Comments
I seem to be completely unable to get EnableOpenSource.vsix running on my machine today, so just some notes here. I'm fairly sure this is caused by handling just one file. Indeed, I can not repro when there is one file instead of three. A simple change like below might work (files may need to be reversed) addFilesNotification <- Some(fun files ->
for absoluteFileName in files do
let relativeFileName = PackageUtilities.MakeRelativeIfRooted(absoluteFileName, fshProjNode.BaseURI)
move relativeFileName) |
i'll try to fix this bug, assign it to me (or to you @latkin as usual 😄 ) |
smaller repro:
<Compile Include="File2.fs" />
<Compile Include="File3.fs" />
<Compile Include="Program.fs" />
<None Include="App.config" />
<Compile Include="File1.fs" /> |
I am currently getting this issue. I am using VS2015. To Reproduce my issue i am able to do this |
Hi, I have the same problem in VS2015. |
I also had this problem using VS2017 today. I copied a file instead of adding the file... |
Repro:
1.Create a new F# Console Application
2.Create 3 F# source files (.fs) on disk
3.Select all three files using windows explorer and paste them on to the F# project in Solution Explorer, note the files are appended to the project in the display.
4.select program.fs
5.use alt+down arrow to move it to the bottom of the source file list
Image
6.build project and note the build error similar to:
C:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\fsc.exe TypeThree.fs TypeTwo.fs Program.fs TypeOne.fs
c:\temp\ConsoleApplication1\ConsoleApplication1\Program.fs(4,1): error FS0222: Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration.
On close inspection of the command line you will see that TypeOne.fs appears after program.fs even though in the ui, TypeOne,fs is at the top and program.fs is at the bottom
comments
The text was updated successfully, but these errors were encountered: