Not all files added to Visual Studio browser

Hi, is there a reason that not all files are added to Visual Studio when creating a project?

There’s alot more files on disk than visible & searchable through Visual Studio.

thx

AFAIK, the files that are specific to a plugin format are added to that specific plugin target only.

sorry, not sure I understand. So why are the VST files there, but not the VST3 files?

thx

@leehu Sorry, I was completely off.

It comes from this function:

Applying the following diff should fix the behavior:

diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h
index 59e8c0ea8..e8c4aa012 100644
--- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h
+++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h
@@ -842,8 +842,8 @@ public:

                 jassert (relativePath.getRoot() == RelativePath::buildTargetFolder);

-                if (getOwner().getProject().getTargetTypeFromFilePath (projectItem.getFile(), true) == targetType
-                    && (targetType == SharedCodeTarget || projectItem.shouldBeCompiled()))
+                if (targetType == SharedCodeTarget
+                    || (getOwner().getProject().getTargetTypeFromFilePath (projectItem.getFile(), true) == targetType && projectItem.shouldBeCompiled()))
                 {
                     addFileToFilter (relativePath, path.upToLastOccurrenceOf ("\\", false, false), cpps, headers, otherFiles);
                     return true;
1 Like

ncie one, thx

Actually, that diff is incomplete. It only changes the .vcxproj.filters file.

The complete diff is:

diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h
index b48c9c0ae..f1a2d1685 100644
--- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h
+++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h
@@ -745,7 +745,7 @@ public:
                     addFilesToCompile (projectItem.getChild (i), cpps, headers, otherFiles);
             }
             else if (projectItem.shouldBeAddedToTargetProject() && projectItem.shouldBeAddedToTargetExporter (getOwner())
-                     && getOwner().getProject().getTargetTypeFromFilePath (projectItem.getFile(), true) == targetType)
+                     && (targetType == SharedCodeTarget || getOwner().getProject().getTargetTypeFromFilePath (projectItem.getFile(), true) == targetType))
             {
                 RelativePath path (projectItem.getFile(), getOwner().getTargetFolder(), RelativePath::buildTargetFolder);

@@ -842,8 +842,8 @@ public:

                 jassert (relativePath.getRoot() == RelativePath::buildTargetFolder);

-                if (getOwner().getProject().getTargetTypeFromFilePath (projectItem.getFile(), true) == targetType
-                    && (targetType == SharedCodeTarget || projectItem.shouldBeCompiled()))
+                if (targetType == SharedCodeTarget
+                    || (getOwner().getProject().getTargetTypeFromFilePath (projectItem.getFile(), true) == targetType && projectItem.shouldBeCompiled()))
                 {
                     addFileToFilter (relativePath, path.upToLastOccurrenceOf ("\\", false, false), cpps, headers, otherFiles);
                     return true;
1 Like

I opened a pull request with these changes:

1 Like

Adding the plug-in files to the shared code target isn’t the right fix here, the files need to be added to the corresponding target. We’ve added this in 991ff62 which will make all of the files browsable in their targets.

1 Like