I have a visual studio solution with a number of projects.
Configuration manager is carefully configured to build all projects except one ( the one skipped is a test project ). After building solution in command-line i got following:
"building XXX Debug|x64"
------ Skipped Build: Project: AAA ------
------ Skipped Build: Project: BBB, Configuration: Debug Win32 ------
Project not selected to build for this solution configuration
------ Build started: Project: CCC, Configuration: YYY Debug ia64 ------
< here goes build >
As you can see, project BBB is skipped becouse it is not selected in configuration manager, project CCC and rest build ok and project AAA is skipped with NO REASON GIVEN. Anyone knows why visual studio may skip project build without any reason? All configuration names ( XXX, YYY Debug, Debug ) and platforms ( x64 / Win32 / ia64 ) are correctly configured in configuration manager.
Is project AAA selected for configuration Debug|x64 ?
Also I had the same situation when freshly downloaded solution (without .soa file) had the default configuration to Itanium, so all system without its support were skipping all solution projects to build. Properly build was starting only after selecting win32 manually.
Run the project from the command line using MSBUILD.exe and set the parameter for logging (verbosity) = detailed or diagnostic. You should then get me more output telling you why msbuild considered skipping the one in question. e.g.
msbuild XXXX.csproj /verbosity:detailed
Nb. Diagnostic output is very very verbose
Normal builds within Visual Studio are incremental: Visual Studio will skip building a project if it thinks none of the source files have been changed - note that it only checks code files, not resources or other "stuff".
Try doing a clean build by selecting Build|Clean Solution then Build|Rebuild Solution and see if you get the same results.
You may need to manually clean up the build artifacts for each project (by default, the \Bin\ and \Obj\ subdirectories within each project directory).
Related
I've just updated my VS to ver. 16.8.3 and now suddenly I am getting this error:
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1720,5): error :
Internal MSBuild error: Non-CrossTargeting GetTargetFrameworks target should not be used in cross targeting (outer) build
Not sure at all what to do about this.
We have been working on this project for years and never had such an issue.
Any thoughts?
Seems that the problem is with projects that use multiple .net frameworks AND they referenence ANOTHER project that uses multiple .net frameworks
I have a MINIMAL sample solution at: my public drive
The solution contains two minimal/empty projects that are technically the same except that the one named Microdesk.DbApp referencing the one name Microdesk.Infrastructure.
The Infrastructure project compiles fine while the DbApp project throws the above error.
This solution was working fine for us for multiple years and broke with the latest VS release 16.8.3
Okay, partially my bad.
I did re-compile the EMPTY sample project and found that despite the compiler error, the solution does build.
1>------ Rebuild All started: Project: Microdesk.BIMrxCommon.Infrastructure, Configuration: Debug2020 Any CPU ------
1> Microdesk.BIMrxCommon.Infrastructure -> C:\Work\Microdesk.BIMrx\bin\Debug2020\Microdesk.BIMrxCommon.Infrastructure.dll
2>------ Rebuild All started: Project: Microdesk.BIMrxCommon.DbApp, Configuration: Debug2020 Any CPU ------
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1720,5): error : Internal MSBuild error: Non-CrossTargeting GetTargetFrameworks target should not be used in cross targeting (outer) build
2> Microdesk.BIMrxCommon.DbApp -> C:\Work\Microdesk.BIMrx\bin\Debug2020\Microdesk.BIMrxCommon.DbApp.dll
========== Rebuild All: 2 succeeded, 0 failed, 0 skipped ==========
BUT if you try to USE anything from the Infrastructure project in the referencing DbApp project then the Solution will NOT compile
Rebuild started...
1>------ Rebuild All started: Project: Microdesk.BIMrxCommon.Infrastructure, Configuration: Debug2020 Any CPU ------
2>------ Rebuild All started: Project: Microdesk.BIMrxCommon.DbApp, Configuration: Debug2020 Any CPU ------
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1720,5): error : Internal MSBuild error: Non-CrossTargeting GetTargetFrameworks target should not be used in cross targeting (outer) build
2>C:\Work\Microdesk.BIMrx\BIMrxCommon\Microdesk.BIMrxCommon.DbApp\DerivedClass.cs(1,29,1,4
): error CS0234: The type or namespace name 'Infrastructure' does not exist in the namespace 'Microdesk.BIMrxCommon' (are you missing an assembly reference?)
2>C:\Work\Microdesk.BIMrx\BIMrxCommon\Microdesk.BIMrxCommon.DbApp\DerivedClass.cs(5,33,5,42): error CS0246: The type or namespace name 'BaseClass' could not be found (are you missing a using directive or an assembly reference?)
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========
I did upload a second sample project named "Microdesk.BIMrx (2).zip" to the previous OneDrive directory
When I test your issue in your side, I did not face the same behaviors as you described. So I guess that there is some issues on your current vs environment due to the update. And maybe the update broke some tools of VS.
So please try the following steps to troubleshoot it:
Suggestions
1) disable any third party installed extensions under Extensions-->Manage Extensions-->Installed
2) close VS, delete .vs hidden folder, every bin and obj folder of your project.
and also delete all cache files under C:\Users\xxx(current user)\AppData\Local\Microsoft\VisualStudio\16.0_xxx\ComponentModelCache
Then, restart VS to test again.
3) or create a new project and then migrate the content from the old into the new one to test whether the issue is related to your VS or the special project itself.
4) If this does not work, do an initialization operation on your VS.
Close VS, delete the whole user folder under C:\Users\xxx(current user)\AppData\Local\Microsoft\VisualStudio\16.0_xxx and then restart VS to test again.
5) repair vs from the vs_installer
I m using VSTS build task for building msi files from installer projects.
I get below log message and no msi file is generated(project is being skipped always from build) . I don't see platform option dropdown to select "Any CPU " from build configuration manager.
Please help. Click on the below links to see screen shot of build configuration and build task
build configuration
Build tasks
------ Skipped Build: Project: Setup4, Configuration: Release ------
Project not selected to build for this solution configuration
However msi file is generating fine when I do manual build on setup project. Not sure why platform option is missing for setup project..?????
From the build log, TFS is using Release Configuration. And from the log, it seems that your project doesn't select build configuration for Release configuration.
So, in the configuration manager of Visual Studio, select build for release configuration. Then check in to TFS.
You should pay attention that, both project and solution has configuration settings. If you want to build solution in TFS, change the solution settings. If you want to build project in TFS, change the project configuration settings.
I'm using Visual Studio 2010 and BizTalk 2010.
When I add a new Empty BizTalk Server Project and build it, I get the following output:
------ Build started: Project: ThrowAway1, Configuration: Debug Any CPU ------
ThrowAway1 -> c:\...\Projects\ThrowAway1\ThrowAway1\bin\Debug\ThrowAway1.dll
ThrowAway1 -> c:\...\Projects\ThrowAway1\ThrowAway1\bin\Debug\ThrowAway1.dll
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
I already tried deactivating the release build. But I still get two build events - which also affects the post build event.
With a default console application I get only one build event.
My goal is to run my own deployment PowerShell script in the post build event. The script is coming along nicely but it is called two times by this behavior.
This appears to be the expected behavior of a BizTalk Project.
I'm only speculating that it's because many BizTalk artifacts are compiled in a two step process. Orchestrations to C# then C# to the output Assembly for example.
The only thing I can recommend is to either make the script deterministic or maybe a side project that runs the post build for the entire Solution.
You can also investigate the BizTalk Deployment Framework: http://biztalkdeployment.codeplex.com/
As a pragmatic solution:
Checking the .btproj MSBuild file and its imports
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\BizTalk\BizTalkC.targets" />
where BizTalkC.targets imports
<Import Project="$(MSBuildExtensionsPath)\Microsoft\BizTalk\BizTalkCommon.targets" />
shows the usage of $(SecondBuild) in BizTalkCommon.targets.
This can be used in the post build event:
if "$(SecondBuild)"=="true" (
rem Run script.
)
For the first build $(SecondBuild) will be empty/undefined.
Recently we migrated our project from VS205 to VS2010. Post migration we are observing the problem with automated build. Please, see below the details.
Build machine is set up with CruiseControl and a NAnt script for automated builds with devenv.
Building with VS2010 causes a number of (most) projects to start, but not finish (the only message for each project is “Rebuild All started…”). This is the pattern we have observed:
-------Rebuild All started: Project: Scheduler, Configuration: BuildTWinWithPortalSvc x86 ------
------ Rebuild All started: Project: CSerial, Configuration: BuildTWinWithPortalSvc Win32 ------
------ Rebuild All started: Project: sockeeg, Configuration: BuildTWinWithPortalSvc Win32 ------
TwinPortalSetup.vd project gives the message:
An error occurred while validating. HRESULT=’80004005’
Building (on the same machine) with the command line or from the IDE results in no errors.
This script is almost identical to the one that builds the VS2005 solution, which works fine.
In our VSTS2010 solution, we have a x86-target project that depends on an AnyCPU-target project. When I build the solution, it skips the AnyCPU project, claiming:
------ Skipped Build: Project: myproj, Configuration: Debug Any CPU ------
Project not selected to build for this solution configuration
Then it tries to build the x86 project. This fails, because the AnyCPU project DLL is unavailable.
Am I doing something wrong? What additional information would be helpful in understanding the problem?
Build + Configuration Manager. Tick the Build checkbox.