how to configure visual studio 2022 C++ project to redirect Dlls - visual-studio-2022

I currently have an application under visual studio 2022, which uses the openworld_470.dll library
the app is working properly.
I would now like in the application to create a libs directory containing the openworld_470.dll libraries
the application no longer works when I move the libraries from the root of the application to the libs directory.
Do you have an idea to solve this linkage problem which seems simple at the base?
I added in the project configuration in the VC++ directories -> references directory $(CommonExecutablePath)\libs;
it still does not work.
By adding in the system PATH the path of my application/libs the app works but I don't have to modify the PATH.

The easiest option is to use SetDllDirectory to add the libs directory to your search path.
And then to set the loading of openworld_470.dll to be delayed. You can do this by adding /DELAYLOAD:openworld_470.dll to your linker settings.

Related

Packaging Unreal Build Configurations

I have integrated the Steam API with my project and I had to add the actual API to the include directories of my DebugGame_Editor Configuration as well as the library directory.
The editor has been building properly for a month and Steam runs in-game, but now I have gotten to packaging my game and I am getting an error:
Cannot open include file: 'steam/steam_api.h': No such file or directory.
I assume that the configuration that it is using to package the game is missing those include directories and the library directory. Which configuration does UE4 use when packaging a game for Win64? There are like 40, and I don't want to try each and every one.
Engine Version: 4.7.6 from source (GitHub)
Edit:
I have gone through all configurations in the configuration manager in Visual Studio and added the two directories to the include and library sections of both Win32 and x64 in all of them (except the ones that say Mac or IOS), but no dice. It still throws that error message when it is trying to build ProjectName.generated.cpp
I'm not sure what to try next.
So I was able to fix this problem by including the files with an absolute path, rather than relying on relative include paths.

Set location of binaries in wixproj file

I am using Wix 3.9 and when I run a continuous integration build in TFS I get an error
heat.exe: The directory could not be found because TFS is putting binaries in a different location to my local machine, so the project will build locally but not on TFS.
In my wixproj file I have a location set for the binaries which works locally
Dir=$(SolutionDir)\ProjectName\bin\$(Configuration).
Is there anything I can set this to which will find the binaries both on my local machine and TFS?
I am looking for something like the project reference variable $(var.MyProject.TargetDir), but this doesn't seem to work in wixproj files.
I worked around this issue by changing my project files to output the binaries to the same location as Team Foundation Build. That way both desktop and continuous integration builds can use the same reference to the common binaries directory.
If you are using Team Foundation Build 2012 or earlier your directory reference would be: Dir=$(SolutionDir)..\Binaries\$Configuration. The corresponding output path in a C# project would be ..\..\Binaries\Release or ..\..\Binaries\Debug (assuming the project folder is located in the root of the sources directory).
If you are using Team Foundation Build 2013, the same technique can be used, but the Binaries folder becomes bin. Your directory reference becomes: Dir=$(SolutionDir)..\bin\$Configuration. A similar change is required to the project output folders.
Team Foundation Build 2013 has additional options to control the output location, where you can put the output binaries in the same layout as your project structure. I've not used that personally but that might provide a solution.

Put additional Frameworks like Webkit.Net into a subfolder

That Webkit.Net project is great and working fine for me.
https://sourceforge.net/projects/webkitdotnet/
So how could I manage to exclude the dll and other files to separate subfolders? I was thinking about just putting the librarys into subfolder. But somehow I nowhere found a solution that works.
So how can I put the Wekbit.Net into the subfolder webkit.
Here some links I already looked through but not found a solution for vb and win forms:
How to save DLLs in a different folder when compiling in Visual Studio?
C# Putting the required DLLs somewhere other than the root of the output
Copy all files and folders using msbuild
NuGet issues with packages.config, project references and the solutionwide packages folder
http://www.visualmicro.com/page/User-Guide.aspx?doc=Add-Libraries.html
http://msdn.microsoft.com/en-us/library/ms181484.aspx
http://support.microsoft.com/kb/837908
If the Webkit assemblies are neither in the same directory as your application nor in the GAC, you have to tell your program where it can find them.
This answer explains how to resolve assemblies that couldn't been loaded by the CLR: https://stackoverflow.com/a/1373295

Visual Studio 2013 Publish issue

I converted a VS2010 ASP.Net MVC3 project to VS2013 MVC4. Now when I publish, it is copying the contents of my project to the bin folder.
I can't understand what I did to make it do this..How do I fix it so it doesn't do it?
Your files are incorrectly set to copy to the output folder (\bin) during build. Make sure that the Copy To Output setting on each file is set to Do Not Copy.
Normally, you don't need to copy much of anything to your bin folder. When publishing, all of the content pages (*.aspx, *.html, *.css, etc) will get picked up by publish just by existing in the project. This is determined by the Build Action being set to Content. (Note: you can exclude files by setting the Build Action to None)
For code files, there's 2 ways it could go. in a Web Application project (which MVC is) most code files, such as controllers, models, or code behind files in WebForms, are compiled into your site's DLL already. These have Build Action = Compile, meaning they get compiled up front and don't need to be included in the publish. The exception to this is files in App_Code, which are deployed to your site (Build Action = Content) and compiled at runtime. You can also choose to pre-compile your site in the publish settings (Settings -> File Publish Options -> Precompile during publishing), which will process the App_Code files automatically (i.e. you can leave them as Build Action = Content and VS will compile them and publish the output instead).

Visual Studios 2010 Shared Project?

I have been searching around for an answer to this question, but I cannot find the documentation on it. I found a few similar questions asked here, but none that completely cover it?
Similar Question
What do all of the different files in the project directory do? I am trying to make my project open source and I don't want to have a ton of unnecessary files in my repository. What files are vital and what files will be generated when the user initially loads the project? Its important to note that this is a VB Form Application
Base Directory:
*.vb
*.Designer.vb
*.resx
*.vbproj
*.sln
*.vbproj.user
*.config
Any of the other folders in the base directory?
*/bin
*/Collection
*/My Project
*/obj
*/Resources
*.suo and *.user files can be ignored. They store user specific settings such as window arrangements, open files etc. Those files are generated by Visual Studio whenever a solution is opened.
*.vb files are somewhat important since they contain your source code...
*.sln and *.vbproj files tell Visual Studio which projects are in a solution and which files are in a project, respectively. They also contain project specific settings such as build plattforms, custom build events, target .NET Framework etc.
*.resx and app.config can be important, depending on your project. They should not be left out when you publish your project, however since they're part of the Visual Studio project. If they're truly not needed you can remove them from the project.
Edit
Folders bin and obj are where Visual Studio generates the compiled output so you should not include those when you publish the source code of your project. Any other folders are project specific so it depends on your project if they're needed or not.
As a rule of thumb, anything that is automatically generated should be excluded when you publish your source code.
Also, if you don't already, you should use a version control system such as Subversion or GIT to manage your sources. Any essential files / folders as explained above should go in there.