When compiling my solution in Visual Studio 2017 RC I get
C:\Code\src\MSBUILD : error MSB1001: Unknown switch.
Switch: -
For switch syntax, type "MSBuild /help"
On every project.
I can compile the solution using Visual Studio 2015. I have changed the build output to 'Diagnostic' and this is still all that I see.
Looks like it was lightweight solution load. I hit F4 on the solution and disabled lightweight load, closed VS and re opened the solution, and it works fine now.
I've just re-enabled lightweight load, and sure enough I get the same error - definitely lightweight load.
Related
I am trying to run the code analysis of Visual Studio 2015 on my x64 VC++ project. However I get the following error:
Error C1250 Unable to load plug-in 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\\bin\localespc.dll'
I am activating the x64 toolset of Visual Studio by running the batch script "vcvarsall.bat amd64" before I start the IDE. Visual Studio is run with the "/useenv" option afterwards.
When I check the VC++ environment variables, I can see that the following path is contained in the PATH variable:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64
How can I tell Visual Studio to use the code analyzer (localespc.dll) from there and not the x86 version which it apparently tries to use (according to the error message).
Thanks a lot for your help!
I was having the same issue with my 64-bit C++ projects. I discovered simply renaming/removing localespc.dll from VC\bin allowed the Code Analysis builds to succeed and still report analysis warnings. It seems if VS doesn't find this dll in the VC\bin directory then it won't add the compiler switch for /analyze:plugin but otherwise passes all the other switches required by the Code Analysis.
Set the following property in your project file: <PreferredToolArchitecture>x64</PreferredToolArchitecture>
This tells Visual Studio to use the 64-bit version of various tools, including code analysis. I found How to make Visual Studio use the native amd64 toolchain helpful on the topic.
Note that renaming localespc.dll no longer solves the problem with Visual Studio 2017. It seems that setting PreferredToolArchitecture is Microsoft's intended way to do this.
I'm a student in Videogame Development, and just starting out looking at Unreal.
And no, none of my teachers know anything about this.
I have installed Unreal Engine 4.13 and Visual Studio Community 2013 now 2015.
I'm trying to make a C++ project using Unreal Engine (using blueprints is out of question so this didn't help)
Now, when I make a basic C++ project, Visual Studio shows the following error message:
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.
- UE4, "C:\Users\Gebruiker\MEGA\Unreal\Disposable\Intermediate\ProjectFiles\UE4.vcxproj"
- Disposable, "C:\Users\Gebruiker\MEGA\Unreal\Disposable\Intermediate\ProjectFiles\Disposable.vcxproj"
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.
- Engine, "Engine"
- Games, "Games"
- Disposable, "C:\Users\Gebruiker\MEGA\Unreal\Disposable\Disposable.sln"
Then my browser opens showing a Migration Report telling me that VS had an error with Project.vcxproj and UE4.vcxproj, although it copes with Engine, Games and Project.sln.
After this VS does show up without any further action, and it does automatically open *.h and *.cpp files for newly added classes in UE4.
Though it does edit and save these, it claims that all UE's code is wrong (with squiggles), and for compiling UE4 gives errors on pieces of code that apparently don't give errors on other's machines.
It would be much appreciated to be helped out, and I'm sure it would help others too who would have the same problem.
EDIT
A screenshot of the problem and configuration
EDIT 2
A screenshot of the Help -> About Visual Studio page, VS 2015 C++ highlighted
Starting with both the Unreal Engine Editor and Visual Studio closed, right click your .uproject file and select Generate Visual Studio project files, and then launch visual studio from the .sln file.
Once Visual Studio is open check your Solution Configuration is set to Development Editor. Then go to Debug > Start without Debugging (or Ctrl-F5). If everything compiles and the Editor opens again then you're good to go.
I uninstalled VS2013, installed VS2015 with all additional options checked, made a blank, new project with Unreal with just VS2015 on my pc, and now everything works fine.
Perhaps my VS2013 installation was broken, deprecated or switching version wasn't a good idea, but I can work with VS in any case now.
Also thanks to jeevcat for mentioning it!
Install newer version of the Visual Studio. VS2013 is not the latest one, VS2015 is. People report that even updating VS2013 from Update 2 to Update 4 helps resolving similar issues.
I recently made the change to Visual Studio 2015 from Visual Studio 2012 as my compiler for my c++ projects. After making this change I have noticed that visual studio will frequently hang in the build process.
This never occurred with Visual Studio 2012. The hangups are at random points and do not occur at the same build points in my projects.
When I ran VS in administrator mode and got all of the cl.exe's and link.exe's to appear as command prompts I was able to see when they hung. And there were no errors thrown or anything.
The only way I have successfully worked around this issue is by setting Visual Studio's build process to only process one project at a time and use only one compilation simultaneously. However I cant maintain this as my build time is somewhere around 3-4 hours (Yes, this is a HUGE project).
I think this is a duplicate of Visual Studio 2015 Win64 hangs during solution build. I posted an answer there. In short, there may be a patch that resolves the issue:
https://www.microsoft.com/en-us/download/details.aspx?id=51161
I was trying to build one of my x86 projects in x64 and I tried the solution given here
set _IsNativeEnvironment=true
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" YourProject.sln
Now, I am getting the following error prompt when I try to open any of the visual studio solutions ....... is not a valid win32 application.
Note: I have been working on this solution for quite a while and there was no such problem.
Edit: My devenv.exe itself has got corrupted and it's size is 0 KB. I reckon that's the problem. Will try to reinstall visual studio and see if the problem persists.
I use Visual Studio 2010 to build my C++ project. There are three machine-generated-files, each with 30,000-40,000 lines of code and some smaller ones from myself.
In Win32 the build will take less than 60 seconds.
In x64, the build will take up to 20-30 minutes at the outputline:
1> Generating Code...
I'm not sure if that has something to do with each other, but if I want to build the project (win32 and x64), I have to enable the option \bigobj
Otherwise I get this output:
fatal error C1128: number of sections exceeded object file format limit : compile with /bigobj
I had no problems so far with projects without big files and I used the same setting in the project properties.
What could the problem be?
Is this a well-known problem with x64? Are there some project properties that will speed up the build?
Visual Studio 2010 is really "quirky" in 64 bit builds. I've had some issues with it, particularly in the linking stage (very very slow). There are some reports about it: Visual Studio 2010 Ultimate really slow compile time
My suggestion is to try Visual Studio 2013. It's compatible with Visual Studio 2010 projects and it solved all my building issues, so it does see that Visual Studio 2010 has some unresolved bugs.