Microsoft.DesktopBridge.props in a C project - visual-studio

I'm trying to build Nethack on Windows, and I get this error message:
"C:\NetHack-NetHack-3.6.6_Released\win\win32\vs2017\NetHack.sln" (Clean;Build target) (1) ->
"C:\NetHack-NetHack-3.6.6_Released\win\win32\vs2017\NetHackPackage.wapproj" (Clean target) (33) ->
C:\NetHack-NetHack-3.6.6_Released\win\win32\vs2017\NetHackPackage.wapproj(27,3): error MSB4019: The imported project "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.props" was not found. Confirm that the expression in the Import declaration "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\DesktopBridge\\Microsoft.DesktopBridge.props" is correct, and that the file
exists on disk.
I get a similar error message when trying to build with VS 2017 instead of 2022, and when trying to build the latest 3.7 sources instead of 3.6.6.
I've never heard of Microsoft.DesktopBridge.props and there is no file by that name anywhere on my machine. Google throws up some results for that name (both here and on other sites), but all of them seem to be discussing .Net projects, and Nethack, in a counterexample to nominative determinism, has nothing whatsoever to do with .Net; it's a pure C program.
What's going on with this?

Related

Error while building SSIS project using MSBuild during CI/CD implementation

Can someone assist with the following error which i am getting while building SSIS project using msbuild. I am having Visual studio 2015 in the machine. Using MSBuild 14.0
"*
error MSB4041: Th e default XML namespace of the project must be the
MSBuild XML namespace. If the project is authored in the MSBuild 200 3
format, please add
xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the
element. If the proje ct has been authored in the old 1.0 or
1.2 format, please convert it to MSBuild 2003 format.
*"
I have gone through some articles online but couldn't find solution with this scenario.
*" I have gone through some articles online but couldn't find solution with this scenario.
I'm afraid the answer is negative. For now this scenario(build SSIS project using msbuild) is not supported.
Someone has post this issue in DC forum, see Support SSIS, SSRS, SSAS in MSBuild. So if you're trying to use azure devops for CI/CD process, please vote and track this issue to get notifications when there's any update. And if you're using other tools for CI/CD process, I suggest you open a new feature request to support SSIS building for stand-alone msbuild tools in local machine.
And here're two workarounds which may help:
1.Since you have VS2015 installed, instead of msbuild command, you can try using devenv command.
For VS2015, we can find devenv.exe and devenv.com in path C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE. Both devenv.exe and devenv.com works for this, but note: Using devenv.exe directly prevents output from appearing on the console.
So devenv.xxx ... xxx.dtproj /build can work to build the SSIS project.
2.We can find binary(Microsoft.SqlServer.IntegrationServices.Build.dll) of the SQL Server Data Tools in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE. Then we can use msbuild UsingTask element to call the tasks defined in that assembly.
The core is to call DeploymentFileCompilerTask task for SSIS build in our custom msbuild target after defining this statement:
<UsingTask TaskName="DeploymentFileCompilerTask" AssemblyFile="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.SqlServer.IntegrationServices.Build.dll" />
More details please refer to here and here.
Update:
If we have several Database projects and SSIS projects in same solution. Using command like devenv.com xx.dtproj directly will actually build all projects.
So I suggest we use command in this way:
Open Developer command prompt for VS
cd to solution directory
use command: devenv.com SolutionName.sln /Build Development /Project SolutionName\xxx.dtproj /ProjectConfig Development
This will only build the SSIS project actually.
In addition: If you see the message The project 'DatabaseProjectName.sqlproj' will close once model building has paused. If it doesn't affect your build, just ignore it. After my check if won't actually build Database project(the output of database project is empty) if we use command above.

Newly created Cross-Platform Xamarin.Forms project fails to build after updating NuGet Packages

I'm trying to create a cross platform mobile app with Xamarin.forms in Visual Studio Community 2017 (version 15.9.5).
After creating the project I update the NuGet packages and receive 3 errors and 1 warning (to note: I didn't write any code at all).
Below you can find a detailed process of what I do and detailed error messages.
I click on File > New > Project > Visual C# > Cross-Platform > Mobile App (Xamarin.Forms).
I name my project and I'm prompted to choose a template, I select "Blank App".
For platform I choose all 3 (iOS, Android, UWP), and as code sharing strategy I choose "Shared Project".
After the project has been created I open the NuGet Package Manager and update all of my packages, here you can see them in their latest version.
Once the packages are updated I receive 7 warnings and 1 error. I clean and rebuild the solution but I keep getting these errors and warnings, although from time to time they change without me changing anything.
I may see 7 warnings and no error, close the project, open it again, rebuild and get 3 errors and 1 warning.
Here is the list of errors at the moment:
And here is the full output:
1>------ Rebuild All started: Project: Bencivenga_Gioele_Bengalino.Android, Configuration: Debug Any CPU ------
2>------ Skipped Rebuild All: Project: Bencivenga_Gioele_Bengalino.iOS, Configuration: Debug iPhone ------
2>Project not selected to build for this solution configuration
3>------ Rebuild All started: Project: Bencivenga_Gioele_Bengalino.UWP, Configuration: Debug x86 ------
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3064,2): error : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error XA4303: Error extracting resources from "C:\Users\gioel.nuget\packages\xamarin.android.support.compat\28.0.0.1\lib\monoandroid81\Xamarin.Android.Support.Compat.dll": System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error XA4303: at System.IO.LongPathHelper.Normalize(String path, UInt32 maxPathLength, Boolean checkInvalidCharacters, Boolean expandShortPaths)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error XA4303: at System.IO.Path.NewNormalizePath(String path, Int32 maxPathLength, Boolean expandShortPaths)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error XA4303: at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error XA4303: at System.IO.Path.GetFullPathInternal(String path)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error XA4303: at Xamarin.Android.Tools.Files.ExtractAll(ZipArchive zip, String destination, Action2 progressCallback, Func2 modifyCallback, Func2 deleteCallback, Boolean forceUpdate)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error XA4303: at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection1 jars, ICollection1 resolvedResourceDirectories, ICollection1 resolvedAssetDirectories, ICollection`1 resolvedEnvironments)
3> Bencivenga_Gioele_Bengalino.UWP -> C:\Users\gioel\Documents\Repositories\GitHub\BengalinoUWP\Bencivenga_Gioele_BengalinoApp\Bencivenga_Gioele_Bengalino\Bencivenga_Gioele_Bengalino\Bencivenga_Gioele_Bengalino.UWP\bin\x86\Debug\Bencivenga_Gioele_Bengalino.UWP.exe
3>C:\Users\gioel.nuget\packages\microsoft.net.uwpcoreruntimesdk\2.1.2\tools\CoreRuntime\Microsoft.Net.CoreRuntime.targets(195,9): error : Framework resource extraction failed. The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
========== Rebuild All: 0 succeeded, 2 failed, 1 skipped ==========
I searched online for a solution and found some old threads where they recommend using LongPathTool in order to get rid of the 260 characters maximum problem but their instructions are "just install it and it will work" and well, doing that isn't making anything work for me.
Thanks for reading the question and even more thanks if you give me any idea or suggestion regarding this problem. Feel free to ask for more details.
Move your project to the root of C://, typically this solves that specific error.
Try to create a folder in C:\Users\ named XamarinProjects, and put your solution there.
After some digging I found this:
<PropertyGroup>
<UseShortFileNames>True</UseShortFileNames>
</PropertyGroup>
If setting this flag does not fix the PathTooLongException error, another approach is to specify a common intermediate output root for projects in your solution by setting IntermediateOutputPath in the project .csproj file. Try to use a relatively short path. For example:
<PropertyGroup>
<IntermediateOutputPath>C:\Projects\MyApp</IntermediateOutputPath>
</PropertyGroup>
From Official Documentation

VS2017 MSB4057 The target "CreateManifestResourceNames" does not exist in the project

When VS2017 was used to create a stateful solution, producing the standard boilerplate code, the resulting two projects have two different MSBuild versions.
The application uses MSBuild version 1.5.0.
The service uses MSBuild version 1.6.0 (the current "latest").
If I run the solution this way, it runs fine on my local Service Fabric cluster.
But when after I use NuGet to update the application's MSBuild to 1.6.0 (so both application and server projects use the same), the following errors occur.
Severity Code Description Project File Line Suppression State
Error The OutputPath property is not set for project 'gt_strd5.sfproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' P follow a project-to-project reference to this project, this project has belatform='x64'. This error may also appear if some other project is trying toen unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform. gt_strd5 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets 737
Severity Code Description Project File Line Suppression State
Error MSB4057 The target "CreateManifestResourceNames" does not exist in the project. gt_strd5 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets 2630
I found that after the change, some references in the application's project file continued to reference MSBuild 1.5.0. In my case, the gt_strd5.sfproj file contained four references which needed to be updated from 1.5.0 to 1.6.0. See the snippets from the XML below.
Import Project="..\packages\Microsoft.VisualStudio.Azure.Fabric.**MSBuild.1.5.0**\build\Microsoft.VisualStudio.Azure.Fabric.Application.props" Condition="Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.**MSBuild.1.5.0**\build\Microsoft.VisualStudio.Azure.Fabric.Application.props')"
.....
Import Project="..\packages\Microsoft.VisualStudio.Azure.Fabric.**MSBuild.1.5.0**\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets" Condition="Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.**MSBuild.1.5.0**\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets')"
To verify this, I went back a couple times and was able to reproduce both the issue and this solution.
Hope it saves someone else some time.
Best Regards
I was getting this error into PCF control.
Run Developer Command Prompt VS2017/ VS2019
a) Remove white space from your folder like Test%20-%20PCFs (source control generated name) should be TestPCFs
b) Go to pcf project folder from cmd line & run msbuild /t:restore
b) Go to cds project folder from cmd line & run msbuild /t:restore
c) On cds project folder, run msbuild
d) For release deployment run msbuild /p:configuration=Release
For other types of projects
a) Remove white space from your folder name
b) run msbuild /t:restore
c) run msbuild

MSBuild 2015 fails packaging web app from VS2010

I have a build server that until recently had up to .Net 4.5.1 and VS2010/VS2012 installed. I ran MSBuild to build and package web apps as follows:
"C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe" Hartford.Pace.sln /nologo /v:n /p:Configuration=Release /p:DeployOnBuild=True /p:CreatePackageOnPublish=True /p:AutoParameterizationWebConfigConnectionStrings=False /p:EnableNuGetPackageRestore=True
I recently updated the build server to include Frameworks through 4.6.1 and VS2013/VS2015. Everything was installed in sequence. I updated the build command to:
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" Hartford.Pace.sln /nologo /v:n /p:Configuration=Release /p:DeployOnBuild=True /p:CreatePackageOnPublish=True /p:AutoParameterizationWebConfigConnectionStrings=False /p:EnableNuGetPackageRestore=True /p:VisualStudioVersion=10.0
And now I'm getting the following error only for VS2010 web apps:
"d:\a5\bi_hartsource_pace\Microsoft_Build_Web_App\trunk\Hartford.Pace.sln" (default target) (1) ->
"d:\a5\bi_hartsource_pace\Microsoft_Build_Web_App\trunk\Hartford.Pace.Services\Hartford.Pace.Services.csproj" (default target) (2) ->
(PackageUsingManifest target) ->
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3009,5): error : Web deployment task failed. (Unknown ProviderOption:DefiningProjectFullPath. Known ProviderOptions are:.) [d:\a5\bi_hartsource_pace\Microsoft_Build_Web_App\trunk\Hartford.Pace.Services\Hartford.Pace.Services.csproj]
Which points to a problem with the packaging target files. I checked them and none of them were changed by the update.
Does anyone know of side-by-side issues with VS2010 and VS2015? I'd like to upgrade the VS2010 Solutions but it's not my code and I need to build existing apps without modification.
Is this the best method for packaging an app without having the developers create publishing profiles or running anything at their end? This is supposed to be a fully automated build and deploy process. It has been working for three years with no issues but I'm open to suggestions that I can implement entirely on my build server without involving changing files in the source code (including csproj or other controlling files).
Add /p:VisualStudioVersion=10.0

TFS Build Server failing

Here at my new work, we are forced to use Microsoft Team Foundation Server 2008, for our builds.
Even most of developers already moved to VS 2010, and 2012, but the build server is still TFS 2008.
Any way, I am working with VS 2010 project, and I built the "default build definition", on 2008 TFS server.
The build is failing.
Looking at the log, it is trying to delete the workspace "agentserver_104_" but didn't find it, but then later try to create the workspace "agentserver_104_". but it fails because there is already a workspace called "agentserver_104".
This is the error message with the log
Target "CoreInitializeWorkspace" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets"
Using "DeleteWorkspaceTask" task from assembly "c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\Microsoft.TeamFoundation.Build.Tasks.VersionControl.dll".
Task "DeleteWorkspaceTask"
DeleteWorkspaceTask TeamFoundationServerUrl="http://xxxxx:8080/" BuildUri="vstfs:///Build/Build/21924" Name="agentserver_104_" DeleteLocalItems=True
TF14061: The workspace agentserver_104_;TCPL\TFSBuild does not exist.
Done executing task "DeleteWorkspaceTask".
Task "DeleteWorkspaceTask" skipped, due to false condition;
Using "CreateWorkspaceTask" task from assembly "c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\Microsoft.TeamFoundation.Build.Tasks.VersionControl.dll".
Task "CreateWorkspaceTask"
CreateWorkspaceTask TeamFoundationServerUrl="http://xxxxx:8080/" BuildUri="vstfs:///Build/Build/21924" Name="agentserver_104_"
BuildDirectory="E:\TFSBuild\Geofind Modernization\GeoFacility 10.1 - Win7" SourcesDirectory="E:\TFSBuild\Geofind Modernization\GeoFacility 10.1 - Win7\Sources" Comment="Workspace created by Team Build"
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5,801,5): error : The path E:\TFSBuild\Geofind Modernization\GeoFacility 10.1 - Win7\Sources is already mapped in workspace agentserver_104.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5): error MSB4018: The "CreateWorkspaceTask" task failed unexpectedly.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5): error MSB4018: Microsoft.TeamFoundation.VersionControl.Client.MappingConflictException: The path E:\TFSBuild\Geofind Modernization\GeoFacility 10.1 - Win7\Sources is already mapped in workspace DAPP03085_104.
Notice that when it tried to delete the workspace, it uses the name agentserver_104_
But the existing name was : agentserver_104
Without the trailing underbar.
any idea?
There seems to be a problem with probably referenced projects i suppose. Because the real error is The path E:\TFSBuild\Geofind Modernization\GeoFacility 10.1 - Win7\Sources is already mapped in workspace DAPP03085_104. So I think you need to check that one.

Resources