setup project in visual studio 2022 auto create dll x86 - visual-studio-2022

Recently, I use installer project 2022 to package my game project (game uses sfml graphics library 32 bit version).After the packaging is complete,a few warnings appear:
"WARNING: File 'MSVCP140D.dll' targeting 'x64' is not compatible with the project's target platform 'x86'
WARNING: File 'VCRUNTIME140D.dll' targeting 'x64' is not compatible with the project's target platform 'x86'
WARNING: File 'ucrtbased.dll' targeting 'x64' is not compatible with the project's target platform 'x86'"
I have set target platform to x86.but, when i create primary output, it always generates MSVCP140D.dll,ucrtbased.dll,VCRUNTIME140D.dll x64 no matter I let the target platform be x64 or x86.
this doesn't happen when i do it on visual studio 2019, it targets x86 when i leave the target platform as x86. did visual studio 2022 add some setting that i don't know?.sorry for my clumsy english

Related

Building a project using CMake and Clang from the LLVM SDK on Windows

On Windows when invoking cmake with -G Visual Studio 17 2022 -T ClangCL the Visual Studio project will use the version of the Clang toolchain that comes packaged with Visual Studio.
How can cmake instead be configured to generate a Visual Studio project that will specifically use the version of the Clang toolchain that can be installed via the LLVM SDK?

Brand new CLR Class Library project won't build: missing MSCOREE.lib

Using the latest Visual Studio 2019 version, a brand new project will not build:
fatal error LNK1104: cannot open file 'MSCOREE.lib'
I have tried to re-install Visual Studio but that didn't change anything unfortunately.
These components have been selected by the installer but apparently it's not enough:
MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.24)
Windows 10 SDK (10.0.18362.0)
C++/CLI support for v142 build tools (14.24)
Question:
Are there any tricks to get CLR Class Library (.NET Framework) projects to build ?
Here is the solution:
Apparently, no matter what framework version you will target, the $(NETFXKitsDir)Lib\um\x86 macro will always point to C:\Program Files (x86)\Windows Kits\NETFXSDK\4.7.2\lib\um\x86.
Now here's the problem, even though you install 4.7.2 SDK in Visual Studio Installer, this file is nowhere to be seen.
But if you download .NET Framework 4.7.2 Developer Pack Offline Installer and press the Repair button, it gets correctly installed and a brand new project will build succesfully.
Alternatively:
Re-installing VS also fixes the issue ...

Are there an x64 installer of LINQPad?

I have searched the site http://www.linqpad.net/ and haven't found an x64 installer.
I need it to launch code from my Visual Studio project that is x64.
I referenced an assembly from my project (via F4), and it is not getting loaded during runtime with BadImageFormatException.
Download the AnyCPU build from http://www.linqpad.net/download.aspx.

How To Detect Visual C++ 2012 X64 RunTime In Wix Bootstrapper Project

I want to detect If Visual C++ 2012 X64 RunTime is installed or not.
There is samples and Registery keys sample for Visual C++ 2010 But I can not figure out for C++ 2012 X64 RunTime registery search key .
So How To Detect Visual C++ 2012 X64 RunTime In Wix Bootstrapper Project?

WIX And NAnt : Unable to build WIX source code

I am trying my hands on source code of WIX 3.6 to debug something as well as learn something.
On executing make.bat (present in root folder of WIX source) file, first i got NAnt not found. So I downloaded NAnt and updated make.bat file. On executing the file again I am getting this error
NAnt 0.91 (Build 0.91.3881.0; alpha2; 8/17/2010)
Copyright (C) 2001-2010 Gerry Shaw
http://nant.sourceforge.net
Buildfile: file:///D:/wix36-sources/wix.build
Target framework: Microsoft .NET Framework 4.0
Target(s) specified: inc
[readregistry] Registry Path Not Found! - key='Software\Microsoft\VisualStudio\VSIP\10.0\';hive='Microsoft.Win32.RegistryHive[]';
[readregistry] Registry Path Not Found! - key='Software\Microsoft\VisualStudio\VSIP\10.0\';hive='Microsoft.Win32.RegistryHive[]';
[property] Target framework changed to "Microsoft .NET Framework 2.0".
[property] Read-only property "dir.hhw" cannot be overwritten.
[property] Read-only property "hhw-found" cannot be overwritten.
BUILD FAILED - 2 non-fatal error(s), 2 warning(s)
D:\wix36-sources\wix.build(65,4):
Build file 'D:\wix36-sources\test\wixtests.build' does not exist.
I have .Net framework 4.0 installed on my local. Also I searched through registry for the registry key mentioned in the error and didn't found. Am I using right version of NAnt?
Do you have all of the prerequisites as described in the documentation?
In order to fully build WiX, you must have the following Frameworks and SDKs installed:
NAnt (0.90 or later)
The following components from the Windows SDK for Windows Server 2008 and .NET Framework 3.5, Visual Studio 2008, Microsoft Windows 7 SDK, and/or Visual Studio 2010:
x86 and x64 compilers, headers and libraries
IA64 headers and libraries are optional, but they are necessary for IA64 custom action support
If you want to be able to build optimized IA64 binaries, you'll need both the Windows SDK for Windows Server 2008 and .NET Framework 3.5 SDK AND Visual Studio 2008 installed; or the Microsoft Windows 7 SDK AND Visual Studio 2010.
HTML Help SDK 1.4 or higher [installed to Program Files or Program Files (x86)]
The missing registry key seems to be related to the VisualStudio SDK - you don't need this for basic WiX.
If you have all of the prerequisites, try passing the -debug switch to Nant for more detailed debugging output.
To solve this problem:
[readregistry] Registry Path Not Found! - key='Software\Microsoft\VisualStudio\VSIP\10.0\';hive='Microsoft.Win32.RegistryHive[]';
[readregistry] Registry Path Not Found! - key='Software\Microsoft\VisualStudio\VSIP\10.0\';hive='Microsoft.Win32.RegistryHive[]';
If you used Visual Studio 2010 SP1 you need Visual Studio 2010 SP1 SDK