Repository navigation
None Update ignored in F# projects #8914
Description
Activity
- addedArea-ProjectsAndBuildMSBuild tasks, project files, framework resolutionMSBuild tasks, project files, framework resolution
on Apr 9, 2020 This results in some problems when using Azure stuff like Functions: Azure/Azure-Functions#1177
I've a bunch of these in my projects, I use it for test data files for instance, but AFAIK, they still work (my VS is one or two months behind), so this may be a recent regression.
I think F# does not have the default includes, so you need
<None Include=. Update only works if the thing is already included, otherwise it's a no op.C# does includes all files in the project folder, so you can update them.
You're right, I have None Include. My bad.
Is there any chance that F# gets default includes for this? If not then the Azure Functions Project template should simply be changed to use
<None Include=>.@pihai - I've opened a PR today for this: Azure/azure-functions-templates#954
Reacted by pihaiIs having explicit includes for individual files really the best approach? This causes a problem for files where the need to include them is situational e.g. local.settings.json for Azure Functions - you want it during local development, but said file is not available during a CI build, for example.
To me there seems to be two conflicting goals of both keeping the project definition terse - hence the default includes - as well as wanting to be explicit. While far from being an expert on this matter, I sort of understand the compilation order aspect when it comes to F# (source files), but I'm not entirely convinced the same principle should be applied to other project artifacts as well.
@KevinRansom any thoughts on this? It's definitely in our camp since this can reproduce outside of VS. It means that F#-defined azure functions bundle up files that shouldn't be required for a deployment.
I will take a look.
- addedImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.(Internal MS Team use only) Describes an issue with moderate impact on existing code.
on Sep 1, 2020 Just had this issue in an azure functions app template. Would be great if
<None Include=did the same thing in a.fsprojas a.csproj.4 remaining items
@cartermp Why doesn't F# SDK glob None/Content? Only Compile items should need to be specified explicitly.
@davkean -- it has been pointed out recently. I imagine we will address this, when we get some bandwidth.
Now we know why we don't glob None and Content. Gloobbing impacts the order that the project system finds folders, which impacts the file ordering displayed in the solution explorer. Also it changes the display of .fsi files in solution explorer.
- added and removedImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.(Internal MS Team use only) Describes an issue with moderate impact on existing code.Area-ProjectsAndBuildMSBuild tasks, project files, framework resolutionMSBuild tasks, project files, framework resolution
on Mar 26, 2024
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Create a console app similar to this:
then build it.
Note that under the bin folder,
test.jsonis not included. In a C# project, it is included. This doesn't require VS to reproduce, so it's likely us.