Am I able to include the screens into Extension Library ? DACs can be converted into Extensions and be added to the library. But not sure about the screens though.
Your screens should remain in the customization project. You can however edited them from Visual Studio, but remmember to go back to Customizations Project Files | Files and click Detected Modified Files so that the file is updated in the Customization Project. You then typically use the 'Save to Folder' function so that your Customization Project can be added to Source Control.
Related
In Eclipse, I had some folders in the project root that were not code - containing text files with notes about the project, Photoshop files for artwork and so on. Having migrated to Android Studio, these extra folders in the project root are not visible in the Project navigation pane - I only see the app folder and Gradle Scripts.
Is there some way to create a non-code folder that is visible in the Project pane but that is outside the app module?
I thought "Create New Module" in the Project Structure dialogue might do it, but it only offers me templates for modules that contain Android code.
--- EDIT ---
Thanks to #SvdTweel's answer I've stumbled across something that seems to do what I want:
switch to the Project view
create the documentation folder in the project root
right-click it and select Mark Directory as>Resources Root
switch back to the Android view and you see a new folder named "resources"
Will this have any adverse effects? Is this folder still ignored when building the app module?
In the Project Structure you can switch from Android to Project.
The default Android view structures and minimalizes the directories and files so that you as a developer can easier navigate through your project.
The Project view shows everything just as you would see when you browse it with your file explorer on your OS.
I think that is what you search for to create files and directories in the root of the project.
You can put the doc files in the test/resources folder. This is clumsy, but it makes them visible in the Android view while keeping them out of the build.
Bonus: code completion when editing Markdown code samples using the JetBrains Markdown plugin.
I'm translating a large application (solution with several projects containing about 100 forms) in Visual Studio 2012. I created a tool to export RESX files to XLS and create RESX from translated XLS. This app generates a RESX file and places it in the right place in the project folder tree. This is working as expected.
The problem I'm facing is I have to manually right-click every new RESX file and click "Include in project" ("Incluir en el proyecto", sorry I have VS in Spanish).
Is there any automated process that can do this?
In the interest of full disclosure, I'm the author of TranSolution, a commercial localization tool for Visual Studio (which does what you're asking and much more). It's not clear exactly how you want to do this, but maybe this is what you're after: https://msdn.microsoft.com/en-us/library/envdte.projectitems.aspx. See the "AddFromFile()" member for instance which my own product relies on but it's not trivial to set all this up though. Moreover, you need to consider updates as well (not just adds), and when doing so, other issues come into play, such as what happens if the ".resx" file is currently loaded in Visual Studio (if you're doing this in an active Visual Studio session you need to refresh it), what happens if it's currently checked out (in a source control package), etc.
What is the difference between creating a new directory and creating a new folder in Android Studio?
Here is an image of the menu choices:
Short answer
Use folder when adding a folder to an Android Studio project. This is what Android Studio calls them. Directory is what IntelliJ calls a folder. Android Studio is built on top IntelliJ so there is some naming confusion.
Long answer
Although there is a technical difference between a folder and a directory (see here and here), they are often (correctly or incorrectly) used interchangeably. This can be seen even in the titles of these two SO questions:
Setting a custom assets directory for unit testing in Android Studio
Adding an assets folder in Android Studio
This can be confusing to new users of Android Studio when they see both choices in the menu structure. Further confusion results when users add a new directory and then it doesn't show up in the Android folder view. See these questions for example:
Android Studio: Newly Created Directory Not Appearing In Folders View
New created "values" folder is not visible in Android Studio
The folders actually do show up if you select the Project or Packages view from the menu:
However if you want an Android folder to show up automatically in the Android view you need to right click and use New > Folder > Assets folder (if you are adding an assets folder). You could then add a subfolder like "fonts" to this by choosing the New > Directory option.
Android Studio is built on top of IntelliJ IDEA. IntelliJ itself has a menu option to add a directory (as you can see here). But Android stores files in what it calls folders. So when these two platforms are put together in Android Studio, there gets to be some naming confusion. (This is my interpretation, but perhaps they really are trying to differentiate the subtle differences between directory and folder.)
You can see from your menu image that there is also an "Android resource directory" option. (You got that by right clicking on the res directory/folder rather than a subdirectory.) You would use this to add resource folders such as raw, menu, values, etc.
I woulkd like to create a Visual Studio extension. I chose the Package option since the AddIn option will be deprecated from Visual Studio 2013 and above.
So i installed Visual Studio 2012, and Visual Studio SDK 2012, and created a new VS Package project.
Now, I want my package to enable the user to create a new type of project. i.e: I want to extend the right click->new project options to contain a new model of project, which will be a standard Visual C++ project, with some additional configurations, links, references and etc.
I googled a lot, but found nothing.
Does any of you have an idea about this target?
Thanks in advance!
I think the Visual Studio Template Schema Reference contains all information you need to create custom project templates; see: http://msdn.microsoft.com/en-us/library/xwkxbww4.aspx
You can derive a project template from an existing project, which might be the way to go, since it creates a valid template that only needs some customizing. A template export can be done by using the Export Template command found in the File menu.
The template wizard will create a ZIP file containing the template manifest and all referenced files; just extract the archive and customize it in the way you want it (add/remove files, change information like name and description in the manifest). Once you´ve your customized template, create a new VISX package project and add the template ZIP file to it (using Add Existing Item command).
The last step will be to add an Asset to the VISX manifest. Open the source.extension.vsixmanifest file in the VSIX designer, goto the Assets tab and click the New button; this will open a dialog to setup the asset... choose Microsoft.VisualStudio.ProjectTemplate as the type - and File on filesystem as the source. This will allow you to pick the previously added ZIP file. Build the package - and you´re done.
I want to add the source-code of a tutorial into an existing project, and I want the file to be copied to the project folder from the temporary file on the desktop I downloaded it to. Context clicking on the "Source Files" Folder in the Solution Explorer leads me the Add->Existing Item... menu, and I can then add the source file. However, it is NOT copied into the project folder, but stays in its original location. The project just knows about it, displays it in the Solution Explorer, and considers it part of the project.
This help page on MSDN tells me that in Visual Studio 2010, default behaviour used to consist in copying the file into the project folder, and that one could choose to Add a link instead of physically importing the file into the project directory by choosing "Add Link". However, now I always only get a link, and real physical import into the project folder seems impossible.
I could go through the File Explorer to physically import, but the Solution Explorer doesn't update the new files on the fly, and I would like to do this from within VS.
Is there a way? Is this a bug in VS 2012?
Copy in the files using Explorer, then in the solution explorer tick the Show All files option in the button bar of the solution explorer (you might need to select a Project first).
You can now right-click any files not part of the projects and choose Include in Project.
Or use the Add Existing File option.
The reason files are not added automatically to your solution when pasted into the folder using Explorer is because you might not want to have them added.
A neat little trick is to use the "Open In explorer" option:
(though it might be added by the Productivity Power Tools).
Plus, you can Drag&Drop files directly from explorer to the Visual Studio (when they're both running in the same elevation level if you have User Account Control enabled). To fix the UAC issues, you can either run Explorer as administrator too or install the VSCommands extension.
And you can Copy&Paste a file or set of files into the solution explorer by right-clicking a project or project folder and picking Paste on the context menu.