I want to add an appSettings section to my app.config, but I am not getting any intellisense. The IDE also has the configuration node underlined and says The configuration element is not declared when I mouse over it, so I wonder if these two issue are related. It does this when I create a new app.config and even when I create an entirely new project. I only have this issue in VS 2019. VS 2010 has intellisense, so something tells me it's a VS setting that points to a reference file containing all the elements available to intellisense.
Why do I have no intellisense in my app.config?
I think your project is created by the old VS2010 version and then migrate into the new VS2019 and the old project type is quite different from VS2019. So there are some factors in your old project which impact intellisense.
You can try these steps:
1) close VS Instance, delete .vs hidden folder, bin, obj folder, then restart your project to test again.
2) open menu XML-->Schemas-->find the entry for DotNetConfig.xsd,select Use this schema and then click OK.
3) If this does not work, please try to add a new app.config file to replace the old file and then migrate its content into the new file.
Related
I made a goof and renamed my SSIS package without fully understanding what I was doing. Now I get "one or more solutions couldn't be added..." I then go to my solution explorer and no solutions are there. Please note that I've been working on this project for 6 months. I checked the project obj folder and all my solutions are there. I'm pretty sure I have to rename something else. Will somebody please help me. I am an intern and am FREAKING OUT.
Let's examine what's happening. I am using SSIS 2012 in this example but the steps will be the same for 2005 to 2014. This assumes you have turned off "hide file extensions".
Visual Studio is an Integrated Development Environment, IDE, for developing software. The outermost concept is a Solution. See 1 below. Solutions solve a problem as a whole. A solution might need multiple tools to solve a problem. A tool in this case, is a Project (#2). Depending on the type of project, different folders and such will appear in section 3. This is an example of an SSIS project.
If you don't see your solution, there's a question for that Solution Folder Not Showing in Visual Studio 2010 - How Can I Make It Visible?
If I Rename the project JeffOrris to JeffOrris2 and close Visual Studio, it will prompt me to save changes to JeffOrris.sln (and optionally, the project). If I click No, when I reopen the solution, I am greeted with the following error message along with Visual Studio indicating that my project JeffOrris is unavailable. :'(
---------------------------
Microsoft Visual Studio
---------------------------
One or more projects in the solution were not loaded correctly.
Please see the Output Window for details.
---------------------------
OK
---------------------------
To start fixing things, you have to get Visual Studio to play ball. You can do this one of two routes. The first is to Add the renamed project back into the solution. Add... Existing Project... and then find your .dtproj file (or .whatever it was with 2005/2008) Assuming that loads fine, you can right click on the one that isn't loading and select Remove. Then click "Save All" or Ctrl-Shift-S
Option 2, which is what I do is to go mucking about with files. Find where your .SLN is. If your project is still open, it will indicate it under properties but once it's bolloxed then you'd need to right click and choose Open Folder in File Explorer.
However you get here, look at what you have.
A solution is represented on disk by a .sln file. That's a text file, might be UTF-8 but it's human readable text. The .suo file is binary that keeps track of what you have open and such. It doesn't matter, the .sln does.
Take a peek inside your solution file. Knowledge is only good for you
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{159641D6-6404-4A2A-AE62-294DE0FE8301}") = "JeffOrris", "JeffOrris\JeffOrris.dtproj", "{631559E9-5ED5-4F63-B74E-BFB6CBAE89C5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Development|Default = Development|Default
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{631559E9-5ED5-4F63-B74E-BFB6CBAE89C5}.Development|Default.ActiveCfg = Development
{631559E9-5ED5-4F63-B74E-BFB6CBAE89C5}.Development|Default.Build.0 = Development
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Of importance is the line starting with Project. That says I, the Solution, have a Project called JeffOrris and the project file can be found, relative to my location, at Folder called JeffOrris and inside there a file named JeffOrris.dtproj
The "trick" then is to make your subject and verbs agree. Or in this case, make your Solution and your .dtproj file agree. That'd be #6 below. After saving the solution file, Visual Studio should prompt you to reload it and whoosh, your project is back.
If you have inadvertently renamed the .dtproj file, then you can rename it back. Again, save all
I am using FDT 5 and would like to create a new project with already existing source files and assets. When I start up the Project Wizard (New->FDT Project) I browse to the folder I want to make as the project but I cannot proceed as FDT gives me the error:
*"PROJECT_NAME overlaps the location of another project: PROJECT_NAME"*
I have downloaded a flash project (developed in FDT) and would just simply like to make it a project in my FDT environment.
I mean this shouldn't be so complicated right? I don't want to create an entirely new project (its own folder) I want to use the same folder I downloaded and view that project. I am using git so I have to work in the same path, sort of speak.
Any ideas?
EDIT:
Apparently this is an issue with FDT, a small bug. I managed to solve the problem following this:
FDT / Eclipse Error : ‘overlaps the location of another project’
And on the eclipse forum:
Eclipse Forum
Flash builder project files can't be opened on another computer even if the files were copied, for e.g. through version control like git or svn.
Importing and Exporting fxp projects is not possible as we do not want to overwrite files for git or svn unnecessarily.
How do people collaborate on Flash Builder projects without creating new project in Flash Builder and having to set up all the settings for the project again and again for multiple collaborators?
If you import the project using its folder location as per #Sean Fujiwara answer then:
One useful way to collaborate in Flash Builder projects is to utilise environment variables. You can access these using - Window > Preferences > General > Workspace > Linked Resources:
From here you can add a new variable or edit an existing one, from the example above you can see that we use a FRAMEWORK_SOURCE variable which points to the source for our shared framework code, we use a swc but this is handy for debugging errors.
We also have another variable called OUTPUT_FOLDER which in our case points to a folder where we run our project over localhost see example below, to use this in a project, you go to right click project name > Properties > ActionScript Build Path, here you enter the folder name you want creating inside the folder that OUTPUT_FOLDER points to:
When you do a Project > Clean from the menu, all resources from your html-template folder will be copied across to this folder and it should open in a browser.
Now we have been able to check in to SVN our .project and .actionScriptProperities files with few issues. When someone new to the project checks them out, they will get an Error in the Problems panel telling them they don't have for example - OUTPUT_FOLDER\MyProjectName, therefore the project leader should have a document listing all the required variables to be setup in your environment.
Other things you can share are paths to raw font files etc.
The only problem I've had with this approach is sometimes it asks for the path to the SDK if it is different from your location, not had chance to figure this one out yet.
Flash builder project files can't be opened on another computer even
if the files were copied, for e.g. through version control like git or
svn.
Flash builder projects can be imported into the workspace just like other Eclipse projects.
Once you copy them to another computer:
Right click in package explorer and go to Import....
Select General/Existing Projects into Workspace.
Select the folder containing the .project directory.
If you make sure Copy projects into workspaces is deselected, you can commit the files directly from wherever you checked the code out.
This is now solved in Flash Builder 4.7 where you can actually import the project folder as is.
I renamed a folder and updated my namespace declarations, but ReSharper 6 claims that the namespace should be a reflection of how it was before the rename. Where is it storing the file location data?
Check to make sure your assembly name matches your new namespace. If you've changed your folder structure to match your new namespace, you may still see the ReSharper alert until you update the project properties.
As delliottg's comment says, in Visual Studio, go to
Project > [project name] Properties > Application
and change "Assembly name" as well as "Default namespace".
I also had this problem with a folder/namespace and none of the above steps fixed it.
In my case I had to do this in Visual Studio:
Right-click the "problem" folder in the solution explorer to open the properties
Ensure the "Namespace Provider" is set to true
This fixed the ReSharper issue for me and I was able to adjust namespaces as normal.
Root namespace is needed to be changed as following.
I use Resharper 2019.3.2 in VS 2019 vs 16.5.2 and I had similar issues.
When developing, I first work out my namespace hierarchy in a single project, then split the project in seperate class libraries. In the first stage, it is convenient to always let the subdirectory correspond to the namespace.
For example, my prototype MeshTools.dll project currently contains:
Meshtools ........................ 3 cs-files in \MeshTools
MeshTools.HeightField .......... 2 cs-files in \MeshTools\HeightField
MeshTools.VectorTools .......... 3 cs-files in \MeshTools\VectorTools
The above answers all assume one single namespace per project. Renaming directories manually may confuse Resharper and that can be repaired by setting the default assembly in the .csproj file to the proper namespace. Thanks for the tip.
However in my case, I have several namespaces in a single project, with each namespace in a Solution directory corresponding to a real directory. Setting the default assembly "Meshtools" does not affect ReSharper behaviour for HeightField and VectorTools, when things have gone wrong with the renaming.
I googled this issue and came by https://www.jetbrains.com/help/resharper/Refactorings__Adjust_Namespaces.html#
It turns out there is a right-click option on a Solution Directory -> Properties. You will find an option to decide, if the Solution Directory is a NameSpace provider or not. When something has gone wrong, Visual studio will reset the field to False. Set it back to True and Resharper will correctly refactor namespace or file location when needed..
If you're using JetBrains Rider, go to the Solution Explorer and right click on the csproj file, then properties in the context menu. In my case the Assembly Name was already updated but "Root Namespace" wasn't, updating Root Namespace allowed JetBrains to automatically update all namespaces.
I am trying to connect to MySQL using C++. The IDE that I am using is Visual C++ 2010. I followed the steps on the MySQL dev page (http://dev.mysql.com/tech-resources/articles/mysql-connector-cpp.html). I followed the steps exactly as given although i used a different OS(Windows). I get many linker errors in the process, which I am finding difficult to debug. Could somebody direct me towards a better or a simpler approach to acces MySQL using C++.
P.S. I have downloaded mysqlconnector for C++.
You could try mysql++, but you'll encounter the same linker errors I bet.
Have you set the include path (C:...\MySQL Server 5.1\include) and the library path (C:...\MySQL Server 5.1\lib\debug) ? In VC2010 to set global settings you have to :
VS2010 introduces the user settings
file
(Microsoft.cpp..users.props)
to control global settings including
Global search path. These files are
located at
$(USERPROFILE)\appdata\local\microsoft\msbuild\v4.0
directory.
The issue you are seeing is a bug in
the UI. To make it possible to change
the ordering of these read-only
directories, here is the workaround
that you can apply:
open up the property manager,
right click on the .user.props file to bring up the property page
open up VC++ Directories -> Include Directories, add new paths after
$(IncludePath)
Click on the "Edit" dropdown on VC++ Directories -> Include
Directories property, the user
directories as well as the inherited
values will show up in the upper pane
you can move the directory orders as you wish and save.
http://connect.microsoft.com/VisualStudio/feedback/details/550946/vs-2010-how-to-change-vc-directories-inherited-values-read-only