The following picture shows an exceprt of the projects within my solution. When I build the Midas.Server project, only the Apache.NMS.dll is copied to the Release folder. Any suggestions why? Or how to force it? :(
Related
I think I have various beads on why this may be happening, but I can't quite put all the clues together.
We were building an ASP.NET app in VS 2019 with a nuget dependency (Microsoft.Data.SqlClient.SNI.1.0.19235.1 if it matters). I've used msbuild -t:package and in VS 2019, it would spit out bin\x86 and bin\x64 folders with the DLL from that nuget package. That package step would spit out a zip file and opening that up you can see the x86/x64 folders in there.
We upgraded to VS 2022 and the CPU arch folders are no longer there. I can see them get created in the working directory, but not in the package output.
Nothing in the project has changed. It's set to target "AnyCPU" and Framework 4.6.2. The command we're using to build hasn't changed either. As far as I can tell, it's just the upgrade to VS 2022.
I know VS 2022 is now 64-bit native, so I have a suspicion that's in play here. Any ideas on why those CPU-architecture folders are no longer included in the zip package? And how to get them back in there?
Thanks!
According to your description I make some test, hope it can help you:
Check your Configuration Manager under Build in the menu and add new Platform you need.
Build the project in Batch Build under Build in the menu.
We can see that .dll files are created in the same path so it will be covered.
Open the project file.(Right click on the project and Unload Project then right click again an choose edit project file)
You can see code like this:
Change the OutputPath to “bin\x64\Debug\”, ”bin\x64\Release\” and so on.
Reload the project and rebuild the project in Batch Build.
About how to Pack multiple platforms into one package you can see this(Pack multiple platforms into one package, using dotnet pack ).
If it helps anyone, since my problem was specifically with the SNI.dll not being emitted in the x64/x86 folders, my workaround solution was to upgrade the Microsoft.Data.* libraries to a newer version. The x64/x86 folders are still not emitted, but I now see Microsoft.Data.SqlClient.SNI.x64.dll and Microsoft.Data.SqlClient.SNI.x86.dll files in the root bin folder.
It doesn't answer the original question, but at least it got me moving.
I have a project in Visual Studio 2019 and I met a situation, when there were files with Build Action set to Content missing on a disk but present in project (listed in .csproj file). My local build finished successfully, but when I checked this code to TFS, build on the server failed because of missing files.
I wonder if there is any instrument to force VS compiler to look at Content files and check if they exist.
Thanks in advance for any advice.
Maybe you should have a look at the Visual Studio Plugin Show Missing Files 2019.
Disclaimer: I do not have any experience with this plugin myself, it just seems to fit your situation.
I used this tutorial to add google test to my existing CMake project. I use CMake to generate my Visual Studio 2015 project files as well. Unfortunately, doing so also caused CMake/Visual Studio to generate six additional Visual Studio projects which were not there before:
Is there a way to hide or get rid of these? They are cluttering my workspace...
The easy solution is: don't build gmock and gtest together with your project (I know some people advice to do exactly this).
I'm going this way for years and I'm totally fine with that. The procedure is the following:
I am downloading googletest from github. The project itself is coming with CMakeFiles, where is normally no need to modify them. I run cmake and build them in visual studio in isolation. After that I just link my Project against gmock and copy the dlls into my build folder. and done :)!
Main Goal - To deploy a live version of my solution on an IIS. I am currently attempting to do so by building a deployment package through Visual Studio 2010.
Issue - When attempting to build a deployment package or publish my project within Visual Studio 2010, I get an error stating that 'bin/EntityFramework.xml' is missing.
I've done quite a bit of research and have not been able to find any information on how this file could have gone missing or how to restore/regenerate the file.
Questions - Is there any way to restore or regenerate the 'bin/EntityFramework.xml' file? Or, is there a simpler approach for deploying my VS 2010 solution to an IIS?
(FYI, I've already attempted copying the file structure to an IIS manually. This caused assembly issues, which is why I'm currently avoiding that approach.)
Thanks!
To answer the specific question first, you can easily regenerate this file by creating a new project of the same type (e.g. ASP.NET MVC3), then building that new project. EntityFramework.xml will appear in the new project's bin folder. You may then copy it over to your existing project.
However, you can just 'Exclude from Project' the missing file (via right-click in Solution Explorer), since it is not required to build, then you will achieve your goal of publishing the project through VS2010.
I have one solution with five projects and one solution folder. All project has a reference to project inside solution folder. When I clean solution and build, projects in solution folder does not build. I need to build project in solution folder before I build the solution.
How can I fix this problem?
It sounds like a project is dependent on another project in your solution (not uncommon).
You can change the order that your projects build in Visual Studio so that the dependency tree is satisfied when building a solution.
If you right click on the solution in the Solution Explorer and choose 'Project Dependencies...' you will be able to tell Visual Studio which order to build your projects.