Why I get the problems with Visual Studio "2013" SDK samples? - visual-studio

Visual Studio 2013 Premium Update 4; Visual Studio 2013 SDK installed.
I see the code sources are for older Visual Stuido version. It has a link to Visual Studio 2010 (instead of 2013) SDK Samples.zip file. I try compile its some projects but I get an exceptions... For example:
Other projects compiled successfully, but I read their instruction of running:
Running the Sample
To run this sample, copy both the
AlphaBlendToolbar.Addin file and the newly-built AlphaBlendToolbar.dll
file into your Visual Studio Addins directory (My Documents\Visual
Studio 2010\Addins) and then open a new instance of Visual Studio
2010. Next, run the Tools | Add-in Manager menu command. Check the checkbox next to AlphaBlendToolbar and hit OK. You should see a new
toolbar with two command buttons on it. The interesting thing about
this sample is that the command button icons have alpha-transparency.
But VS 2013 has not the Addins directory... Ok, I create it:
I compiled the sample of SDK:
but I don't see here the compiled DLL:
Why I have such problems?

The AddIns folder under the Documents folder is not created by default by VS when installed, so you need to create it by hand, as you have done
Remove the folder C:\Users\developer\Documents\Visual Studio 2013\AddIns from the Options window, it is not required, the %VSMYDOCUMENTS%\AddIns folder takes care.
.AddIn files can contain several values to describe the target VS versions. The AlphaBlendToolbar.AddIn file of the sample only contains the VS 2010 target, you need to edit it and add the VS 2013 ("12.0") target:
<HostApplication>
<Name>Microsoft Visual Studio</Name>
<Version>12.0</Version>
</HostApplication>
Notice that there are two .AddIn files, one in the Documents folder (for deployment) and other in your solution (for source control, etc.), ensure that you update both.
FWIW, there is a VS 2013 SDK Samples: http://blogs.msdn.com/b/vsx/archive/2014/05/30/vs-2013-sdk-samples-released.aspx

Related

Open visual studio project in its respective version instead of Visual Studio 2017

Ever since I installed Visual Studio 2017, it now wants to be the one to open all of my projects. Before installing 2017, if I double clicked a VS 2010 .csproj or .sln in Explorer (Windows 10), it would open in VS 2010. But now opening a project for all previous versions opens in 2017. Even if I right-click and choose Open With > Microsoft Visual Studio Version Selector it always chooses 2017. To open it in the correct version of Visual Studio, I have to first open VS and then browse to the project to open. This is a pain when I don't remember which version the project should open with and just want to click it and open it. Can I reset it to open a project in the version of visual studio it belongs with?
I confirmed how this is meant to work with the team. The only requirement is that you set Microsoft Visual Studio Version Selector as the Default App for .SLN files in Windows. That app launches the version of Visual Studio specified in the solution file. If you crack open a .sln file in an editor, you'll see a section that specifies the version of VS that should be used. It'll look something like this:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.25909.2
One thing to keep in mind though is that value will change whenever a different version of Visual Studio writes to the solution file. E.g., if you create a solution in VS 2010, close VS 2010, launch VS 2017, open the same solution, add a project to it (this is what forces VS to make a change to the .sln file), the version in the solution file will then change to VS 2017. I.e., the last version of VS to write to the solution file, will be set as the version to be used when opening it.
If you're finding it's not working as described, we likely have a bug here. Let me know if that's what you think is happening.

Load CPS project in integrated shell

I have a custom language and debug editor extension for Visual studio, that I'd like to be able to distribute using the visual studio integrated shell.
However, I am unable to open the custom project files using the integrated shell application:
Unsupported
This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them.
For more information on enabling these project types or otherwise migrating your assets, please see the details in the "Migration Report" displayed after clicking OK.
- scripts, "F:\path\to\example.myproj"
No changes required
These projects can be opened in Visual Studio 2015, Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1 without changing them.
- scripts, "F:\path\to\example.Example_sln"
Everything works fine when the extension is loaded as part of visual studio 2015 directly.
The custom project type was created using The Visual Studio Common Project System
Thanks to user rodya0 on Github, I have an answer:
Add the following:
$ShellFolder$\Common7\IDE\CommonExtensions\Microsoft\Project; \
to the PkgDefSearchPath section of the .pkgdef file in your isolated shell project

Create Setup/MSI installer in Visual Studio 2017

I have written an outlook add-in VSTO in Visual Studio Pro 2017 (VB.NET). I have published it which creates a setup.exe which is OK but I would like to create a proper installer that copies the files locally and can be run silently etc.
How do I go about doing this? When I go to create new project there is no installer project option.
You need to install this extension to Visual Studio 2017/2019 in order to get access to the Installer Projects.
According to the page:
This extension provides the same functionality that currently exists in Visual Studio 2015 for Visual Studio Installer projects. To use this extension, you can either open the Extensions and Updates dialog, select the online node, and search for "Visual Studio Installer Projects Extension," or you can download directly from this page.
Once you have finished installing the extension and restarted Visual Studio, you will be able to open existing Visual Studio Installer projects, or create new ones.
Other answers posted here for this question did not work for me using the latest Visual Studio 2017 Enterprise edition (as of 2018-09-18).
Instead, I used this method:
Close all but one instance of Visual Studio.
In the running instance, access the menu Tools->Extensions and Updates.
In that dialog, choose Online->Visual Studio Marketplace->Tools->Setup & Deployment.
From the list that appears, select Microsoft Visual Studio 2017 Installer Projects.
Once installed, close and restart Visual Studio. Go to File->New Project and search for the word Installer. You'll know you have the correct templates installed if you see a list that looks something like this:

Visual Studio 2010 Ultimate how to create executable file

I have visual studio 2010 ultimate. There is no option to make executable file.
So how can I make executable files using this version of visual studio.
Actually you've already created an .exe file by "building" your code that you tested in debugger mode. However your .exe file may require other files in order to deploy it onto another P/C. I recommend you read this information at the following link;
click here to go on link
Other than that you can actually find a copy of your current executeable in your application folders debug folder. May take a little searching. I'm using Visual Studio 2012 RC and I don't know if the file structure is the same for Visual Studio 2010 but for the application "counter" I look in "C:\Users\John\Documents\Visual Studio 2012\Counter\Counter\obj\Debug\Counter.exe.

How to remove ApexSQL menus from Visual Studio?

I installed the free version of ApexSQL which is awesome in SSMS, but I really don't want all those menus in Visual Studio. I went to add-in manager and unchecked them, but the Startup column is checked and disabled so every time I restart Visual Studio they come back.
Is it possible to permanently remove the ApexSQL menus from Visual Studio?
If you have ApexSql installed and you don't want those pesky menus in Visual Studio do 2 things.
In Visual Studio, go to Tools > Add-in Manager and uncheck the ApexSql addins. Close Visual Studio.
In Windows 7, there's a hidden folder C:\ProgramData. In Windows Explorer go to C:\ProgramData\Microsoft\MSEnvShared\AddIns folder. Edit each of the *.MsvsLoader.Addin files and set <LoadBehavior> to 0. If you can't save the files directly, you'll have to save the files to a different location (desktop maybe) and then copy them back into C:\ProgramData\Microsoft\MSEnvShared\AddIns because there's some Admin privilege required.
Now when you restart VS those ApexSQL menus should be gone
The issue of crowding menus is resolved in latest releases, now all ApexSQL add-ins are under the main ApexSQL menu as sub-menus. They look like this now:
If you don't need ApexSQL add-ins in VS or SSMS you can simply choose not to integrate them with VS or SSMS during the installation, just check out SSMS ot VS version in which you want the add-ins integrated
Note: To get this dialog in which you can check the wanted integration you need to use individual installers not the main one. You can find all individual installers on this link
Disclaimer: I work for ApexSQL as a Support Engineer
For Visual Studio 2010 on Windows 7, I attempted #Chris Bayles suggestion and do not see ApexSql addins under Tools->Add-in Manager.
I followed #Jerome2606's pointer to https://knowledgebase.apexsql.com/remove-add-ins-just-visual-studio-retaining-sql-server-management-studio/ and it worked for me, but only when I removed the parent ApexSQL folder as well.
Summary of what is required to do:
Remove folder
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\ApexSQL
Depending on the version of Visual Studio, the version number in the default installation location will be different:
Product name Version number
Visual Studio 2010 Microsoft Visual Studio 10.0
Visual Studio 2012 Microsoft Visual Studio 11.0
Visual Studio 2013 Microsoft Visual Studio 12.0
Visual Studio 2015 Microsoft Visual Studio 14.0
Select and delete the ApexSQL folder and its contents.
Open Command Prompt as an administrator, then run
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" /setup
Please note the command is different for Visual Studio 2012, 2013, and 2015.
If you are using SSMS v18.0 then you can disable the apex features in following way.
You can find the ApexSQL.Complete.Addin.SSMS18.pkgdef file from following path.
C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Extensions\ApexSQL Complete
Then open this file in Notepad++ Administrator mode and comment the content.
If you need further reading follow this link.
https://knowledgebase.apexsql.com/remove-apexsql-tools-sql-server-management-studio/

Resources