Change SSIS protection level for Project in VS 2010 - visual-studio-2010

I am using Visual Studio 2010 Shell and I have had to change my ProtectionLevel to 'DontSaveSensitive' mid project.
Now I get an error: Basic Checks.dtsx has a different ProtectionLevel than the project.
However, there is nowhere in the Project properties that I can see where the ProtectionLevel can be changed to match. All searches seem to indicate this is easy in VS 2012 but can't find any info for VS 2010
Any help would be greatly appreciated!
thanks
Ravi

You have two different places where you can set ProtectionLevel.
First place is properties pane of a package, second place is properties pane of entire project (right click on a project and you will find it under Common Properties). Ensure that you have the same setting in both places.

Related

Unable to browse to include reference in a Visual Studio C++ DLL project - any way to get around this?

I'm creating a DLL using C++ in Visual Studio 2015. I started my project by following these instructions.
I need to add a reference to my project so I can make use of an API and, unlike C# DLL projects (for example), I'm unable to access the Browse tab when clicking on Project > Add Reference.
According to this page this is because:
The number of tabs available at the top of the Add Reference dialog
box can vary, depending on the type of project open and the resources
it is using. C++ native projects contain only a Projects tab.
Why is there this restriction and is there any way to get around it?
EDIT: I've just found a solution here but I'm new to Visual Studio and I'm not sure how to set 'the CLR option' and then remove after adding my reference. If anyone can explain how to do this I would be very grateful!
I'm a little late to the party, but I recently encountered a similar problem and have a fix that might help the OP or others in the future.
Problem Overview:
Open the Visual C++ project[1] in Visual Studio[2]. In the top toolbar, click on "Project > Add Reference..." . In the window that pops up, there is no "Browse" button/option (see image No Browse option).
Solution:
In the top toolbar, click on "Project > Properties"[3]. In the left navigation panel of the window that pops up, click on "Configuration Properties > General" (this will probably be selected by default). In the right panel, click on "Project Defaults > Common Language Runtime Support". The field value should read "No Common Language Runtime Support" (see image No /clr). Using the drop-down menu in the Common Language Runtime Support field (the grey down-arrow box), select "Command Language Runtime Support (/clr)". Apply the change. The Property Page should now look like this. Click "OK" to close the Property Page. Now, when you go to add a reference, the window that shows up will have a "Browse..." button and look like this. If you want to subsequently remove CLR support[4], select the "No Common Language Runtime Support" option and apply the changes.
Notes:
[1] As you're probably aware, you can select from various project types when creating a new project in VS. I experimented with most of the Visual C++ project types included under the Visual C++ template. Since the problem -- lack of "Browse" option when adding references -- seems to be related to CLR support, you will encounter this problem in all Visual C++ project types that are not created as Visual C++ CLR projects. Thus, if you want avoid the problem from the get-go, consider creating a CLR project from the start.
[2] I was able to replicate the problem in Visual Studio 2015, 2017, and 2019; the same solution works for all versions.
[3] Before changing any Configuration Properties, use the Configuration drop-down list in the top-left of the Property Page to select which configuration you would like to change the properties for, e.g. Debug, Release, All.
[4] If you have added references after turning on CLR support, then turning off CLR support is dubious as suggested by #Cody Gray in the comments to the original question. I have not tried to build a project after doing something like this so I can't speak to the solution suggested here. My answer is just to tell you how to change the CLR support.
For C++ projects, you need to get all the projects into the same solution and then when you go to Add Reference you'll see the other projects listed. You then just check the box to 'add the reference'. Keep in mind that this will cause the import library of the DLL (or a static library for a non-DLL library project) to link against your target project. It will not add any include paths you might need to get to the import headers for your DLL.
DirectX Tool Kit has instructions for adding project-to-project references for a C++ project that you might find useful to read over. See here.
For some general background on C++ project-to-project references. See this Visual C++ Team blog post which was published when they were updated for Visual C++ 2010.

Refactor menu missing from Visual Studio 2015

I am having trouble finding the right-click context menu in Visual Studio 2015. I know that nothing is wrong with my project or the file I am working. I can find the right-click context refactor menu in Visual Studio 2013. However, in Visual Studio 2015 there isn't a refactor context menu in the right-click context menu.
Where did it go? How do I get it back?
Your suggestion cannot include menu Edit → Refactor.
I have tried to reset my Visual Studio settings back to default using menu Tools → Import and Export Settings and that didn't bring the menu back either.
Some of the refactoring tools have been relocated or are at least accessible in a different manner than they were previously.
Using the extract method refactor as an example, you can still use this function; it is just not done the same as before:
Right click
Quick actions
Click extract Method
I think they've changed it to feel more "ReSharper"ey. All of the functionality should still be there however.
Here's more information on refactoring in Visual Studio 2015 - hopefully this helps! Refactoring (C#)
You no longer need to access the refactoring using the mouse right click.
It is recommended that you use the keyboard shortcut keys within Visual Studio.
For all possible shortcut keys, see Default Keyboard Shortcuts in Visual Studio, Refactor.
You might need to build the project to get it to work.
See Code Editing ASP.NET Web Forms in Visual Studio 2013 | Microsoft Docs. (If it is missing then the point is that I am using an example provided by Microsoft.). In Refactoring and Renaming see To extract a method in a C# page. When I follow the instructions I cannot find the feature to extract the code to a method. When I tried the Edit menu it said I did not have valid code. Then I built the project and the feature to extract the code was available and worked.
If you change the name of the object you are refactoring, the light bulb then appears to the left which asks if you wish to change the name of the object (i.e. refactor) or generate a new constructor for the new named object.
Ctrl + . is the shortcut key for extracting a method in Visual Studio 2015 and onward.
Ctrl+M, R does not work anymore in new versions.

How do you change the default programming language visual studio 2013?

I installed Visual Studio 2013 again after I got a new PC, but now when I create a new file it creates it as an VB file instead of c#.
I changed the default programming language in web.config like shown here:
I tried reloading the project but it still does not work.
The web project is placed on a local ftp server.
When you make a new project, under Templates you should see a node for Visual Basic and one for Visual C# with the different types of projects listed under the language. I believe VS remembers which one you used last.
The menu that shows up when you right click on a folder > "Add" shows a list of the options available for that folder ex. if you are in App_code it shows "Class". It seems it doesn't change the first suggestion to C# class even tho you change the programming language. So to fix that you go into the same menu and pick "Add New item..." and select C# Class file ...close it. Now if you try and create a file again it still says "Class" in the Add menu, but when you select it now, it creates it as an C#.
Sovled the problem for me. Thanks to all of you leading me to the answer.

Visual Studio context menu/toolbar Set StartUp Projects

I am hoping to put a toolbar button (or configure a keyboard shortcut) for the Set StartUp Projects... solution context menu item.
If the solution is selected in Solution Explorer the Project menu has solution context items, but I cannot seem to find this command anywhere. I can only find single Set as StartUp Project and similar.
Does anyone know if I can do this?
EDIT: I found this extension which allows me to do what I want quite easily (define different combinations of start up projects): https://visualstudiogallery.msdn.microsoft.com/f4e1be8c-b2dd-4dec-b273-dd88f8818571
It is the one command Project.SetasStartUpProject that works differently depending on whether a project or the solution is selected in Solution Explorer. To select the solution and then call Project.SetasStartUpProject you can probably use Visual Commander or Macros for Visual Studio 2013.
This extension does exactly what I required. It has linked versions for other editions of VS. It uses json config files to start multiple projects nicely.

Why does Visual Studio launch multiple WebDevs when I debug?

I have a Visual Studio 2008 solution with several projects in it - some of which are web applications / sites.
Whenever I go "Debug > Start new instance" for a specific web application and VS launches the ASP.net Development Server (WebDev.WebServer.EXE) for that application, VS also launches 3 additional such processes - one for each of 3 other web applications I have in the solution.
How can I tell Visual Studio to only launch WebDev for the one project I'm debugging? I've looked both in the project configurations and in the solution configuration and could not find the relevant setting...
I think it runs one for each Port -- you can try turning setting them to have the same port - click on the project and look at the properties pane (you have to turn off the the automatic port generation and then set the port#)
I tried the above solution but it did not worked. My solution was a vs2005, what I found to solve the project was to make the property window of VS 2008 visible. Then click on the web projects and then set the "Always start when debugging" property to false and this should take care of it :(
In Visual Studio 2008, there is an entry on the Properties page for the project called "Always Start When Debugging".
Note you have to get to this by selecting the project and going to the Properties pane (or right-clicking Properties). This option is not present when you double-click the project and open it in the main editing pane.
VS by default sets this value to on for all your web projects. Turning it off will solve this problem.
[editorial]This is fairly annoying and I wish the default were false![/editorial]
Suggestion - don't use the internal WebDev, use IIS instead. Also reduces the clutter in the systray. ;)

Resources