error : Element <EnableEnhancedInstructionSet> has an invalid value of "NoExtensions" - c++

I am trying to open a C++ project by others under VS2010 in Windows XP on a virtual machine. The problem is, the project was seem to be developed under VS2012 under Windows7 I think. I have successfully converted its related configurations, thanks to internet. But now, when I try to build this project, I got the following error:
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(147,5): error : Element <EnableEnhancedInstructionSet> has an invalid value of "NoExtensions".
Seems like the configuration changes caused this problem. What I did is to change the Project ->Properties->Configuration Properties->General->Platform Toolset from "v120" to "v100", then also changed the DefaultTargets="Build" ToolsVersion="12.0 into DefaultTargets="Build" ToolsVersion="4.0".
How can I overcome this error? Thanks.

Ok, I solved it by this way: Project ->Properties ->C/C++ ->Code Generation->Enable Enhanced Instruction Set -> Not Set.

Related

error MSB4044: The "CheckRuntimeLibrary" task was not given a value for the required parameter "RuntimeLibrary"

I tried to use a C++ code for converting mnist dataset into lmdb format. I installed all the needed packages, but when I ran the code I got this error:
Error MSB4044: The "CheckRuntimeLibrary" task was not given a value for the required parameter "RuntimeLibrary". c:\Users\mohamed-witti-adou\documents\visual studio 2013\Projects\Project2\packages\gflags.2.1.1.2\build\native\gflags.targets
I am new to C++ and VS coding, I would like some help to overcome this error. Thanks in advance.
As noone else has answered and I found this question when Googling my error text: The problem in my case was that I was building a completely empty Visual Studio project that I had copied and modified for a new project. When I added a source file to the project the error went away.

Unable to start process C:\Program Files\dotnet\dotnet.exe. The web server request failed with status code 502. Error in Visual Studio 2017

I am facing a strange issue while building a solution which has web projects. I get the error below. Any solution or thought on it.
Fixed by adding forwardWindowsAuthToken="false" in the web.config file.
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false" stdoutLogEnabled="false" />
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module
I faced the same issue here
How I fix
(1) Open Event Log. I noticed that there is a warning: 'Static compression is being disabled'.
(2) Follow the 2 links to fix this issue
https://forums.iis.net/t/1195656.aspx?The+directory+specified+for+caching+compressed+content+is+invalid+Static+compression+is+being+disabled+
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc735199(v=ws.10)
(3) Open TOOLS -> Options -> Projects and Solutions
Enable 'Use the 64 bit version of IIS Express for web sites and projects' (My system is 64 bit)
I am not very sure what happen exactly. But this helps me to fix this issue. Hope it can help you as well.
Turned out that my web.config file got changed. It had configurations set for deployment which were not available to me. Restoring the web.config file fixed this issue.
Deleting the .vs folder has fixed the problem for me.
It looks like an old question and most of the answers look ok. To resolve the similar issue, I added AllowedServerVariables in vs -> ->config ->applicationhost.config file as below
if you have dotnet core >=2.2 just add the following to your project
<PropertyGroup>
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
</PropertyGroup>
You possibly have a url reservation configured for that particular endpoint that could be conflicting. You can see the list of these by running the following command at an elevated cmd prompt:
netsh http show urlacl
You can delete the offending one like so:
netsh http delete urlacl http://+:59090/

Visual Studio 2015: C++ code analysis error C1253, unable to load model file 'res://mspft140.dll/300'

Visual Studio 2015 Community update 3, trying the C++ code analysis feature. The settings are as follows:
solution properties > code analysis settings > [all configurations] [all platforms] : microsoft native recommended settings
project properties > code analysis > [all configurations] [all platforms] : microsoft native recommended settings
Whenever I run analyze > run code analysis on solution I would always get a c1xx : fatal error C1253: Unable to load model file 'res://mspft140.dll/300'. This happens to every project, new or existing. MSDN is not particularly helpful about this one.
The string is a res protocol, so I checked if the dll mentioned is at its correct location (there are two actually, at c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\ and c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64), and opened them with resedit. Both contain an XML resource named 300, so I don't see any reason for VS being unable to load it. Resetting the settings didn't help, full uninstall and reinstall (half a day wasted) did neither.
I also ran procmon with [Path] [contains] [mspft] filter while running the code analysis in VS, but the file system results are only SUCCESS and FILE LOCKED WITH ONLY READERS, which seems to be ok.
Did anyone experience this error? Does anyone have any surmises about its cause?
Update: After looking thoroughly through many more procmon captures with different filters I found out that cl.exe tries to open this registry key value: HKCR\PROTOCOLS\Handler\res\CLSID. Clearly it looks for the handler of the res protocol mentioned in the error output - and it's not there to be found, while many siblings of res key refer to some valid handlers, for example, http key has CLSID value of {79eac9e2-baf9-11ce-8c82-00aa004ba90b}. I guess that my quest for now is figuring out what that res CLSID is meant to be.
I was right in my assumption about the res protocol handler. The correct HKCR\PROTOCOLS\Handler\res\CLSID value is {3050f3bc-98b5-11cf-bb82-00aa00bdce0b} (which refers to C:\Windows\System32\mshtml.dll). For some reason my registry was missing it; as soon as I added the value, the code analysis started working without errors.
I hope this helps someone, although I believe the bug is extremely rare.

MSB4018 The "ResolveComReference" task failed unexpectedly

I am currently trying to upgrade our c++ mfc solution from visual studio 2010 to a visual studio 2013 solution. When i try to build it i get the error MSB4018 The "ResolveComReference" task failed unexpectedly. I enabled fusion logging and this is what it tells me:
=== Pre-bind state information ===
LOG: DisplayName = System
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: System | Domain ID: 1
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Program Files (x86)/MSBuild/12.0/bin/
LOG: Initial PrivatePath = NULL
Calling assembly : Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. ===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\MSBuild\12.0\bin\MSBuild.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System/System.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System/System.EXE.
I understand that msbuild has been moved, but i dont understand why it is trying to find System.dll in the msbuild path, how can i make it look for it in its proper location?
Edit:
I have now also tried upgrading to visual studio 2012 which worked without bigger problems and I did not run into the same problem. However i noticed that when running devenv /upgrade (with vs2013) it seems to completely change everything under vc++ directories (it stayed unchanged when upgrading to vs2012). Could this have something to do with this issue?
Edit2:
Tried to build the project in vs2013 after upgrading it to 2012 (without running devenv /upgrade), this also didnt work so I guess the problem is not related to that...
After enabling diagonostic build output i found that it was 3 broken COM references in the project that where failing to load. Removing these references solved the building issue. These where only showing up as warnings in vs2010 but resulted in MSB4018 in vs 2013 for some reason.
This is your problem:
LOG: Appbase = file:///C:/Program Files (x86)/MSBuild/12.0/bin/
Fix the base folder in your build system if you really need it to point to another filder. However it would probably be better to redo you build system targeting 2013 instead of patching the 2010 version.

error rc1106 even using the latest sdk

I made an application it gives me an error like
RC : fatal error RC1106: invalid option: -ologo
Although i have installed the latest win sdk 7.0.
What i might be missing?Thanks for the help.
It should be /nologo, just fix it in project properties.
I got same problem. I fixed this by go to project property -> Resources -> General and set "Suppress Startup Banner" to "No"