Why can't Visual Studio 2008 locate afxcontrolbars.h? - windows

I have installed VS 2008. When I try to build a project, I am getting an error saying:
Cannot open include file: 'afxcontrolbars.h': No such file or directory
So, I guess I need to have ribbon controls installed for this. Could you please tell me where the SDK is available for download? A link would be very helpful; I googled for it myself, but I could not find it. :(

This seems like a weird problem to me. afxcontrolbars.h is certainly included in a standard VS 2008 installation. The only way you might be missing MFC components is if you installed the Express version, which doesn't come with support for MFC.
The first thing I would do is check to see if I could create and compile a brand new, blank MFC app using one of the built-in templates. If that works, there's something wrong with your project's properties.
Also check manually in the \Microsoft Visual Studio 9.0\VC\atlmfc\include directory to see if you can locate the header file before you try to manually re-install the platform SDK. It may be as simple as Visual Studio not being able to locate the file. To remedy that, open the Options dialog, expand the "Projects and Solutions" tree, select "VC++ Directories", select "Win32" and "Include files" from the combo boxes at the top, and ensure that $(VCInstallDir)atlmfc\include is included in the list:
Of course, the ribbon control (and other ribbon-specific items) weren't added to VS 2008 until the MFC Feature Pack. You will need to download and install that in order to compile applications that take advantage of those features in VS 2008. You can download the Feature Pack here for free.

I have VS2008 on a Win7 64 bit machine.
In my case the include files where installed in the c:\program(x86) folder, but VS was installed in c:\program.
By changing the path to the "hardcoded" path
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include
it now works!

Related

Visual Studio 2012 - cannot find vsvars32.bat to use gacutil to install extra tools

I am running Visual Studio 2012 (version 11.0.50727.1)
I have been trying to install https://jsonsource.codeplex.com/, a tool to allow JSON data to be imported using SSIS. To install this, once I have copied the dll's into the correct folder, I need to register them using gacutilexe. this is where my problem starts. I am supposed to run Gacutil.exe from the Visual Studio command line. This is supposed to be present in the Start Menu as VS2012 x86 Native Tools Command Prompt (it isn't), I am also supposed to be able to access it using vsvars32.bat (using the add external tools menu in Visual Studio, and supplying the location of vsvars32.bat as an argument). However, I cannot find vsvars32.bat anywhere within my C drive.
I have found several versions of GacUtil.exe in various subfolders of C:\program files(x86)\Microsoft SDKs\Windows, although the installation guide lead me to believe it should be in C:\Program Files\Microsoft SQL Server\120\DTS\PipelineComponents, i.e. where I copied the dll's for the tool I am installing. I'm not sure which of these (if any) I should be using once I get to the visual studio command prompt. Could do with advice here as well.
vsvars32 is meant to be somewhere within C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools, but it is definitely not present any where within the Visual Studio folder.. There are also folders for Visual Studio 9 and 10, but these do not contain vsvar32 anywhere within them either.
if anyone could help I would be very much indebted - My options as to how to deal with the JSON source files otherwise are extremely limited. (using Management Studio 2012 rather than 2016, so can't use OPENJSON. If anyone can suggest any alternatives, let me know. This includes just any option to get the entire JSON file file into a cell - I could probably build some kind of extensive string manipulation to script to split it all out once I've got them in there, although this seems like entirely the wrong way to go about things...)
The first time you install the 3rd party package in Nuget Package manager, it will automatically download the .dll to your user temp folder, once you close it, it will gone, but it will register for you. If you need to find where the exactly location is, simply double click that new added .dll in solution window, if you try to reinstall, but it does not allow you to do that, delete the package.config file, and try to reinstall that package. Once that is added again, do not forget to double click that .dll, to see where is reside, move to your own folder, register using gacutil -i command, and should be good.

"This project is incompatible with the current version of Visual Studio"

I was getting the below message from Visual Studio 2010.
"This project is incompatible with the current version of Visual Studio"
One situation resulting in this error has already been posted here at Stackoverflow, but that question has been closed. I'm thinking it's a fairly generic problem. Since I have found a "solution", I'll post this question, and my solution as an answer.
If the message
This project is incompatible with the current version of Visual Studio
is due to an attempt to open a project targeting .Net 4.5, then the "solution" or workaround is to edit the .csproj file and change the TargetFrameworkVersion from "v4.5" to "v4.0". That at least allows the project to be loaded, although it may result in compiler errors if the program is dependent on 4.5 features.
VS 2012 has different project type support based on what you install at setup time and which edition you have. Certain options are available, e.g. web development tools, database development tools, etc. So if you're trying to open a web project but the web development tools weren't installed, it complains with this message.
This can happen if you create the project on another machine and try to open it on a new one. I figured it out trying to open an MVC project after I accidentally uninstalled the web tools.
I just got the same error message with a couple projects after installing Visual Studio 2015 Update 3. For me, the solution was to install .NET Core
In my case it was an incompatible Project Type. Editing project file and removing ProjectTypeGuids node resolved the issue of loading the project (I had already re-targeted the framework version as advised here).
Probably the project type is not supported in the (most likely) NEW version of VS, so you will have to adjust (update) the code to work properly (if possible), but at least you can see the content through VS.
I Resolved the issue by deleting the files in the below folder
%localappdata%\Microsoft\VisualStudio\12.0\ComponentModelCache
Source: https://forums.xamarin.com/discussion/70388/how-to-fix-incompatible-issue-after-visual-studio-2015-update-3
As for me, I realized there was another web project in the solution that my VS2017 was loading fine, so I copied over the ProjectTypeGuids element of it over to the project that wasn't loading. Its diff was:
- <ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
After this, it loads. Don't ask me why.
If you are getting the same error for a project which is actually an extension (.vsix), installing Microsoft Visual Studio 2012 SDK does the trick.
Go to tools -> Extensions and updates -> Online -> Search for project installer -> download
And relaunch Visual studio.
After installing Update 3 for Visual Studio 2015, I suddenly got the "This project is incompatible with the current version of Visual Studio" error message while opening my Cordova project (.jsproj Javascript project file)
To solve this:
Go to Programs & Features
Select the Microsoft Visual Studio 2015 installation and click Change
Click Modify
Install "HTML/Javascript (Apache Cordova) Update 10" of the Cross Platform Mobile Development section
For me, I got this same error in VS 2015 and just installed the VS 2015 update 1, though from another answer, VS is actually up to Update 3, now (after which, they got the error and had to install .NET Core). Had issues when it hit certain packages, like the Windows SDK ones, and had to point the installer back at the paths in my original CD, and for some, even that didn't work and had to skip them and re-download from an internet-connected computer, transfer them over, and run them later manually (computer was not connected to the internet to be able to download updated versions of the packages), but after doing all that and doing a reboot, the error was gone and my project loaded fine.
I had this issue and after hours of uninstalling and reinstalling I found out the issue in my instance.
The reason why I got this was down to the fact that I didn't have the correct extension.
In my case the ASP.net project (my startup) was the incompatible project and this was because I didn't have the following:
Microsoft ASP.NET and Web Tools
Micrsoft ASP.NET Web Frameworks and Tools
It was a simple case of going into extensions and updates under the Tools menu
I had this error and found it was due to the presence an 'Import' XML tag inside the .csproj.user file. Once I removed it, Visual Studio could open the project again.
What most people forget it is that the files of visual studio are just text files, that have some peculiars configurations that will show to the program how to open it. that is, we can change this because it's just a text in some file in there in your project folders.
Well, knowing this, what we have to do is very simple!
The first step is knowing what kind of project it is this project that stay unload. (for example: Class Library)
The Second step is create a new one (Class Library) because you know that your visual studio will create a version supported by himself. Unload this one and click in "Edit csproj".
It's in this file that we can found the configuration that tell to VS how this proj will be loaded and his name is ProjectGuid, this serial number has a variation according the type and version of project.
Now, look at your "ok project", copy the "ProjectGuid" TAG, paste on csproj that unloaded, and pay attention to the little differences and make this files almost equals, except for the tags ItemGroup that represent the references of the project.
Doing that, save all files and close your VS and open again, now your project should load normally.
I hope that this informations help somebody to understand a bit more how the VS works and help solve the problems when necessary.
I checked if i could create a new solution and was unable because SSAS,SSIS and SSRS weren't there as options.
I downloaded SSDT from here and installed and it worked...
https://learn.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017
In case you came here looking for the issue with ".smproj" file, it is because you are missing SQL Server Analysis Services(SSAS). To over come this, install SQL Server Data Tools(SSDT) in your system, restart your Visual Studio and it will work.
Thanks.
This is my answer, I think it's useful. Please follow below steps:
1.First check your Visual studio version is 2012, 2015 or 2017 etc.
2.Your project is developed in 2015, but your visual studio 2012, then visual studio 2012 should not open the which are developed in visual studio 2015 projects.
3.If developed project visual studio 2012 and you have visual studio 2012, open the project but here need to check one option as per below
a) Target Framework - Open your project ".csproj" file with notepad++ and search with "TargetFrameworkVersion" and observe target framework value.
b) Open any existing project in your visual studio - Select project at 'Solution Explorer' - Right click - Properties - Application -Select Target Framework - Observe highest your framework which you have
c) 3.a and 3.b frameworks both are should same otherwise applications are not open
d)If your target framework less than the project framework should install the latest's
e) above options do not work just Simply have another option modify the "TargetFrameworkVersion" value in '.csproj' file which is have in your visual studio.
Ex: in my visual studio target framework 4.0 but in '.csproj' file have TargetFrameworkVersion - 4.5, You need just change 4.5 to 4.0 and open the project
This issue might be caused when using VS 2015 with Update 3 installed on one PC and without update 3 installed on another. This was the problem in my case.

Create a new TypeScript project in Visual Studio

How do I start writing TypeScript projects in Visual Studio? There's no option for it when I create a new project. I have Visual Studio 2012 installed along with the TypeScript add on
I just found the solution: Manual installation of the VS-Extension.
In some way, the VS-Extension is not getting installed. You can do it manually. There is a .vsix file located in C:\Program Files (x86)\Microsoft SDKs\TypeScript\0.8.0.0 called TypeScriptLanguageService.vsix.
Try to run this file. It should install the TypeScript extension.
If you are running an x86-based system, try to look at C:\Program Files\Microsoft SDKs\TypeScript\0.8.0.0.
Worked for me. Now I can create TypeScript projects and it is listed in the Visual Studio extension list.
Note that the newer versions of TypeScript dropped the folder 0.8.0.0. You may find the .vsix file in C:\Program Files (x86)\Microsoft SDKs\TypeScript.
You can add TypeScript files to an existing project using the Add > New Item dialog.
You can also create a project of type HTML Application with TypeScript using the Add > New Project dialog. This project type is under Installed->(Templates)->Visual C#.
If these options are missing from Visual Studio, you should try re-installing the TypeScript Visual Studio plugin.
If you use Visual Studio 2017, the template 'HTML Application with TypeScript' has been removed from the templates.
But you can install the extension made by rich-newman on Github: https://github.com/rich-newman/typescript-html-application-vs2017-template
To install it do the following:
Go to the 'Add New Project' window
At the left go to 'online' in the left tree view
Search for 'TypeScript HTML Application Template'
Install the extension and the template should be available under 'installed --> TypeScript'
Followed the other answers but could not locate TypeScriptLanguageService.vsix after installing TypeScriptSetup.0.8.0.msi on Win7 64 w/ VS 2010.
To install on VS 2010, use 7zip to open the above msi and extract "TypeScriptLS.vsix_File", remove the trailing _File, and run as usual.
This gives a new TypeScript project template (but not a file template mysteriously), intellisense, code highlighting, etc.
I didn't have the project and ts file templates also, tried reinstalling it(just by running vsix file) that didn't help, so I
1. uninstalled(from the VS2012 manager) the extension
2. closed VS2012 and then installed it again and voila-
the Project and file template magically appeared. Thank god it worked- I can start playing with the language without having to run transcompilation manually every time.
Installing typescript adds a new project type as well as adds a file type for existing projects. After installing typescript, you can try searching "typescript" in the new project window. It shows "HTML Application with TypeScript" to me.
Every .ts file typescript file will add a dependent .js file.
Hope this helps!
Old post, new suggestion:
I've spent a few hours on this issue on Win8/VS2012. After multiple install/reinstall (of Typescript plugin v 0.8.3), the one thing that worked, was to run VS2012 in Administrator mode and (re)install Web Essentials 2012. That did the trick for me and I got Typescript as it's own section in Add New Project... (and all the other goodies mentioned above).
What reminded me of the run in admin mode was the process to update documentation (if you want to install documentation locally) where it too had an annoying cryptic error. Running in admin mode was also the answer.
You don't have to run in admin mode all the time, just probably a good practice when updating the IDE itself (new plugins, etc.).
For version 0.9.1.1 I was able to make it work following the instructions here: http://typescript.codeplex.com/wikipage?title=Compile-on-Save.
Support for Typescript was just disabled on Web Essentials 2012 3.0: http://vswebessentials.com/changelog
Another tip - you need to install Visual Studio for Web. It will not work with just VS for Desktop. Also, you need to install the plugin after VS, so if you installed the plugin first, uninstall it then reinstall.
I spent days on this issue too. Eventually found this (very old) answer. Didn't quite help. I have VS 2022 and under Extensions/ Manage Extensions, searched for Typescript and found 'Typescript HTML Application Template'. Downloaded it, created project from it, set the start page and it all seems to work :-)
It was also a simple matter to add a tsconfig.json file. (Not forgetting to put a "dom" in the "lib" line: Mine was
"lib": [ "es6", "dom" ],

Typescript not installed in VS2012? [duplicate]

How do I start writing TypeScript projects in Visual Studio? There's no option for it when I create a new project. I have Visual Studio 2012 installed along with the TypeScript add on
I just found the solution: Manual installation of the VS-Extension.
In some way, the VS-Extension is not getting installed. You can do it manually. There is a .vsix file located in C:\Program Files (x86)\Microsoft SDKs\TypeScript\0.8.0.0 called TypeScriptLanguageService.vsix.
Try to run this file. It should install the TypeScript extension.
If you are running an x86-based system, try to look at C:\Program Files\Microsoft SDKs\TypeScript\0.8.0.0.
Worked for me. Now I can create TypeScript projects and it is listed in the Visual Studio extension list.
Note that the newer versions of TypeScript dropped the folder 0.8.0.0. You may find the .vsix file in C:\Program Files (x86)\Microsoft SDKs\TypeScript.
You can add TypeScript files to an existing project using the Add > New Item dialog.
You can also create a project of type HTML Application with TypeScript using the Add > New Project dialog. This project type is under Installed->(Templates)->Visual C#.
If these options are missing from Visual Studio, you should try re-installing the TypeScript Visual Studio plugin.
If you use Visual Studio 2017, the template 'HTML Application with TypeScript' has been removed from the templates.
But you can install the extension made by rich-newman on Github: https://github.com/rich-newman/typescript-html-application-vs2017-template
To install it do the following:
Go to the 'Add New Project' window
At the left go to 'online' in the left tree view
Search for 'TypeScript HTML Application Template'
Install the extension and the template should be available under 'installed --> TypeScript'
Followed the other answers but could not locate TypeScriptLanguageService.vsix after installing TypeScriptSetup.0.8.0.msi on Win7 64 w/ VS 2010.
To install on VS 2010, use 7zip to open the above msi and extract "TypeScriptLS.vsix_File", remove the trailing _File, and run as usual.
This gives a new TypeScript project template (but not a file template mysteriously), intellisense, code highlighting, etc.
I didn't have the project and ts file templates also, tried reinstalling it(just by running vsix file) that didn't help, so I
1. uninstalled(from the VS2012 manager) the extension
2. closed VS2012 and then installed it again and voila-
the Project and file template magically appeared. Thank god it worked- I can start playing with the language without having to run transcompilation manually every time.
Installing typescript adds a new project type as well as adds a file type for existing projects. After installing typescript, you can try searching "typescript" in the new project window. It shows "HTML Application with TypeScript" to me.
Every .ts file typescript file will add a dependent .js file.
Hope this helps!
Old post, new suggestion:
I've spent a few hours on this issue on Win8/VS2012. After multiple install/reinstall (of Typescript plugin v 0.8.3), the one thing that worked, was to run VS2012 in Administrator mode and (re)install Web Essentials 2012. That did the trick for me and I got Typescript as it's own section in Add New Project... (and all the other goodies mentioned above).
What reminded me of the run in admin mode was the process to update documentation (if you want to install documentation locally) where it too had an annoying cryptic error. Running in admin mode was also the answer.
You don't have to run in admin mode all the time, just probably a good practice when updating the IDE itself (new plugins, etc.).
For version 0.9.1.1 I was able to make it work following the instructions here: http://typescript.codeplex.com/wikipage?title=Compile-on-Save.
Support for Typescript was just disabled on Web Essentials 2012 3.0: http://vswebessentials.com/changelog
Another tip - you need to install Visual Studio for Web. It will not work with just VS for Desktop. Also, you need to install the plugin after VS, so if you installed the plugin first, uninstall it then reinstall.
I spent days on this issue too. Eventually found this (very old) answer. Didn't quite help. I have VS 2022 and under Extensions/ Manage Extensions, searched for Typescript and found 'Typescript HTML Application Template'. Downloaded it, created project from it, set the start page and it all seems to work :-)
It was also a simple matter to add a tsconfig.json file. (Not forgetting to put a "dom" in the "lib" line: Mine was
"lib": [ "es6", "dom" ],

Opening vbp Visual Basic Project

I have got some old sources written in Visual Basic. There are *.bas, *.cls, *.frm and *.vbp files. As I understand, vbp is a project file. But I cannot open it with my Visual Studio 2008.
What version of VS should I install to open *.vbp file? Google says it is Visual Studio 6, but I am not sure and I cannot find Visual Studio 6 for downloading. Is there any publicly available free edition of Visual Studio 6 with Visual Basic?
Thanks.
vbp is indeed a VB 5/6 Project File.
VS6/VB5/VB6 are not free, so if you want to build the project you will need to spend $5 on ebay.
The VB5 Control Creation Edition (build COM components only) was the only free version MS released.
Older versions of VS.net included a way to import a VBP and upgrade it to VB.NET, but YMMV (significantly).
Edit; If you just want to look at the source/project structure all the files except .frx are plain ascii.
If you have an MSDN subscription, then VB6 is available as a free download. Otherwise try ebay like Alex suggests, but it usually costs significantly more than $5.
Microsoft recommends users get a 3rd party conversion program called ArtinSoft,
http://msdn.microsoft.com/en-us/ff793478
When opening the vbp file which is the project file, you will most likely have an import wizard show up, which after trying to import the project it will likely tell you there are a bunch of dependencies vb6 used to use which .net does not and will error out. You need to have vb5/6 installed or at least the dependency files installed in order to proceed with the import. You can view source code from the plain ascii text files of the .frM files.
To get a working copy of visual basic follow the following steps.
after much research I found out that the original Vb6 was distributed as a disk set, all CD's are just ISO files built up of folders and files. You can get a copy of an original ISO here. There is a google drive version floating around on the web of the ISO but personally that just seems really sketchy to me.
https://winworldpc.com/product/microsoft-visual-bas/60
in order to use the ISO you will need to unzip the ISO with WinRar, so download a copy of WinRar (its a widely used file archiver tool)
follow the install instructions here https://youtu.be/LXvd8IRw_ZI
"How to Install Visual Basic 6.0 on Windows 7/8/8.1/10" by "Matthew Marcelo"
** be sure to run the installation as administrator ** .\Micrsosoft Visual Basic 6.0\extracted\SETUP.EXE
after getting everything installed I realized I needed a copy of the MSDN library (version October 1999) which is the developer documentation for using VB6, that is found here https://winworldpc.com/product/msdn/october-1999
--
if you are like me and had to get VB6 working because of a very old legacy project and you had no clue what .OCX (controller) files were, and you got a bunch of error messages when you open the main project .VBP file, when you get ahold of the files and install them, installing them as admin usually does the trick by making a batch file, or running an administrator powershell/cmd window
regsvr32.exe \path\to\file.ocx
you need Visual Basic, not Visual Studio to open these files. or you can open it using a normal text editor like sublime text file separately. but if you want to open it like a project then you should use Microsoft Visual Basic 6.0 / 5.0 . There is a portable version too.
If you still want to open .vbp file using visual studio try to use VB tools for Visual Studio. I think it will help you.

Resources